bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #21681] NSImage drawInRect:fromRect:operation:fraction does not und


From: Christopher Wojno
Subject: [bug #21681] NSImage drawInRect:fromRect:operation:fraction does not understand NSZeroRect fromRect (does not show up)
Date: Fri, 30 Nov 2007 05:05:03 +0000
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.9) Gecko/20071117 Firefox/2.0.0.9

URL:
  <http://savannah.gnu.org/bugs/?21681>

                 Summary: NSImage drawInRect:fromRect:operation:fraction does
not understand NSZeroRect fromRect (does not show up)
                 Project: GNUstep
            Submitted by: wojno
            Submitted on: Friday 11/30/2007 at 05:05
                Category: Gui/AppKit
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?21681>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]