forked from fjolnir/SVGPathSerializing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SVGPathSerializing.h
executable file
·49 lines (40 loc) · 1.3 KB
/
SVGPathSerializing.h
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
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#ifdef __cplusplus
extern "C" {
#endif
/*!
* Returns an array of CGPathRefs contained within the passed SVG string.
*
* @param svgString The string containing the SVG formatted path.
* @param attributes An optional pointer for storing a map table containing SVG attributes for the paths
*
* @return An array of CGPathRef objects or nil if none are found
*/
NSArray *CGPathsFromSVGString(NSString *svgString, NSMapTable **attributes);
/*!
* Returns SVG representing `paths`
*
* @param paths An array of CGPathRefs to construct the SVG from
* @param attributes An optional map table of SVG attributes for the paths
*
* @return SVG representing `paths`
*/
NSString *SVGStringFromCGPaths(NSArray *paths, NSMapTable *attributes);
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
@interface UIBezierPath (SVGPathSerializing)
+ (NSArray *)svg_pathsFromContentsOfSVGFile:(NSString *)aPath;
+ (NSArray *)svg_pathsFromSVGString:(NSString *)svgString;
- (NSString *)svg_SVGRepresentation;
@end
#endif
@interface NSValue (SVGPathSerializing)
+ (instancetype)svg_valueWithCGAffineTransform:(CGAffineTransform)aTransform;
- (CGAffineTransform)svg_CGAffineTransformValue;
@end
#import "SVGImageView.h"
#import "SVGLayer.h"
#ifdef __cplusplus
};
#endif