This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) drawText: (NSRect) theRect { | |
const CTFramesetterRef framesetter = | |
CTFramesetterCreateWithAttributedString((CFAttributedStringRef)_text); | |
// Initialize a rectangular path. | |
const CGMutablePathRef path = CGPathCreateMutable(); | |
const CGRect rect = CGRectInset(NSRectToCGRect([self bounds]), 5.0, 5.0); | |
CGPathAddRect(path, NULL, rect); | |
// Create the frame and draw it into the graphics context |
NewerOlder