mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
fixed bug with RCreateImageFromXImage() with mask and image of != sizes
fixed dgradient rendering
This commit is contained in:
@@ -119,9 +119,11 @@ RCreateImageFromXImage(RContext *context, XImage *image, XImage *mask)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define MIN(a,b) ((a)<(b)?(a):(b))
|
||||
if (mask) {
|
||||
for (y = 0; y < mask->height; y++) {
|
||||
for (x = 0; x < mask->width; x++) {
|
||||
for (y = 0; y < MIN(mask->height, image->height); y++) {
|
||||
for (x = 0; x < MIN(mask->width, image->width); x++) {
|
||||
if (XGetPixel(mask, x, y)) {
|
||||
*(data++) = 0xff;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user