• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSStringAdditions drawAtPoint
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSStringAdditions drawAtPoint
      • From: Stéphane Sudre <email@hidden>
  • Prev by Date: Re: NSTextView unselects on tab clicks...
  • Next by Date: Re: NSTextView unselects on tab clicks...
  • Previous by thread: SSH clients on other platforms was: Re: MacOSX-dev digest, Vol 1 #904 - 22 msgs
  • Next by thread: Re: NSStringAdditions drawAtPoint
  • Index(es):
    • Date
    • Thread