nanogui: Pixmap Clipping


Previous by date: 17 Feb 2010 23:05:47 -0000 Pixmap Clipping, Johannes Schock
Next by date: 17 Feb 2010 23:05:47 -0000 Re: Pixmap Clipping, Johannes Schock
Previous in thread: 17 Feb 2010 23:05:47 -0000 Pixmap Clipping, Johannes Schock
Next in thread: 17 Feb 2010 23:05:47 -0000 Re: Pixmap Clipping, Johannes Schock

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



Previous by date: 17 Feb 2010 23:05:47 -0000 Pixmap Clipping, Johannes Schock
Next by date: 17 Feb 2010 23:05:47 -0000 Re: Pixmap Clipping, Johannes Schock
Previous in thread: 17 Feb 2010 23:05:47 -0000 Pixmap Clipping, Johannes Schock
Next in thread: 17 Feb 2010 23:05:47 -0000 Re: Pixmap Clipping, Johannes Schock


Powered by ezmlm-browse 0.20.