projects
/
mikachu
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e328dc2
)
there's the rect grad. now stop bugging me :(
author
Derek Foreman
<manmower@gmail.com>
Sun, 18 May 2003 23:27:31 +0000
(23:27 +0000)
committer
Derek Foreman
<manmower@gmail.com>
Sun, 18 May 2003 23:27:31 +0000
(23:27 +0000)
render/gradient.c
patch
|
blob
|
history
diff --git
a/render/gradient.c
b/render/gradient.c
index
4b89434
..
e669a2c
100644
(file)
--- a/
render/gradient.c
+++ b/
render/gradient.c
@@
-397,7
+397,7
@@
void gradient_rectangle(Surface *sf, int inw, int inh)
dby = dbx/(float)h;
dbx/= (float)w;
for (x = 0; x < w; ++x, data) {
- if (
drx * x < dry * y
) val = (int)(drx * x);
+ if (
(float)x/(float)w < (float)y/(float)h
) val = (int)(drx * x);
else val = (int)(dry * y);
r = sf->data.planar.primary->r + val;