DrawKit
Vector and illustration framework for Mac OS X
Instance Methods | Class Methods | List of all members
DKShapeFactory Class Reference

This class provides a number of standard shareable paths that can be utilsed by DKDrawableShape. More...

Inheritance diagram for DKShapeFactory:
Inheritance graph
[legend]

Instance Methods

(NSBezierPath *) - roundEndedRect:objParam:
 
(NSBezierPath *) - roundRectInRect:objParam:
 
(NSBezierPath *) - speechBalloonInRect:objParam:
 
- Instance Methods inherited from NSObject
(NSString *) - address
 
(DKStyleRegistry *) - applicationWillReturnStyleRegistry
 
(BOOL- canBeUsedWithSelectionTool
 
(id- categoryManager:shouldReplaceObject:withObject:
 
(Class- classForCoder
 
(NSColor *) - colorValue
 
(NSColor *) - colourValue
 
(id- copy
 
(void) - dealloc
 
(id- deepCopy
 
(NSDictionary *) - dimensionValuesForArrowStroke:
 
(CGFloat- drawing:convertDistanceToExternalCoordinates:
 
(NSPoint) - drawing:convertLocationToExternalCoordinates:
 
(void) - drawing:didDrawRect:inView:
 
(void) - drawing:willDrawRect:inView:
 
(NSString *) - drawing:willReturnAbbreviationForUnit:
 
(NSString *) - drawing:willReturnFormattedCoordinateForDistance:
 
(CGFloat- drawingWillReturnUnitToPointsConversonFactor:
 
(void) - finalize
 
(NSString *) - hexString
 
(void) - hotspot:didEndTrackingWithEvent:inView:
 
(void) - hotspot:isTrackingWithEvent:inView:
 
(void) - hotspot:willBeginTrackingWithEvent:inView:
 
(NSData *) - imageData
 
(NSImage *) - imageResourceNamed:
 
(id- init
 
(id- initWithExpression:
 
(id- instantiateObjectWithShortName:parameters:
 
(BOOL- isLiteralValue
 
(void) - layoutManager:willPlaceGlyphAtIndex:atLocation:pathAngle:yOffset:
 
(void) - menuItem:wasAddedForObject:inCategory:
 
(BOOL- moveObjectTo:position:slope:userInfo:
 
(id- mutableCopy
 
(void) - oneShotComplete
 
(void) - oneShotHasReached:
 
(void) - oneShotWillBegin
 
(void) - path:elementIndex:type:points:subPathIndex:subPathClosed:contextInfo:
 
(id- placeLinkFromPoint:toPoint:onPath:linkNumber:userInfo:
 
(id- placeObjectAtPoint:onPath:position:slope:userInfo:
 
(NSPoint) - point
 
(NSPoint) - pointForTextLayout
 
(DKStyle *) - registry:shouldReplaceStyle:withStyle:
 
(NSBezierPath *) - renderer:willRenderPath:
 
(void) - routeFinder:progressHasReached:
 
(void) - setValue:forNumericParameter:
 
(NSString *) - stringValue
 
(CGFloat- taperFactorAtDistance:onPath:ofLength:
 
(void) - toolDidPerformUndoableAction:
 
(void) - toolWillPerformUndoableAction:
 
(NSURL *) - url
 
- Instance Methods inherited from <NSObject>
(NSString *) - description
 
(NSUInteger- hash
 
(BOOL- isEqual:
 
- Instance Methods inherited from <NSKeyValueBindingCreation>
(void) - bind:toObject:withKeyPath:options:
 
(NSArray *) - exposedBindings
 
(NSDictionary *) - infoForBinding:
 
(NSArray *) - optionDescriptionsForBinding:
 
(void) - unbind:
 
(Class- valueClassForBinding:
 
- Instance Methods inherited from <NSCoding>
(void) - encodeWithCoder:
 
(id- initWithCoder:
 

Class Methods

(NSBezierPath *) + arrowhead
 
(NSBezierPath *) + arrowTailFeather
 
(NSBezierPath *) + arrowTailFeatherWithRake:
 
(NSBezierPath *) + cross
 
(NSBezierPath *) + diagonalCross
 
(NSBezierPath *) + equilateralTriangle
 
(NSBezierPath *) + heptagon
 
(NSBezierPath *) + hexagon
 
(NSBezierPath *) + inflectedArrowhead
 
(NSBezierPath *) + octagon
 
(NSBezierPath *) + oval
 
(NSBezierPath *) + ovalSpeechBalloon:
 
(NSBezierPath *) + pathFromGlyph:inFontWithName:
 
(NSBezierPath *) + pentagon
 
(NSBezierPath *) + rect
 
(NSRect+ rectOfUnitSize
 
(NSBezierPath *) + regularPolygon:
 
(NSBezierPath *) + regularStar:
 
(NSBezierPath *) + rightTriangle
 
(NSBezierPath *) + ring:
 
(NSBezierPath *) + roundEndedRect:
 
(NSBezierPath *) + roundRect
 
(NSBezierPath *) + roundRectInRect:andCornerRadius:
 
(NSBezierPath *) + roundRectSpeechBalloon:cornerRadius:
 
(NSBezierPath *) + roundRectSpeechBalloonInRect:params:cornerRadius:
 
(NSBezierPath *) + roundRectWithCornerRadius:
 
(DKShapeFactory *) + sharedShapeFactory
 
(NSBezierPath *) + star:innerDiameter:
 
- Class Methods inherited from NSObject
(id+ alloc
 
(Class+ class
 
(void) + initialize
 
(void) + load
 
(id+ new
 
- Class Methods inherited from <NSKeyValueBindingCreation>
(void) + exposeBinding:
 

Detailed Description

This class provides a number of standard shareable paths that can be utilsed by DKDrawableShape.

Author
Contributions from the community; see CONTRIBUTORS.md
Date
2005-2015

This class provides a number of standard shareable paths that can be utilsed by DKDrawableShape. These are all bounded by the standard unit square 1.0 on each side and centered at the origin. The DKDrawableShape class provides rotation, scaling and offset for each shape that it draws.

Note that for efficiency many of the path objects returned here are shared. That means that if you change a shape with the path editor you MUST copy it first.

The other job of this class is to provide shapes for reshapable shapes on demand. In that case, an instance of the shape factory is used (usually sharedShapeFactory) and the instance methods which conform to the reshapable informal protocol are used as shape providers. See DKReshapableShape for more details.

Method Documentation

+ (NSBezierPath*) arrowhead
+ (NSBezierPath*) arrowTailFeather
+ (NSBezierPath*) arrowTailFeatherWithRake: (CGFloat rakeFactor
+ (NSBezierPath*) cross
+ (NSBezierPath*) diagonalCross
+ (NSBezierPath*) equilateralTriangle
+ (NSBezierPath*) heptagon
+ (NSBezierPath*) hexagon
+ (NSBezierPath*) inflectedArrowhead
+ (NSBezierPath*) octagon
+ (NSBezierPath*) oval
+ (NSBezierPath*) ovalSpeechBalloon: (NSInteger sbParams
+ (NSBezierPath*) pathFromGlyph: (NSString *)  glyph
inFontWithName: (NSString *)  fontName 
+ (NSBezierPath*) pentagon
+ (NSBezierPath*) rect
+ (NSRect) rectOfUnitSize
+ (NSBezierPath*) regularPolygon: (NSInteger numberOfSides
+ (NSBezierPath*) regularStar: (NSInteger numberOfPoints
+ (NSBezierPath*) rightTriangle
+ (NSBezierPath*) ring: (CGFloat innerDiameter
+ (NSBezierPath*) roundEndedRect: (NSRect rect
- (NSBezierPath*) roundEndedRect: (NSRect rect
objParam: (id param 
+ (NSBezierPath*) roundRect
+ (NSBezierPath*) roundRectInRect: (NSRect rect
andCornerRadius: (CGFloat radius 
- (NSBezierPath*) roundRectInRect: (NSRect bounds
objParam: (id param 
+ (NSBezierPath*) roundRectSpeechBalloon: (NSInteger sbParams
cornerRadius: (CGFloat cr 
+ (NSBezierPath*) roundRectSpeechBalloonInRect: (NSRect rect
params: (NSInteger sbParams
cornerRadius: (CGFloat cr 
+ (NSBezierPath*) roundRectWithCornerRadius: (CGFloat radius
+ (DKShapeFactory*) sharedShapeFactory
- (NSBezierPath*) speechBalloonInRect: (NSRect rect
objParam: (id param 
+ (NSBezierPath*) star: (NSInteger numberOfPoints
innerDiameter: (CGFloat diam