annotate dstep/applicationservices/coregraphics/CGPath.d @ 27:57371c29ef73 default tip

ObjcWrap is now automatically mixed in. Added support for building as a dylib with DMD.
author Jacob Carlborg <doob@me.com>
date Fri, 09 Apr 2010 23:00:22 +0200
parents 9f0b49a2f64e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
1 /**
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
3 * Authors: Jacob Carlborg
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
4 * Version: Initial created: Aug 1, 2009
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
6 */
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
7 module dstep.applicationservices.coregraphics.CGPath;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
8
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
9 import dstep.corefoundation.CFBase;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
10 import dstep.applicationservices.coregraphics.CGAffineTransform;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
11 import dstep.applicationservices.coregraphics.CGBase;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
12 import dstep.applicationservices.coregraphics.CGGeometry;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
13
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
14 struct CGPath;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
15
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
16 alias CGPath* CGMutablePathRef;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
17 alias CGPath* CGPathRef;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
18 alias int CGPathElementType;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
20 extern (C)
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
21 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
22 alias void function (void*, CGPathElement*) CGPathApplierFunction;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
23 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
24
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
25 enum /*CGPathElementType*/
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
26 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
27 kCGPathElementMoveToPoint,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
28 kCGPathElementAddLineToPoint,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
29 kCGPathElementAddQuadCurveToPoint,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
30 kCGPathElementAddCurveToPoint,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
31 kCGPathElementCloseSubpath
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
32 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
33
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
34 struct CGPathElement
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
35 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
36 int type;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
37 CGPoint* points;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
39
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
40 extern (C)
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
41 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
42 uint CGPathGetTypeID ();
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
43 CGMutablePathRef CGPathCreateMutable ();
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
44 CGPathRef CGPathCreateCopy (CGPathRef path);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
45 CGMutablePathRef CGPathCreateMutableCopy (CGPathRef path);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
46 CGPathRef CGPathRetain (CGPathRef path);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
47 void CGPathRelease (CGPathRef path);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
48 bool CGPathEqualToPath (CGPathRef path1, CGPathRef path2);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
49 void CGPathMoveToPoint (CGMutablePathRef path, CGAffineTransform* m, CGFloat x, CGFloat y);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
50 void CGPathAddLineToPoint (CGMutablePathRef path, CGAffineTransform* m, CGFloat x, CGFloat y);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
51 void CGPathAddQuadCurveToPoint (CGMutablePathRef path, CGAffineTransform* m, CGFloat cpx, CGFloat cpy, CGFloat x, CGFloat y);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
52 void CGPathAddCurveToPoint (CGMutablePathRef path, CGAffineTransform* m, CGFloat cp1x, CGFloat cp1y, CGFloat cp2x, CGFloat cp2y, CGFloat x, CGFloat y);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
53 void CGPathCloseSubpath (CGMutablePathRef path);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
54 void CGPathAddRect (CGMutablePathRef path, CGAffineTransform* m, CGRect rect);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
55 void CGPathAddRects (CGMutablePathRef path, CGAffineTransform* m, CGRect* rects, uint count);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
56 void CGPathAddLines (CGMutablePathRef path, CGAffineTransform* m, CGPoint* points, uint count);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
57 void CGPathAddEllipseInRect (CGMutablePathRef path, CGAffineTransform* m, CGRect rect);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
58 void CGPathAddArc (CGMutablePathRef path, CGAffineTransform* m, CGFloat x, CGFloat y, CGFloat radius, CGFloat startAngle, CGFloat endAngle, bool clockwise);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
59 void CGPathAddArcToPoint (CGMutablePathRef path, CGAffineTransform* m, CGFloat x1, CGFloat y1, CGFloat x2, CGFloat y2, CGFloat radius);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
60 void CGPathAddPath (CGMutablePathRef path1, CGAffineTransform* m, CGPathRef path2);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
61 bool CGPathIsEmpty (CGPathRef path);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
62 bool CGPathIsRect (CGPathRef path, CGRect* rect);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
63 CGPoint CGPathGetCurrentPoint (CGPathRef path);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
64 CGRect CGPathGetBoundingBox (CGPathRef path);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
65 bool CGPathContainsPoint (CGPathRef path, CGAffineTransform* m, CGPoint point, bool eoFill);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
66 void CGPathApply (CGPathRef path, void* info, CGPathApplierFunction function_);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
67 }