DrawKit
Vector and illustration framework for Mac OS X
|
Instance Methods | |
(NSBezierPath *) | - path:withFinalSize:offsetBy:fromPartcode: |
Transforms a path to the final size and position relative to a partcode. More... | |
(NSBezierPath *) | - pathWithFinalSize:offsetBy:fromPartcode: |
Return a rectangular path offset from a given partcode. More... | |
(NSBezierPath *) | - pathWithRelativePosition:finalSize: |
Return a rectangular path with given relative origin but absolute final size. More... | |
(NSBezierPath *) | - pathWithRelativeRect: |
Return a rectangular path with given size and origin. More... | |
(NSPoint) | - pointForRelativeLocation: |
Convert a point from relative coordinates to absolute coordinates. More... | |
- (NSBezierPath*) path: | (NSBezierPath *) | inPath | |
withFinalSize: | (NSSize) | size | |
offsetBy: | (NSPoint) | offset | |
fromPartcode: | (NSInteger) | pc | |
Transforms a path to the final size and position relative to a partcode.
The resulting path is positioned at a fixed offset and size relative to a partcode (a corner, say) in such a way that the object's size and angle set the positioning and orientation of the path but not its actual size. This is useful for adding an adornment to the shape that is unscaled by the object, such as the text indicator shown by DKTextShape
path | the path to transform |
size | the final desired size of the rectangle |
offset | an offset in absolute units from the nominated partcode position |
pc | the partcode that the path is positioned relative to |
Extends class DKDrawableShape.
- (NSBezierPath*) pathWithFinalSize: | (NSSize) | size | |
offsetBy: | (NSPoint) | offset | |
fromPartcode: | (NSInteger) | pc | |
Return a rectangular path offset from a given partcode.
The resulting path is positioned at a fixed offset and size relative to a partcode (a corner, say) in such a way that the object's size and angle set the positioning and orientation of the path but not its actual size. This is useful for adding an adornment to the shape that is unscaled by the object, such as the text indicator shown by DKTextShape
size | the final desired size of the rectangle |
offset | an offset in absolute units from the nominated partcode position |
pc | the partcode that the path is positioned relative to |
Extends class DKDrawableShape.
- (NSBezierPath*) pathWithRelativePosition: | (NSPoint) | relLoc | |
finalSize: | (NSSize) | size | |
Return a rectangular path with given relative origin but absolute final size.
Not affected by the object's current offset. By specifying a final size the resulting path can represent a fixed-sized region independent of the object's current size.
relLoc | a point expressed relative to the unit square |
size | the final desired size o fthe rectangle |
Extends class DKDrawableShape.
- (NSBezierPath*) pathWithRelativeRect: | (NSRect) | relRect |
Return a rectangular path with given size and origin.
Not affected by the object's current offset
relRect | a rectangle expressed relative to the unit square |
Extends class DKDrawableShape.
- (NSPoint) pointForRelativeLocation: | (NSPoint) | relLoc |
Convert a point from relative coordinates to absolute coordinates.
Not affected by the object's current offset
relLoc | a point expressed relative to the unit square |
Extends class DKDrawableShape.