Archived
1

Added the MPExpressionTree Classes

This commit is contained in:
Kim Wittenburg
2014-10-13 23:53:04 +02:00
parent 82259f87e2
commit 5592128926
60 changed files with 1981 additions and 725 deletions

View File

@@ -7,9 +7,7 @@
//
#import "MPPowerFunctionLayout.h"
#define kMPEmptyBoxHeight (CTFontGetDescent((CTFontRef)self.font) + CTFontGetAscent((CTFontRef)self.font) + CTFontGetLeading((CTFontRef)self.font))
#define kMPEmptyBoxYOrigin (-(CTFontGetDescent((CTFontRef)self.font) + CTFontGetLeading((CTFontRef)self.font)))
#import "MPExpressionLayout.h"
#define kPowerFunctionExponentXOffset 1
#define kPowerFunctionTrailingOffset 2
@@ -36,7 +34,7 @@
- (NSPoint)offsetOfChildLayoutAtIndex:(NSUInteger)index
{
CGFloat y = self.baseBounds.size.height / 2;
CGFloat y = (self.baseBounds.size.height + self.baseBounds.origin.y) / 2;
return NSMakePoint(kPowerFunctionExponentXOffset, y);
}
@@ -60,9 +58,6 @@
}
- (void)draw
{
MPLayout *exponentLayout = [self childLayoutAtIndex:0];
[exponentLayout drawAtPoint:[self offsetOfChildLayoutAtIndex:0]];
}
{}
@end