SVGKImageRep.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // SVGKitImageRep.h
  3. // SVGKit
  4. //
  5. // Created by C.W. Betts on 12/5/12.
  6. //
  7. //
  8. #import <Cocoa/Cocoa.h>
  9. @class SVGKImage;
  10. @class SVGKSource;
  11. @interface SVGKImageRep : NSImageRep
  12. @property (nonatomic, strong, readonly) SVGKImage *image;
  13. //Function used by NSImageRep to init.
  14. + (instancetype)imageRepWithData:(NSData *)d;
  15. + (instancetype)imageRepWithContentsOfFile:(NSString *)filename;
  16. + (instancetype)imageRepWithContentsOfURL:(NSURL *)url;
  17. + (instancetype)imageRepWithSVGImage:(SVGKImage*)theImage;
  18. + (instancetype)imageRepWithSVGSource:(SVGKSource*)theSource;
  19. - (instancetype)initWithData:(NSData *)theData;
  20. - (instancetype)initWithContentsOfURL:(NSURL *)theURL;
  21. - (instancetype)initWithContentsOfFile:(NSString *)thePath;
  22. - (instancetype)initWithSVGString:(NSString *)theString;
  23. - (instancetype)initWithSVGImage:(SVGKImage*)theImage;
  24. - (instancetype)initWithSVGSource:(SVGKSource*)theSource;
  25. - (NSData *)TIFFRepresentation;
  26. - (NSData *)TIFFRepresentationWithSize:(NSSize)theSize;
  27. - (NSData *)TIFFRepresentationUsingCompression:(NSTIFFCompression)comp factor:(float)factor;
  28. - (NSData *)TIFFRepresentationUsingCompression:(NSTIFFCompression)comp factor:(float)factor size:(NSSize)asize;
  29. + (void)loadSVGKImageRep;
  30. + (void)unloadSVGKImageRep;
  31. @end