bugGNUstep - Bugs: bug #18260, NSBitmapImage is offset using art...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #18260: NSBitmapImage is offset using art backend

Submitted by:  Mark Tracy <tracy454>
Submitted on:  Sun 12 Nov 2006 07:57:34 AM UTC  
 
Category: BackendSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Sun 31 Dec 2006 04:34:16 AM UTC, comment #1:

Fixed it myself. The problem was that the changes to the way the art backend calculates the coordinate transformations from user space to pixel space were not propagated to -GSReadRect: in back/Source/art/ReadRect.m. SVN revision 24299

Mark Tracy <tracy454>
Sun 12 Nov 2006 07:57:34 AM UTC, original submission:

I have been working on NSBitmapImage, and in the course of testing other things, I see that the following code gives a mis-aligned image:
[aView lockFocus];
NSBitmapImageRep *imgRep = [[NSBitmapImageRep alloc] initWithFocusedViewRect: [aView bounds]];
[aView unlockFocus];
NSData *tiffRep = [imgRep TIFFRepresentation];

The image is off by 5 pixels in both the X and Y coordinates. That is a very strange number for the offset. The sample image happens to be a slider control with a black border.

This problem did not occur with gnustep-back-0.11.0, but appeared in back-0.12 in the SVN. It only happens with the art backend, the xlib backend works for both versions. (I can't build the cairo backend, or I would have tested that too.) The bug occurs with my experimental GIF and JPEG code too.

System: gnustep-core svn rev 24050; Suse Linux 10.1; gcc 4.1

Mark Tracy <tracy454>

 

Attached Files
file #11235:  slider(art)(r24050).tif added by tracy454 (5KiB - image/tiff - sample image showing misalignment)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Updated the item)
  • -unavailable- added by tracy454 (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 31 Jan 2007 02:15:38 PM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 12 Nov 2006 07:57:35 AM UTCtracy454Attached File-=>Added slider(art)(r24050).tif, #11235

    Back to the top


    Powered by Savane 3.1-cleanup1