[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Pixmap Clipping
From: "Johannes Schock" ####@####.#### Date: 15 Feb 2010 10:24:07 -0000 Message-Id: <0LjcUK-1OE71404Uq-00c7ae@mrelayeu.kundenserver.de> Hi, I'm running nano-x, nxlib and fltk 1.1.9 on an ARM AT91SAM9263. I found a Problem with showing GIF-Images with the FLTK-supplied image library on Fl_Double_Windows. It works on Fl_Single_Windows. The cause for the problem is the difference in clipping handling of nano-x between pixmaps (the buffered window) and actual windows. The clipping code for pixmaps in nano-x doesn't take offsets (GrSetGCClipOrigin) into account. Therefore I changed the file srvutil.c (l. 962): #if DYNAMICREGIONS reg = GdAllocRectRegion(0, 0, pp->psd->xvirtres, pp->psd->yvirtres); /* intersect with user region if any*/ if (gcp->regionid) { regionp = GsFindRegion(gcp->regionid); if (regionp) { if (gcp->xoff || gcp->yoff) { //offset for pixmaps (ScJ) MWCLIPREGION *local = GdAllocRegion(); GdCopyRegion(local, regionp->rgn); GdOffsetRegion(local, gcp->xoff, gcp->yoff); GdIntersectRegion(reg, reg, local); GdDestroyRegion(local); } else { GdIntersectRegion(reg, reg, regionp->rgn); } } } GdSetClipRegion(pp->psd, reg); #else Any comments welcome. Regards, Johannes Schock Stiefel GmbH Allmend 7/2 75038 Oberderdingen Webseite: www.stiefelgmbh.de Tel.: 00 49 (0) 70 45 / 96 27 - 14 Fax: 00 49 (0) 70 45 / 96 27 - 20 E-mail: ####@####.#### ___________________________________ Stiefel GmbH Automationssysteme Firmensitz: Allmend 7/2 / 75038 Oberderdingen Registergericht: Amtsgericht Mannheim HRB 240448 / USt.-ID-Nr.: DE 143 082 998 Geschäftsführer: Richard Stiefel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] Pixmap Clipping
From: "Greg Haerr" ####@####.#### Date: 17 Feb 2010 23:05:47 -0000 Message-Id: <2bc501cab025$cedfc350$0300a8c0@RDP> Johannes, Thank you for the patch. Is there a program in the standard FLTK distribution that shows this problem, and the need for the patch? I would like to see the problem before updating the clipping code, although I do agree with your description and solution. I assume there is no issue relating to .gif files perse, just the difference between pixmaps and onscreen windows, so any image file should show the problem. Regards, Greg I'm running nano-x, nxlib and fltk 1.1.9 on an ARM AT91SAM9263. I found a Problem with showing GIF-Images with the FLTK-supplied image library on Fl_Double_Windows. It works on Fl_Single_Windows. The cause for the problem is the difference in clipping handling of nano-x between pixmaps (the buffered window) and actual windows. The clipping code for pixmaps in nano-x doesn't take offsets (GrSetGCClipOrigin) into account. Therefore I changed the file srvutil.c (l. 962): #if DYNAMICREGIONS reg = GdAllocRectRegion(0, 0, pp->psd->xvirtres, pp->psd->yvirtres); /* intersect with user region if any*/ if (gcp->regionid) { regionp = GsFindRegion(gcp->regionid); if (regionp) { if (gcp->xoff || gcp->yoff) { //offset for pixmaps (ScJ) MWCLIPREGION *local = GdAllocRegion(); GdCopyRegion(local, regionp->rgn); GdOffsetRegion(local, gcp->xoff, gcp->yoff); GdIntersectRegion(reg, reg, local); GdDestroyRegion(local); } else { GdIntersectRegion(reg, reg, regionp->rgn); } } } GdSetClipRegion(pp->psd, reg); #else Any comments welcome. Regards, Johannes Schock Stiefel GmbH Allmend 7/2 75038 Oberderdingen Webseite: www.stiefelgmbh.de Tel.: 00 49 (0) 70 45 / 96 27 - 14 Fax: 00 49 (0) 70 45 / 96 27 - 20 E-mail: ####@####.#### ___________________________________ Stiefel GmbH Automationssysteme Firmensitz: Allmend 7/2 / 75038 Oberderdingen Registergericht: Amtsgericht Mannheim HRB 240448 / USt.-ID-Nr.: DE 143 082 998 Geschäftsführer: Richard Stiefel --------------------------------------------------------------------- To unsubscribe, e-mail: ####@####.#### For additional commands, e-mail: ####@####.#### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] Pixmap Clipping
From: "Johannes Schock" ####@####.#### Date: 19 Feb 2010 16:37:57 -0000 Message-Id: <0Mhgu7-1NMI0T1Awd-00MWAt@mrelayeu.kundenserver.de> Hi Greg, you're right, but the behaviour only shows up when using pixmap-based images. (Gif and XPM? ...). The corresponding code is as well in Fl_Pixmap as in Fl_Image but the X-Version of Fl_Image doesn't has a path to it. The problem are calls to XSetClipOrigin on Fl_Double_Windows. I can't find a FLTK-program that shows the behaviour, but if needed I can write a short one. Regards, Johannes Schock Stiefel GmbH Allmend 7/2 75038 Oberderdingen Webseite: www.stiefelgmbh.de Tel.: 00 49 (0) 70 45 / 96 27 - 14 Fax: 00 49 (0) 70 45 / 96 27 - 20 E-mail: ####@####.#### ___________________________________ Stiefel GmbH Automationssysteme Firmensitz: Allmend 7/2 / 75038 Oberderdingen Registergericht: Amtsgericht Mannheim HRB 240448 / USt.-ID-Nr.: DE 143 082 998 Geschäftsführer: Richard Stiefel -----Ursprüngliche Nachricht----- Von: Greg Haerr ####@####.#### Gesendet: Donnerstag, 18. Februar 2010 00:06 An: Johannes Schock; ####@####.#### Betreff: Re: [nanogui] Pixmap Clipping Johannes, Thank you for the patch. Is there a program in the standard FLTK distribution that shows this problem, and the need for the patch? I would like to see the problem before updating the clipping code, although I do agree with your description and solution. I assume there is no issue relating to .gif files perse, just the difference between pixmaps and onscreen windows, so any image file should show the problem. Regards, Greg I'm running nano-x, nxlib and fltk 1.1.9 on an ARM AT91SAM9263. I found a Problem with showing GIF-Images with the FLTK-supplied image library on Fl_Double_Windows. It works on Fl_Single_Windows. The cause for the problem is the difference in clipping handling of nano-x between pixmaps (the buffered window) and actual windows. The clipping code for pixmaps in nano-x doesn't take offsets (GrSetGCClipOrigin) into account. Therefore I changed the file srvutil.c (l. 962): #if DYNAMICREGIONS reg = GdAllocRectRegion(0, 0, pp->psd->xvirtres, pp->psd->yvirtres); /* intersect with user region if any*/ if (gcp->regionid) { regionp = GsFindRegion(gcp->regionid); if (regionp) { if (gcp->xoff || gcp->yoff) { //offset for pixmaps (ScJ) MWCLIPREGION *local = GdAllocRegion(); GdCopyRegion(local, regionp->rgn); GdOffsetRegion(local, gcp->xoff, gcp->yoff); GdIntersectRegion(reg, reg, local); GdDestroyRegion(local); } else { GdIntersectRegion(reg, reg, regionp->rgn); } } } GdSetClipRegion(pp->psd, reg); #else Any comments welcome. Regards, Johannes Schock Stiefel GmbH Allmend 7/2 75038 Oberderdingen Webseite: www.stiefelgmbh.de Tel.: 00 49 (0) 70 45 / 96 27 - 14 Fax: 00 49 (0) 70 45 / 96 27 - 20 E-mail: ####@####.#### ___________________________________ Stiefel GmbH Automationssysteme Firmensitz: Allmend 7/2 / 75038 Oberderdingen Registergericht: Amtsgericht Mannheim HRB 240448 / USt.-ID-Nr.: DE 143 082 998 Geschäftsführer: Richard Stiefel --------------------------------------------------------------------- To unsubscribe, e-mail: ####@####.#### For additional commands, e-mail: ####@####.#### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] Pixmap Clipping
From: "Greg Haerr" ####@####.#### Date: 22 Feb 2010 00:00:55 -0000 Message-Id: <0b8c01cab352$17ea6d50$6464a8c0@winXP> : The clipping code for pixmaps in : nano-x doesn't take offsets (GrSetGCClipOrigin) into account. Therefore I : changed the file srvutil.c (l. 962): I've tested your patch and it's now merged with the 0.92RC1 git repository. Thanks! In testing with FLTK v1.1.10, I've found several smaller other issues that I'll be working to fix, including some default text background color issues, and some images still displaying the wrong colors. I've updated NXLIB to handle fonts.alias files as well. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |