Archived
1

Started to Implement Evaluation

Corrected Some Errors
Cleaned Code
This commit is contained in:
Kim Wittenburg
2014-09-06 01:53:22 +02:00
parent 4a3ea0cede
commit a69b5273ee
13 changed files with 112 additions and 107 deletions

View File

@@ -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