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

Group
 
 

bug #18260: NSBitmapImage is offset using art backend

Submitter:  Mark Tracy <tracy454>
Submitted:  Sun 12 Nov 2006 07:57:34 AM UTC
   
 
Category:  Backend Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

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
  • -email is unavailable- added by CaS (Updated the item)
  • -email is unavailable- added by tracy454 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-01-31 CaS StatusNone Fixed
        Open/ClosedOpen Closed
    2006-11-12 tracy454 Attached File- Added slider(art)(r24050).tif, #11235

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code