[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Maybe a bug for bitmask transparent image display
From: Wilson Loi ####@####.#### Date: 28 Jun 2005 20:05:08 +0100 Message-Id: <fa51fa39050628120456be1070@mail.gmail.com> Hi, I have find a offset issue in Microwdinows to display a transparent picture. Here is a solution. serutil.c : GsPrepareDrawing funciton about line 973 if (gcp->regionid) { regionp = GsFindRegion(gcp->regionid); if (regionp) GdIntersectRegion(reg, reg, regionp->rgn); } + *GdOffsetRegion(reg, gcp->xoff, gcp->yoff); /* wls , fix the offset */* GdSetClipRegion(pp->psd, reg); #else { MWCLIPRECT cliprect; /* FIXME: setup pixmap clipping, different from windows*/ cliprect.x = 0; cliprect.y = 0; cliprect.width = pp->psd->xvirtres; cliprect.height = pp->psd->yvirtres; + *GdOffsetRegion(&cliprect, gcp->xoff, gcp->yoff); /* wls , fix the offset */* GdSetClipRects(pp->psd, 1, &cliprect); } I have find a better way to create / set / release in NONNETWORK a region. here is a solution. srvfunc.c : GrSetGCRegion funciton about line 1201 gcp = GsFindGC(gc); if (gcp) { * + if (gcp->regionid != 0) + { + GrDestroyRegion(gcp->regionid); + }* gcp->regionid = region; srvfunc.c : GrDestroyGC(GR_GC_ID gc) about line 829 if (gcp->stipple.bitmap) free(gcp->stipple.bitmap); *+ if (gcp->regionid != 0) + { + GrDestroyRegion(gcp->regionid); + }* free(gcp); Have a try. Wilson. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |