1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-03 12:24:17 +01:00

Fixed diagonal gradients.

This commit is contained in:
dan
2000-01-22 22:07:44 +00:00
parent a2ae76e274
commit 08b0a885d1
23 changed files with 270 additions and 319 deletions

View File

@@ -250,11 +250,11 @@ renderDGradient(unsigned width, unsigned height, int r0, int g0, int b0,
RDestroyImage(image);
return NULL;
}
ptr = tmp->data;
width *= 3;
a = ((float)(width - 1))/((float)(height - 1));
width = width * 3;
/* copy the first line to the other lines with corresponding offset */
for (i=0, j=0, offset=0; i<height; i++, j += width) {
@@ -466,8 +466,8 @@ renderMDGradient(unsigned width, unsigned height, RColor **colors, int count)
}
ptr = tmp->data;
a = ((float)(width - 1))/((float)(height - 1));
width = width * 3;
/* copy the first line to the other lines with corresponding offset */
for (i=0, j=0, offset=0; i<height; i++, j += width) {