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

The purpose of this class is to allow images to be archived much more efficiently, by archiving the original data that the image was created from rather than any bitmaps or other uncompressed forms, and to avoid storing multiple copies of the same image. More...

Inheritance diagram for DKImageDataManager:
Inheritance graph
[legend]

Instance Methods

(NSArray *) - allKeys
 
(NSString *) - generateKey
 
(BOOL- hasImageDataForKey:
 
(NSData *) - imageDataForKey:
 
(NSString *) - keyForImageData:
 
(BOOL- keyIsInUse:
 
(NSImage *) - makeImageForKey:
 
(NSImage *) - makeImageWithContentsOfURL:key:
 
(NSImage *) - makeImageWithData:key:
 
(NSImage *) - makeImageWithPasteboard:key:
 
(void) - removeKey:
 
(void) - removeUnusedData
 
(void) - setImageData:forKey:
 
(void) - setKey:isInUse:
 
- 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:
 

Additional Inherited Members

- Class Methods inherited from NSObject
(id+ alloc
 
(Class+ class
 
(void) + initialize
 
(void) + load
 
(id+ new
 
- Class Methods inherited from <NSKeyValueBindingCreation>
(void) + exposeBinding:
 

Detailed Description

The purpose of this class is to allow images to be archived much more efficiently, by archiving the original data that the image was created from rather than any bitmaps or other uncompressed forms, and to avoid storing multiple copies of the same image.

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

This only comes into play when archiving, dearchiving or creating images - each object still maintains an NSImage derived from the data stored here.

When images are cut/pasted within the framework, the image key can be used to effect that operation without having to move the actual image data.

Method Documentation

- (NSArray*) allKeys
- (NSString*) generateKey
- (BOOL) hasImageDataForKey: (NSString *)  key
- (NSData*) imageDataForKey: (NSString *)  key
- (NSString*) keyForImageData: (NSData *)  imageData
- (BOOL) keyIsInUse: (NSString *)  key
- (NSImage*) makeImageForKey: (NSString *)  key
- (NSImage*) makeImageWithContentsOfURL: (NSURL *)  url
key: (NSString **)  key 
- (NSImage*) makeImageWithData: (NSData *)  imageData
key: (NSString **)  key 
- (NSImage*) makeImageWithPasteboard: (NSPasteboard *)  pb
key: (NSString **)  key 
- (void) removeKey: (NSString *)  key
- (void) removeUnusedData
- (void) setImageData: (NSData *)  imageData
forKey: (NSString *)  key 
- (void) setKey: (NSString *)  key
isInUse: (BOOL inUse