projects
/
monky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f055cfe
)
Fixed gradients to actually use both end colors
author
Kevin Lyles
<kevinlyles@gmail.com>
Fri, 6 Aug 2010 02:33:49 +0000
(21:33 -0500)
committer
Brenden Matthews
<brenden@diddyinc.com>
Fri, 15 Oct 2010 18:23:56 +0000
(11:23 -0700)
Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
src/colours.c
patch
|
blob
|
history
diff --git
a/src/colours.c
b/src/colours.c
index
290455e
..
f839f2f
100644
(file)
--- a/
src/colours.c
+++ b/
src/colours.c
@@
-119,7
+119,7
@@
unsigned long *do_gradient(int width, unsigned long first_colour, unsigned long
for (i = 0; i < width; i++) {
int red3 = 0, green3 = 0, blue3 = 0; // colour components
- float factor = ((float)(i + 1) / width);
+ float factor = ((float) i / (width - 1));
/* the '+ 0.5' bit rounds our floats to ints properly */
if (red1 >= red2) {