forked from pocketsvg/PocketSVG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SVGLayer.h
64 lines (48 loc) · 1.28 KB
/
SVGLayer.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* This file is part of the PocketSVG package.
* Copyright (c) Ponderwell, Ariel Elkin, Fjölnir Ásgeirsson, and Contributors
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#import <QuartzCore/QuartzCore.h>
NS_ASSUME_NONNULL_BEGIN
@class SVGBezierPath;
/*!
* @brief A CALayer subclass that renders an SVG file.
*
*/
@interface SVGLayer : CALayer
/*!
* @brief Initialises a layer that renders the SVG file at the URL.
*
* @param url The URL of the SVG file.
*
*/
- (instancetype)initWithContentsOfURL:(NSURL *)url;
/*!
* @brief The SVG paths the layer should draw.
*
*/
@property (nonatomic, copy) NSArray<SVGBezierPath*> *paths;
/*!
* @brief A color to fill the SVG shape with.
*
* @discussion Setting this property solidly fills the shape formed by the SVG path with the given color.
*
*/
@property(nonatomic) CGColorRef fillColor;
/*!
* @brief The color to stroke the path with.
*
* @discussion Setting this property solidly colors the path generated by the SVG file.
*
*/
@property(nonatomic) CGColorRef strokeColor;
/*!
* @brief Specifies whether line thickness should be scaled when scaling paths.
*
*/
@property(nonatomic) BOOL scaleLineWidth;
@end
NS_ASSUME_NONNULL_END