[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
GrReadArea for pixmaps
From: ####@####.#### Date: 3 Oct 2000 22:21:21 -0000 Message-Id: <Pine.LNX.4.10.10010040914460.20259-200000@helios.devel.igelaus.com.au> Good morning, Here is a diff (against .89pre1) that allows a GrReadArea on pixmaps. This fixes some problems with composite images in Mozilla. Enjoy Peter Hartshorn --- srvfunc.nopixmap Wed Oct 4 09:14:13 2000 +++ srvfunc.c Wed Oct 4 09:14:15 2000 @@ -1863,21 +1863,35 @@ GR_PIXELVAL *pixels) { GR_WINDOW *wp; + GR_PIXMAP *pp; - wp = GsFindWindow(id); /* FIXME- should check pixmap */ - if ((wp == NULL) || wp->unmapcount || (x >= wp->width) || - (y >= wp->height) || (x + width <= 0) || (y + height <= 0)) { - /* long count; - * GR_PIXELVAL black; - * - * black = GdFindColor(BLACK); - * count = width * height; - * while (count-- > 0) - * *pixels++ = black; - */ + wp = GsFindWindow(id); + pp = GsFindPixmap(id); + if ((wp == NULL) && (pp == NULL)) return; + + if (wp != NULL) { + if (wp->unmapcount || (x >= wp->width) || (y >= wp->height) || + (x + width <= 0) || (y + height <= 0) { + /* long count; + * GR_PIXELVAL black; + * + * black = GdFindColor(BLACK); + * count = width * height; + * while (count-- > 0) + * *pixels++ = black; + */ + return; + } + GdReadArea(wp->psd, wp->x, wp->y, width, height, pixels); + } + if (pp != NULL) { + if ((x >= pp->width) || (y >= pp->height) || + (x + width <= 0) || (y + height <= 0)) { + return; + } + GdReadArea(pp->psd, x, y, width, height, pixels); } - GdReadArea(wp->psd, wp->x, wp->y, width, height, pixels); } /* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: GrReadArea for pixmaps
From: ####@####.#### Date: 3 Oct 2000 22:54:15 -0000 Message-Id: <Pine.LNX.4.10.10010040944550.1376-200000@helios.devel.igelaus.com.au> Opps, I forgot one bracket... :) --- srvfunc.nopixmap Wed Oct 4 09:38:47 2000 +++ srvfunc.c Wed Oct 4 09:44:04 2000 @@ -1863,21 +1863,35 @@ GR_PIXELVAL *pixels) { GR_WINDOW *wp; + GR_PIXMAP *pp; - wp = GsFindWindow(id); /* FIXME- should check pixmap */ - if ((wp == NULL) || wp->unmapcount || (x >= wp->width) || - (y >= wp->height) || (x + width <= 0) || (y + height <= 0)) { - /* long count; - * GR_PIXELVAL black; - * - * black = GdFindColor(BLACK); - * count = width * height; - * while (count-- > 0) - * *pixels++ = black; - */ + wp = GsFindWindow(id); + pp = GsFindPixmap(id); + if ((wp == NULL) && (pp == NULL)) return; + + if (wp != NULL) { + if (wp->unmapcount || (x >= wp->width) || (y >= wp->height) || + (x + width <= 0) || (y + height <= 0)) { + /* long count; + * GR_PIXELVAL black; + * + * black = GdFindColor(BLACK); + * count = width * height; + * while (count-- > 0) + * *pixels++ = black; + */ + return; + } + GdReadArea(wp->psd, wp->x, wp->y, width, height, pixels); + } + if (pp != NULL) { + if ((x >= pp->width) || (y >= pp->height) || + (x + width <= 0) || (y + height <= 0)) { + return; + } + GdReadArea(pp->psd, x, y, width, height, pixels); } - GdReadArea(wp->psd, wp->x, wp->y, width, height, pixels); } /* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: GrReadArea for pixmaps
From: "Greg Haerr" ####@####.#### Date: 4 Oct 2000 00:07:32 -0000 Message-Id: <04d901c02d97$50377fe0$15320cd0@gregh> : Here is a diff (against .89pre1) that allows a GrReadArea on : pixmaps. This fixes some problems with composite images in Mozilla. Thanks. I've added it to 0.89pre2, due to be released tonight. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |