//
//  MSInkImage.h
//  MSInkFramework
//
//  Created by Raleigh Ledet on Tue Aug 19 2003.
//  Copyright (c) 2003 Mage Software. All rights reserved.
//

#import <AppKit/AppKit.h>

// MSInkImage is just a subclass of NSImage that is suitable for use in an MSInkableView

extern NSString *kNSImageObject;				// key used when serializing data
extern NSString *kMSInkImage;					// key to use when serializing data
extern NSString *MSInkImageDataPboardType; // paste board type used for sub items in MSInkArrayPboardType

@interface MSInkImage : NSImage
{
	NSBitmapImageFileType _type;
	NSDictionary			*_userElements;
}

// Initialize with either image data, or serialized binary data from -data;
- (MSInkImage*)initWithData:(NSData*)data;

// set the compresion type used when converting to binary data
// defaults to NSJPEGFileType
- (void)setType:(NSBitmapImageFileType)type;

- (void)drawAtPoint:(NSPoint)loc;

// If possibe, cache drawing to speed up drawAtPoint latter
- (void)cacheDrawing;

// Serialized binary representation of the image data
- (NSData*)data;

// userElements are whatever you set them to be. Though, you would do well to stick to serializable Dictionary elements if you want -data to serialize them for you. (See NSPropertyListSerialization class overview.)
- (NSDictionary*)userElements;
- (void) setUserElements:(NSDictionary*)userElements;

// Convenience method to get paste board type when deal with many ink objects without having to check thier class 
- (NSString*)pasteBoardType;
@end
