Re: Low-level text, why so hard?

2012-12-24 Thread Jeff Schriebman
], NSFontAttributeName, nil]; CGContextSaveGState(ctx); [theString drawAtPoint:NSMakePoint(x, y) withAttributes:fontAttrs]; CGContextRestoreGState(ctx); CGContextSetTextMatrix(ctx, CGAffineTransformIdentity); } Jeff Schriebman An educated mind can entertain a thought without

Displaying an arbitrary unicode character using CGContextShowTextAtPoint or CGContextShowGlyphsAtPoint

2012-03-30 Thread Jeff Schriebman
. Jeff Schriebman ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription

Re: Displaying an arbitrary unicode character using CGContextShowTextAtPoint or CGContextShowGlyphsAtPoint

2012-03-30 Thread Jeff Schriebman
:44 AM, Douglas Davidson wrote: On Mar 30, 2012, at 9:31 AM, Jens Alfke wrote: On Mar 30, 2012, at 9:18 AM, Jeff Schriebman wrote: I have not found a way to use CGContextShowTextAtPoint to easily display such a character and the examples I have found using CGContextShowGlyphsAtPoint() seem

Re: Displaying an arbitrary unicode character using CGContextShowTextAtPoint or CGContextShowGlyphsAtPoint

2012-03-30 Thread Jeff Schriebman
Duncan wrote: On Mar 30, 2012, at 11:45 AM, Jeff Schriebman wrote: I'm not sure how to use the string drawing APIs to directly put a unicode UTF8 character onto a specific X,Y location given a CGContextRef. Both AppKit and UIKit have methods for making a CGContextRef current. Lookup

Re: Displaying an arbitrary unicode character using CGContextShowTextAtPoint or CGContextShowGlyphsAtPoint

2012-03-30 Thread Jeff Schriebman
:19 PM, Jeff Schriebman wrote: Thanks David. My CGContextRef is the current context. I'm just unfamiliar with how to draw a unicode character into it when I don't know the font containing a specific unicode glyph. I'm doing this for OS X 10.7 which is all I need to support. So have

Re: Displaying an arbitrary unicode character using CGContextShowTextAtPoint or CGContextShowGlyphsAtPoint

2012-03-30 Thread Jeff Schriebman
systemFontOfSize:10], NSFontAttributeName, nil]; NSString *upArrow = @\u2B06; [upArrow drawAtPoint:NSMakePoint(100,100) withAttributes:fontAttrs]; On Mar 30, 2012, at 12:47 PM, David Duncan wrote: On Mar 30, 2012, at 12:19 PM, Jeff Schriebman

Re: Displaying an arbitrary unicode character using CGContextShowTextAtPoint or CGContextShowGlyphsAtPoint

2012-03-30 Thread Jeff Schriebman
:(NSPoint)point not NSAttributedString not NSString. Cheers kevin Regards, Jeff Schriebman ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa

Looking for sample code to support NSRect resize in a view

2011-08-19 Thread Jeff Schriebman
, resizeUpCursor and resizeDownCursor that I can adapt for my purpose but I was wondering if I am overlooking some class or sample code that implements this functionality. Thank you. Jeff Schriebman ___ Cocoa-dev mailing list (Cocoa-dev

Re: Looking for sample code to support NSRect resize in a view

2011-08-19 Thread Jeff Schriebman
Thanks for the pointer Mike. On Aug 19, 2011, at 1:00 PM, Mike Abdullah wrote: There's nothing built into cocoa for this. I wrote KSSelectionBorder to implement a decent chunk of the functionality: https://github.com/karelia/KSSelectionBorder On 19 Aug 2011, at 07:00 PM, Jeff Schriebman

Finding objects in a NSDocument

2009-06-29 Thread Jeff Schriebman
objects? Jeff Schriebman ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your