Added Function Chooser as a Popover
Improved Evaluation Added Parenthesis Function
This commit is contained in:
@@ -136,9 +136,16 @@
|
||||
|
||||
#pragma mark Calculation and Drawing Methods
|
||||
- (CTLineRef)createLineForString:(NSString *)aString
|
||||
{
|
||||
return [self createLineForString:aString
|
||||
usingFont:self.font];
|
||||
}
|
||||
|
||||
- (CTLineRef)createLineForString:(NSString *)aString
|
||||
usingFont:(NSFont *)font
|
||||
{
|
||||
NSAttributedString *text = [[NSAttributedString alloc] initWithString:aString
|
||||
attributes:@{NSFontAttributeName: self.font}];
|
||||
attributes:@{NSFontAttributeName: font}];
|
||||
CFAttributedStringRef attributedString = CFBridgingRetain(text);
|
||||
CTLineRef line = CTLineCreateWithAttributedString(attributedString);
|
||||
CFRelease(attributedString); // TODO: Is this release appropriate?
|
||||
|
||||
Reference in New Issue
Block a user