Started to Implement Evaluation
Corrected Some Errors Cleaned Code
This commit is contained in:
@@ -128,6 +128,16 @@
|
||||
}
|
||||
|
||||
#pragma mark Calculation and Drawing Methods
|
||||
- (CTLineRef)createLineForString:(NSString *)aString
|
||||
{
|
||||
NSAttributedString *text = [[NSAttributedString alloc] initWithString:aString
|
||||
attributes:@{NSFontAttributeName: self.font}];
|
||||
CFAttributedStringRef attributedString = CFBridgingRetain(text);
|
||||
CTLineRef line = CTLineCreateWithAttributedString(attributedString);
|
||||
CFRelease(attributedString); // TODO: Is this release appropriate?
|
||||
return line;
|
||||
}
|
||||
|
||||
- (NSRect)bounds
|
||||
{
|
||||
if (NSEqualRects(_cachedBounds, NSZeroRect)) {
|
||||
@@ -161,33 +171,4 @@
|
||||
[transform concat];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MPLayout (MPSubclassImplement)
|
||||
|
||||
- (MPLayout *)childLayoutAtIndex:(NSUInteger)index
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSRect)generateBounds
|
||||
{
|
||||
return NSZeroRect;
|
||||
}
|
||||
|
||||
- (NSRect)boundingRectForRange:(NSRange)range
|
||||
{
|
||||
return NSZeroRect;
|
||||
}
|
||||
|
||||
- (NSPoint)offsetOfChildLayoutAtIndex:(NSUInteger)index
|
||||
{
|
||||
return NSZeroPoint;
|
||||
}
|
||||
|
||||
- (void)draw
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
Reference in New Issue
Block a user