DrawKit
Vector and illustration framework for Mac OS X
|
These category methods perform high-level text layout. More...
Instance Methods | |
(NSSize) | - accurateSize |
(BOOL) | - attributeIsHomogeneous: |
(BOOL) | - attributesAreHomogeneous: |
(void) | - drawInRect:withLayoutPath:atAngle: |
Lays out the receiver then draws it to the destination. More... | |
(void) | - drawInRect:withLayoutPath:atAngle:verticalPositioning:verticalOffset: |
(void) | - drawInRect:withLayoutSize:atAngle: |
Lays out the receiver then draws it to the destination. More... | |
(BOOL) | - isHomogeneous |
These category methods perform high-level text layout.
These category methods perform high-level text layout.
In the first case, the text is laid out in the layoutRect which dictates the line wrapping and number lines by its width or height (this rect is the text container in other words). The resulting text is then rotated to the given angle and mapped into <destRect>, which applies any visual scaling and translation, and drawn into the current context.
The second method is similar except that text is flowed into the layoutPath.
- (NSSize) accurateSize |
- (BOOL) attributesAreHomogeneous: | (NSDictionary *) | attrs |
- (void) drawInRect: | (NSRect) | destRect | |
withLayoutPath: | (NSBezierPath *) | layoutPath | |
atAngle: | (CGFloat) | radians | |
Lays out the receiver then draws it to the destination.
This method is intended to be utilised by high-level text objects such as DKTextShape and DKTextAdornment. It both lays out and renders text in many different ways according to its parameters (and the string's attributes themselves).
destRect | the final destination of the text. The text is scaled and translated to draw in this rect |
layoutPath | a path describing the text layout container. Text is laid out to fit into this path. |
radians | an angle to which the text is rotated before being drawn to <destRect> |
- (void) drawInRect: | (NSRect) | destRect | |
withLayoutPath: | (NSBezierPath *) | layoutPath | |
atAngle: | (CGFloat) | radians | |
verticalPositioning: | (DKVerticalTextAlignment) | vAlign | |
verticalOffset: | (CGFloat) | vPos | |
- (void) drawInRect: | (NSRect) | destRect | |
withLayoutSize: | (NSSize) | layoutSize | |
atAngle: | (CGFloat) | radians | |
Lays out the receiver then draws it to the destination.
This method is intended to be utilised by high-level text objects such as DKTextShape and DKTextAdornment. It both lays out and renders text in many different ways according to its parameters (and the string's attributes themselves).
destRect | the final destination of the text. The text is scaled and translated to draw in this rect |
layoutSize | a size describing the text layout container. Text is laid out to fit into this size. |
radians | an angle to which the text is rotated before being drawn to <destRect>Lays out the receiver then draws it to the destination |
This method is intended to be utilised by high-level text objects such as DKTextShape and DKTextAdornment. It both lays out and renders text in many different ways according to its parameters (and the string's attributes themselves).
destRect | the final destination of the text. The text is scaled and translated to draw in this rect |
layoutPath | a path describing the text layout container. Text is laid out to fit into this path. |
radians | an angle to which the text is rotated before being drawn to <destRect> |
vAlign | whether the text is positioned at top, centre, bottom or at some value |
vPos | proportion of srcRect given by interval 0..1 when vAlign is proportional |
- (BOOL) isHomogeneous |