forked from SVGKit/SVGKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSVGTransform.h
More file actions
54 lines (44 loc) · 1.64 KB
/
Copy pathSVGTransform.h
File metadata and controls
54 lines (44 loc) · 1.64 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
/*!
http://www.w3.org/TR/SVG/coords.html#InterfaceSVGTransform
// Transform Types
const unsigned short SVG_TRANSFORM_UNKNOWN = 0;
const unsigned short SVG_TRANSFORM_MATRIX = 1;
const unsigned short SVG_TRANSFORM_TRANSLATE = 2;
const unsigned short SVG_TRANSFORM_SCALE = 3;
const unsigned short SVG_TRANSFORM_ROTATE = 4;
const unsigned short SVG_TRANSFORM_SKEWX = 5;
const unsigned short SVG_TRANSFORM_SKEWY = 6;
readonly attribute unsigned short type;
readonly attribute SVGMatrix matrix;
readonly attribute float angle;
void setMatrix(in SVGMatrix matrix) raises(DOMException);
void setTranslate(in float tx, in float ty) raises(DOMException);
void setScale(in float sx, in float sy) raises(DOMException);
void setRotate(in float angle, in float cx, in float cy) raises(DOMException);
void setSkewX(in float angle) raises(DOMException);
void setSkewY(in float angle) raises(DOMException);
*/
#import <Foundation/Foundation.h>
#import "SVGMatrix.h"
@interface SVGTransform : NSObject
/*! Transform Types */
typedef enum SVGKTransformType
{
SVG_TRANSFORM_UNKNOWN = 0,
SVG_TRANSFORM_MATRIX = 1,
SVG_TRANSFORM_TRANSLATE = 2,
SVG_TRANSFORM_SCALE = 3,
SVG_TRANSFORM_ROTATE = 4,
SVG_TRANSFORM_SKEWX = 5,
SVG_TRANSFORM_SKEWY = 6
} SVGKTransformType;
@property(nonatomic) SVGKTransformType type;
@property(nonatomic,retain) SVGMatrix* matrix;
@property(nonatomic,readonly) float angle;
-(void) setMatrix:(SVGMatrix*) matrix;
-(void) setTranslate:(float) tx ty:(float) ty;
-(void) setScale:(float) sx sy:(float) sy;
-(void) setRotate:(float) angle cx:(float) cx cy:(float) cy;
-(void) setSkewX:(float) angle;
-(void) setSkewY:(float) angle;
@end