Repository navigation
Expand file tree
/
Copy pathWDSVGParserStateStack.h
More file actions
67 lines (56 loc) · 2.43 KB
/
Copy pathWDSVGParserStateStack.h
File metadata and controls
67 lines (56 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//
// WDSVGParserStateStack.h
// Inkpad
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Original implementation by Scott Vachalek
//
// Copyright (c) 2011-2013 Steve Sprang
//
#import <Foundation/Foundation.h>
#import "WDSVGParserState.h"
@protocol WDErrorReporter
- (void) reportError:(NSString *)message, ...;
- (int) errorCount;
- (void) reportMemoryWarning;
- (BOOL) memoryWarning;
@end
@interface WDSVGParserStateStack : NSObject <WDErrorReporter> {
int errorCount_;
BOOL memoryWarning_;
NSMutableArray *stack_;
}
@property (weak, nonatomic, readonly) NSMutableArray *group;
@property (weak, nonatomic, readonly) WDSVGElement *svgElement;
@property (nonatomic, assign) CGAffineTransform transform;
@property (nonatomic, assign) CGAffineTransform viewBoxTransform;
@property (nonatomic, assign) CGRect viewport;
@property (nonatomic, strong) WDElement *wdElement;
- (void) startElement:(WDSVGElement *)element;
- (WDElement *) endElement;
- (WDSVGParserState *) stateAtDepth:(int)depth;
- (float) viewWidth;
- (float) viewHeight;
- (float) viewRadius;
- (NSString *) style:(NSString *)name;
- (NSString *) attribute:(NSString *)name;
- (NSString *) attribute:(NSString *)name withDefault:(NSString *)deft;
- (float) coordinate:(NSString *)key withBound:(float)bound andDefault:(float)deft;
- (float) coordinate:(NSString *)key withBound:(float)bound;
- (float) lengthFromString:(NSString *)source withBound:(float)bound andDefault:(float)deft;
- (float) length:(NSString *)key withBound:(float)bound andDefault:(float)deft;
- (float) length:(NSString *)key withBound:(float)bound;
- (NSArray *) numberList:(NSString *)key;
- (NSArray *) coordinateList:(NSString *)key;
- (NSArray *) lengthList:(NSString *)key withBound:(float)bound;
- (CGPoint) x:(NSString *)xKey y:(NSString *)yKey withDefault:(CGPoint)deft;
- (CGPoint) x:(NSString *)xKey y:(NSString *)yKey;
- (CGSize) width:(NSString *)widthKey height:(NSString *)heightKey;
- (CGRect) x:(NSString *)xKey y:(NSString *)yKey width:(NSString *)widthKey height:(NSString *)heightKey withDefault:(CGRect)deft;
- (CGRect) x:(NSString *)xKey y:(NSString *)yKey width:(NSString *)widthKey height:(NSString *)heightKey;
- (NSString *) idFromIRI:(NSString *)key;
- (NSString *) idFromFuncIRI:(NSString *)key;
@end