forked from sprang/Inkpad
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWDSVGElement.h
More file actions
49 lines (42 loc) · 1.97 KB
/
Copy pathWDSVGElement.h
File metadata and controls
49 lines (42 loc) · 1.97 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
//
// WDSVGElement.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>
@protocol WDErrorReporter;
@interface WDSVGElement : NSObject {
NSString *name_;
NSDictionary *attributes_;
NSMutableArray *children_;
NSMutableString *text_;
}
@property (nonatomic, readonly) NSString *name;
@property (nonatomic, readonly) NSDictionary *attributes;
@property (weak, nonatomic, readonly) NSMutableArray *children;
@property (weak, nonatomic, readonly) NSMutableString *text;
- (WDSVGElement *) initWithName:(NSString *)name andAttributes:(NSDictionary *)attributes;
- (NSString *) attribute:(NSString *)name withDefault:(NSString *)deft;
- (NSString *) attribute:(NSString *)name;
- (float) coordinate:(NSString *)key withBound:(float)bound andDefault:(float)deft;
- (float) coordinate:(NSString *)source 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 *) numberListFromString:(NSString *)source;
- (NSArray *) numberList:(NSString *)key;
- (NSArray *) coordinateList:(NSString *)key;
+ (NSArray *) lengthListFromString:(NSString *)key withBound:(float)bound;
- (NSArray *) lengthList:(NSString *)key withBound:(float)bound;
- (CGPoint) x:(NSString *)xKey y:(NSString *)yKey withBounds:(CGSize)bounds andDefault:(CGPoint)deft;
- (CGPoint) x:(NSString *)xKey y:(NSString *)yKey withBounds:(CGSize)bounds;
- (NSString *) idFromIRI:(NSString *)key withReporter:(id<WDErrorReporter>)reporter;
- (NSString *) idFromFuncIRI:(NSString *)key withReporter:(id<WDErrorReporter>)reporter;
@end