Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F126912
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
728 B
Referenced Files
None
Subscribers
None
View Options
diff --git a/util/gradient.cpp b/util/gradient.cpp
index a9e35bcb..fe50b2bc 100644
--- a/util/gradient.cpp
+++ b/util/gradient.cpp
@@ -1,27 +1,28 @@
#include "gradient.h"
#include "funcs.h"
namespace Effects{
+/* this class does virtually no error checking. great job */
Gradient::Gradient(int size, int startColor, int endColor):
colors(0),
size(size),
index(0){
colors = new int[size];
Util::blend_palette(colors, size / 2, startColor, endColor);
Util::blend_palette(colors + size / 2, size / 2, endColor, startColor);
}
void Gradient::update(){
index = (index + 1) % size;
}
int Gradient::current(){
return colors[index];
}
Gradient::~Gradient(){
delete[] colors;
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Jun 11, 1:33 PM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
69268
Default Alt Text
(728 B)
Attached To
Mode
R75 R-Tech1
Attached
Detach File
Event Timeline