nanogui: Pixmap Clipping


Previous by date: 19 Feb 2010 16:37:57 -0000 Re: Pixmap Clipping, Greg Haerr
Next by date: 19 Feb 2010 16:37:57 -0000 patch for microwindows in wdtv live, yut616
Previous in thread: 19 Feb 2010 16:37:57 -0000 Re: Pixmap Clipping, Greg Haerr
Next in thread: 19 Feb 2010 16:37:57 -0000 Re: Pixmap Clipping, Greg Haerr

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: ####@####.####



Previous by date: 19 Feb 2010 16:37:57 -0000 Re: Pixmap Clipping, Greg Haerr
Next by date: 19 Feb 2010 16:37:57 -0000 patch for microwindows in wdtv live, yut616
Previous in thread: 19 Feb 2010 16:37:57 -0000 Re: Pixmap Clipping, Greg Haerr
Next in thread: 19 Feb 2010 16:37:57 -0000 Re: Pixmap Clipping, Greg Haerr


Powered by ezmlm-browse 0.20.