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/



_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to