Added the MPExpressionTree Classes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user