bugGNUstep - Bugs: bug #21681, NSImage...

 
 

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

bug #21681: NSImage drawInRect:fromRect:operation:fraction does not understand NSZeroRect fromRect (does not show up)

Submitted by:  Christopher Wojno <wojno>
Submitted on:  Fri 30 Nov 2007 05:05:02 AM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

Fri 30 Nov 2007 07:57:31 PM UTC, comment #1:

I submitted a patch to SVN that not only solves this problem, but also limits the source rectangle to the image bounds. Could you please give it a try?
And thank you for giving GNUstep such a hard testing, we need it.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Fri 30 Nov 2007 05:05:02 AM UTC, original submission:

When calling this function:
[NSImage drawInRect:fromRect:operation:fraction]

Apple's documentation says that passing in a zero fromRect will use the image's current size and position (no clipping of the image). Using NSZeroRect (which is 0,0,0,0), causes the image to be drawn with 0 width and height (so you see nothing).

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/index.html#//apple_ref/doc/uid/TP40004051

Suggested fix: at the beginning of drawInRect, if the width and height, and origin is all zero, set the size of the fromRect to the image's size. That will produce correct behavior.

Christopher Wojno <wojno>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by wojno (Submitted the item)
  •  

    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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 29 Nov 2008 02:07:36 PM UTCFredKieferOpen/ClosedIn Test=>Closed
    Fri 30 Nov 2007 07:57:31 PM UTCFredKieferStatusNone=>Fixed
      Assigned toNone=>FredKiefer
      Open/ClosedOpen=>In Test

    Back to the top


    Powered by Savane 3.1-cleanup1