Files
IJSVG/source/IJSVG.h
T
Curtis Hard b27eabcd29 added imageWithSize:flipped: and so on
- Also fixed a bug with rect's attributes being removed now I have changed how the DEF's and reusable elements are being parsed and rendered
2016-06-01 12:07:38 +01:00

82 lines
2.3 KiB
Objective-C

//
// IJSVGImage.h
// IconJar
//
// Created by Curtis Hard on 30/08/2014.
// Copyright (c) 2014 Curtis Hard. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "IJSVGParser.h"
#import "IJSVGBezierPathAdditions.h"
@class IJSVG;
@protocol IJSVGDelegate <NSObject,IJSVGParserDelegate>
@optional
- (BOOL)svg:(IJSVG *)svg
shouldHandleForeignObject:(IJSVGForeignObject *)foreignObject;
- (void)svg:(IJSVG *)svg
handleForeignObject:(IJSVGForeignObject *)foreignObject
document:(NSXMLDocument *)document;
@end
@interface IJSVG : NSObject <NSPasteboardWriting> {
@private
IJSVGParser * _group;
CGFloat _scale;
CGFloat _clipScale;
NSMutableArray * _colors;
id<IJSVGDelegate> _delegate;
}
+ (NSColor *)baseColor;
- (BOOL)isFont;
- (NSArray *)glyphs;
+ (void)setBaseColor:(NSColor *)color;
+ (id)svgNamed:(NSString *)string;
+ (id)svgNamed:(NSString *)string
delegate:(id<IJSVGDelegate>)delegate;
- (id)initWithFile:(NSString *)file;
- (id)initWithFile:(NSString *)file
error:(NSError **)error;
- (id)initWithFile:(NSString *)file
delegate:(id<IJSVGDelegate>)delegate;
- (id)initWithFile:(NSString *)file
error:(NSError **)error
delegate:(id<IJSVGDelegate>)delegate;
- (id)initWithFilePathURL:(NSURL *)aURL;
- (id)initWithFilePathURL:(NSURL *)aURL
error:(NSError **)error;
- (id)initWithFilePathURL:(NSURL *)aURL
delegate:(id<IJSVGDelegate>)delegate;
- (id)initWithFilePathURL:(NSURL *)aURL
error:(NSError **)error
delegate:(id<IJSVGDelegate>)delegate;
- (NSImage *)imageWithSize:(NSSize)aSize;
- (NSImage *)imageWithSize:(NSSize)aSize
error:(NSError **)error;
- (NSImage *)imageWithSize:(NSSize)aSize
flipped:(BOOL)flipped;
- (BOOL)drawAtPoint:(NSPoint)point
size:(NSSize)size;
- (BOOL)drawAtPoint:(NSPoint)point
size:(NSSize)aSize
error:(NSError **)error;
- (BOOL)drawInRect:(NSRect)rect;
- (BOOL)drawInRect:(NSRect)rect
error:(NSError **)error;
- (NSArray *)colors;
- (NSData *)PDFData;
- (NSData *)PDFData:(NSError **)error;
- (NSData *)PDFDataWithRect:(NSRect)rect;
- (NSData *)PDFDataWithRect:(NSRect)rect
error:(NSError **)error;
@end