NSStringAdditions drawAtPoint
NSStringAdditions drawAtPoint
- Subject: NSStringAdditions drawAtPoint
- From: Tom Waters <email@hidden>
- Date: Thu, 28 Jun 2001 14:33:34 -0700
Is there a bug in NSStringAdditions drawAtPoint: withAttributes:?
If you have a negative X or Y coordinate, it seems to change that axis
to 0 and draw the string in the wrong place.
I would expect this example view to draw the string with the leftmost
100 pixels cut off the left edge, but instead it draws the whole string
starting at X = 0.
Can someone please confirm that this is the case, then I'll file a bug.
@implementation MyView
-(void)drawRect:(NSRect)r
{
[[NSColor textBackgroundColor] set];
NSRectFill(r);
[[NSColor textColor] set];
[@"Why doesn't this draw at -100, 20?" drawAtPoint:
NSMakePoint(-100, 20)
withAttributes: nil];
}
@end