DrawKit
Vector and illustration framework for Mac OS X
|
tree object; this stores indexes in mutable index sets. More...
Instance Methods | |
(NSSize) | - canvasSize |
(NSUInteger) | - countOfLeaves |
(NSBezierPath *) | - debugStorageDivisions |
(id) | - initWithCanvasSize:depth: |
(void) | - insertItemIndex:withRect: |
(NSIndexSet *) | - itemsIntersectingPoint: |
(NSIndexSet *) | - itemsIntersectingRect: |
(NSIndexSet *) | - itemsIntersectingRects:count: |
(void) | - removeItemIndex:withRect: |
(void) | - setDepth: |
(void) | - shiftIndexesStartingAtIndex:by: |
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: |
Class Methods | |
(Class) | + leafClass |
Class Methods inherited from NSObject | |
(id) | + alloc |
(Class) | + class |
(void) | + initialize |
(void) | + load |
(id) | + new |
Class Methods inherited from <NSKeyValueBindingCreation> | |
(void) | + exposeBinding: |
Protected Attributes | |
NSSize | mCanvasSize |
NSBezierPath * | mDebugPath |
NSMutableArray * | mLeaves |
NSMutableArray * | mNodes |
DKBSPOperation | mOp |
NSUInteger | mOpIndex |
NSMutableIndexSet * | mResults |
tree object; this stores indexes in mutable index sets.
this stores indexes in mutable index sets. The indexes refer to the index of the object within the linear array. Given a rect query, this returns an index set which is the indexes of all objects that intersect the rect. Using -objectsAtIndexes: on the linear array then returns the relevant objects sorted by Z-order. The tree only stores the indexes of visible objects, thus it doesn't need to test for visibility - the storage will manage adding and removing indexes as object visibility changes.
note that this is equivalent to a binary search in 2 dimensions. The purpose is to weed out as many irrelevant objects as possible in advance of returning them to the client for drawing. Internally it is tuned for speed but it relies heavily on the performance of Cocoa's NSIndexSet class, and -addIndexes: in particular. If these turn out to be slow, this may be detrimental to drawing performance.
- (NSSize) canvasSize |
- (NSUInteger) countOfLeaves |
- (NSBezierPath*) debugStorageDivisions |
- (id) initWithCanvasSize: | (NSSize) | size | |
depth: | (NSUInteger) | depth | |
- (void) insertItemIndex: | (NSUInteger) | idx | |
withRect: | (NSRect) | rect | |
- (NSIndexSet*) itemsIntersectingPoint: | (NSPoint) | point |
- (NSIndexSet*) itemsIntersectingRect: | (NSRect) | rect |
- (NSIndexSet*) itemsIntersectingRects: | (const NSRect *) | rects | |
count: | (NSUInteger) | count | |
+ (Class) leafClass |
- (void) removeItemIndex: | (NSUInteger) | idx | |
withRect: | (NSRect) | rect | |
- (void) setDepth: | (NSUInteger) | depth |
- (void) shiftIndexesStartingAtIndex: | (NSUInteger) | startIndex | |
by: | (NSInteger) | delta | |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |