nanogui: Pixmap Clipping


Previous by date: 15 Feb 2010 10:24:07 -0000 Re: Problem with BMP, Sung Joo, Byun
Next by date: 15 Feb 2010 10:24:07 -0000 Re: Pixmap Clipping, Greg Haerr
Previous in thread:
Next in thread: 15 Feb 2010 10:24:07 -0000 Re: Pixmap Clipping, Greg Haerr

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




Previous by date: 15 Feb 2010 10:24:07 -0000 Re: Problem with BMP, Sung Joo, Byun
Next by date: 15 Feb 2010 10:24:07 -0000 Re: Pixmap Clipping, Greg Haerr
Previous in thread:
Next in thread: 15 Feb 2010 10:24:07 -0000 Re: Pixmap Clipping, Greg Haerr


Powered by ezmlm-browse 0.20.