Mercurial > cpython-lru_cache-weakref
annotate Mac/Modules/cg/_CGmodule.c @ 79675:c0a2294de787 2.7
Issue #16199: Backport 2to3 typo fix from 3.2.
| author | Chris Jerdonek <chris.jerdonek@gmail.com> |
|---|---|
| date | Thu, 11 Oct 2012 16:15:46 -0700 |
| parents | fd25030223b0 |
| children |
| rev | line source |
|---|---|
| 21386 | 1 |
| 2 /* =========================== Module _CG =========================== */ | |
| 3 | |
| 4 #include "Python.h" | |
| 5 | |
| 6 | |
| 7 | |
| 8 #include "pymactoolbox.h" | |
| 9 | |
| 10 /* Macro to test whether a weak-loaded CFM function exists */ | |
| 11 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
12 PyErr_SetString(PyExc_NotImplementedError, \ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
13 "Not available in this shared library/OS version"); \ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
14 return NULL; \ |
| 21386 | 15 }} while(0) |
| 16 | |
| 17 | |
|
21390
96bbb3d0c6a0
include the proper header for Mach-O
Just van Rossum <just@letterror.com>
parents:
21386
diff
changeset
|
18 #include <ApplicationServices/ApplicationServices.h> |
| 21386 | 19 |
| 20 extern int GrafObj_Convert(PyObject *, GrafPtr *); | |
| 21 | |
| 22 /* | |
| 23 ** Manual converters | |
| 24 */ | |
| 25 | |
| 26 PyObject *CGPoint_New(CGPoint *itself) | |
| 27 { | |
| 28 | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
29 return Py_BuildValue("(ff)", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
30 itself->x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
31 itself->y); |
| 21386 | 32 } |
| 33 | |
| 34 int | |
| 35 CGPoint_Convert(PyObject *v, CGPoint *p_itself) | |
| 36 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
37 if( !PyArg_Parse(v, "(ff)", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
38 &p_itself->x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
39 &p_itself->y) ) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
40 return 0; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
41 return 1; |
| 21386 | 42 } |
| 43 | |
| 44 PyObject *CGRect_New(CGRect *itself) | |
| 45 { | |
| 46 | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
47 return Py_BuildValue("(ffff)", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
48 itself->origin.x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
49 itself->origin.y, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
50 itself->size.width, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
51 itself->size.height); |
| 21386 | 52 } |
| 53 | |
| 54 int | |
| 55 CGRect_Convert(PyObject *v, CGRect *p_itself) | |
| 56 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
57 if( !PyArg_Parse(v, "(ffff)", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
58 &p_itself->origin.x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
59 &p_itself->origin.y, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
60 &p_itself->size.width, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
61 &p_itself->size.height) ) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
62 return 0; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
63 return 1; |
| 21386 | 64 } |
| 65 | |
| 66 PyObject *CGAffineTransform_New(CGAffineTransform *itself) | |
| 67 { | |
| 68 | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
69 return Py_BuildValue("(ffffff)", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
70 itself->a, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
71 itself->b, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
72 itself->c, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
73 itself->d, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
74 itself->tx, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
75 itself->ty); |
| 21386 | 76 } |
| 77 | |
| 78 int | |
| 79 CGAffineTransform_Convert(PyObject *v, CGAffineTransform *p_itself) | |
| 80 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
81 if( !PyArg_Parse(v, "(ffffff)", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
82 &p_itself->a, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
83 &p_itself->b, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
84 &p_itself->c, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
85 &p_itself->d, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
86 &p_itself->tx, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
87 &p_itself->ty) ) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
88 return 0; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
89 return 1; |
| 21386 | 90 } |
| 91 | |
| 92 static PyObject *CG_Error; | |
| 93 | |
| 94 /* -------------------- Object type CGContextRef -------------------- */ | |
| 95 | |
| 96 PyTypeObject CGContextRef_Type; | |
| 97 | |
|
26720
a12e1727850a
Regenerated with inheritance-aware xxxx_Check() macros.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26524
diff
changeset
|
98 #define CGContextRefObj_Check(x) ((x)->ob_type == &CGContextRef_Type || PyObject_TypeCheck((x), &CGContextRef_Type)) |
| 21386 | 99 |
| 100 typedef struct CGContextRefObject { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
101 PyObject_HEAD |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
102 CGContextRef ob_itself; |
| 21386 | 103 } CGContextRefObject; |
| 104 | |
| 105 PyObject *CGContextRefObj_New(CGContextRef itself) | |
| 106 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
107 CGContextRefObject *it; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
108 it = PyObject_NEW(CGContextRefObject, &CGContextRef_Type); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
109 if (it == NULL) return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
110 it->ob_itself = itself; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
111 return (PyObject *)it; |
| 21386 | 112 } |
|
35200
5df1c692bb41
Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents:
31091
diff
changeset
|
113 |
| 21386 | 114 int CGContextRefObj_Convert(PyObject *v, CGContextRef *p_itself) |
| 115 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
116 if (!CGContextRefObj_Check(v)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
117 { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
118 PyErr_SetString(PyExc_TypeError, "CGContextRef required"); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
119 return 0; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
120 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
121 *p_itself = ((CGContextRefObject *)v)->ob_itself; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
122 return 1; |
| 21386 | 123 } |
| 124 | |
| 125 static void CGContextRefObj_dealloc(CGContextRefObject *self) | |
| 126 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
127 CGContextRelease(self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
128 self->ob_type->tp_free((PyObject *)self); |
| 21386 | 129 } |
| 130 | |
| 131 static PyObject *CGContextRefObj_CGContextSaveGState(CGContextRefObject *_self, PyObject *_args) | |
| 132 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
133 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
134 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
135 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
136 CGContextSaveGState(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
137 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
138 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
139 return _res; |
| 21386 | 140 } |
| 141 | |
| 142 static PyObject *CGContextRefObj_CGContextRestoreGState(CGContextRefObject *_self, PyObject *_args) | |
| 143 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
144 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
145 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
146 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
147 CGContextRestoreGState(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
148 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
149 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
150 return _res; |
| 21386 | 151 } |
| 152 | |
| 153 static PyObject *CGContextRefObj_CGContextScaleCTM(CGContextRefObject *_self, PyObject *_args) | |
| 154 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
155 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
156 float sx; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
157 float sy; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
158 if (!PyArg_ParseTuple(_args, "ff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
159 &sx, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
160 &sy)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
161 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
162 CGContextScaleCTM(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
163 sx, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
164 sy); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
165 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
166 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
167 return _res; |
| 21386 | 168 } |
| 169 | |
| 170 static PyObject *CGContextRefObj_CGContextTranslateCTM(CGContextRefObject *_self, PyObject *_args) | |
| 171 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
172 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
173 float tx; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
174 float ty; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
175 if (!PyArg_ParseTuple(_args, "ff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
176 &tx, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
177 &ty)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
178 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
179 CGContextTranslateCTM(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
180 tx, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
181 ty); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
182 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
183 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
184 return _res; |
| 21386 | 185 } |
| 186 | |
| 187 static PyObject *CGContextRefObj_CGContextRotateCTM(CGContextRefObject *_self, PyObject *_args) | |
| 188 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
189 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
190 float angle; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
191 if (!PyArg_ParseTuple(_args, "f", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
192 &angle)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
193 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
194 CGContextRotateCTM(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
195 angle); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
196 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
197 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
198 return _res; |
| 21386 | 199 } |
| 200 | |
| 201 static PyObject *CGContextRefObj_CGContextConcatCTM(CGContextRefObject *_self, PyObject *_args) | |
| 202 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
203 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
204 CGAffineTransform transform; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
205 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
206 CGAffineTransform_Convert, &transform)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
207 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
208 CGContextConcatCTM(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
209 transform); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
210 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
211 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
212 return _res; |
| 21386 | 213 } |
| 214 | |
| 215 static PyObject *CGContextRefObj_CGContextGetCTM(CGContextRefObject *_self, PyObject *_args) | |
| 216 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
217 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
218 CGAffineTransform _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
219 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
220 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
221 _rv = CGContextGetCTM(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
222 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
223 CGAffineTransform_New, &_rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
224 return _res; |
| 21386 | 225 } |
| 226 | |
| 227 static PyObject *CGContextRefObj_CGContextSetLineWidth(CGContextRefObject *_self, PyObject *_args) | |
| 228 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
229 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
230 float width; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
231 if (!PyArg_ParseTuple(_args, "f", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
232 &width)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
233 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
234 CGContextSetLineWidth(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
235 width); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
236 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
237 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
238 return _res; |
| 21386 | 239 } |
| 240 | |
| 241 static PyObject *CGContextRefObj_CGContextSetLineCap(CGContextRefObject *_self, PyObject *_args) | |
| 242 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
243 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
244 int cap; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
245 if (!PyArg_ParseTuple(_args, "i", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
246 &cap)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
247 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
248 CGContextSetLineCap(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
249 cap); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
250 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
251 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
252 return _res; |
| 21386 | 253 } |
| 254 | |
| 255 static PyObject *CGContextRefObj_CGContextSetLineJoin(CGContextRefObject *_self, PyObject *_args) | |
| 256 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
257 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
258 int join; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
259 if (!PyArg_ParseTuple(_args, "i", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
260 &join)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
261 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
262 CGContextSetLineJoin(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
263 join); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
264 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
265 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
266 return _res; |
| 21386 | 267 } |
| 268 | |
| 269 static PyObject *CGContextRefObj_CGContextSetMiterLimit(CGContextRefObject *_self, PyObject *_args) | |
| 270 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
271 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
272 float limit; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
273 if (!PyArg_ParseTuple(_args, "f", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
274 &limit)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
275 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
276 CGContextSetMiterLimit(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
277 limit); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
278 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
279 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
280 return _res; |
| 21386 | 281 } |
| 282 | |
| 283 static PyObject *CGContextRefObj_CGContextSetFlatness(CGContextRefObject *_self, PyObject *_args) | |
| 284 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
285 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
286 float flatness; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
287 if (!PyArg_ParseTuple(_args, "f", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
288 &flatness)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
289 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
290 CGContextSetFlatness(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
291 flatness); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
292 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
293 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
294 return _res; |
| 21386 | 295 } |
| 296 | |
| 297 static PyObject *CGContextRefObj_CGContextSetAlpha(CGContextRefObject *_self, PyObject *_args) | |
| 298 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
299 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
300 float alpha; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
301 if (!PyArg_ParseTuple(_args, "f", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
302 &alpha)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
303 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
304 CGContextSetAlpha(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
305 alpha); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
306 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
307 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
308 return _res; |
| 21386 | 309 } |
| 310 | |
| 311 static PyObject *CGContextRefObj_CGContextBeginPath(CGContextRefObject *_self, PyObject *_args) | |
| 312 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
313 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
314 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
315 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
316 CGContextBeginPath(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
317 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
318 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
319 return _res; |
| 21386 | 320 } |
| 321 | |
| 322 static PyObject *CGContextRefObj_CGContextMoveToPoint(CGContextRefObject *_self, PyObject *_args) | |
| 323 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
324 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
325 float x; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
326 float y; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
327 if (!PyArg_ParseTuple(_args, "ff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
328 &x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
329 &y)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
330 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
331 CGContextMoveToPoint(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
332 x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
333 y); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
334 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
335 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
336 return _res; |
| 21386 | 337 } |
| 338 | |
| 339 static PyObject *CGContextRefObj_CGContextAddLineToPoint(CGContextRefObject *_self, PyObject *_args) | |
| 340 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
341 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
342 float x; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
343 float y; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
344 if (!PyArg_ParseTuple(_args, "ff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
345 &x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
346 &y)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
347 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
348 CGContextAddLineToPoint(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
349 x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
350 y); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
351 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
352 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
353 return _res; |
| 21386 | 354 } |
| 355 | |
| 356 static PyObject *CGContextRefObj_CGContextAddCurveToPoint(CGContextRefObject *_self, PyObject *_args) | |
| 357 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
358 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
359 float cp1x; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
360 float cp1y; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
361 float cp2x; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
362 float cp2y; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
363 float x; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
364 float y; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
365 if (!PyArg_ParseTuple(_args, "ffffff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
366 &cp1x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
367 &cp1y, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
368 &cp2x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
369 &cp2y, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
370 &x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
371 &y)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
372 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
373 CGContextAddCurveToPoint(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
374 cp1x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
375 cp1y, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
376 cp2x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
377 cp2y, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
378 x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
379 y); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
380 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
381 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
382 return _res; |
| 21386 | 383 } |
| 384 | |
| 385 static PyObject *CGContextRefObj_CGContextAddQuadCurveToPoint(CGContextRefObject *_self, PyObject *_args) | |
| 386 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
387 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
388 float cpx; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
389 float cpy; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
390 float x; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
391 float y; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
392 if (!PyArg_ParseTuple(_args, "ffff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
393 &cpx, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
394 &cpy, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
395 &x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
396 &y)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
397 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
398 CGContextAddQuadCurveToPoint(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
399 cpx, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
400 cpy, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
401 x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
402 y); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
403 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
404 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
405 return _res; |
| 21386 | 406 } |
| 407 | |
| 408 static PyObject *CGContextRefObj_CGContextClosePath(CGContextRefObject *_self, PyObject *_args) | |
| 409 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
410 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
411 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
412 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
413 CGContextClosePath(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
414 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
415 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
416 return _res; |
| 21386 | 417 } |
| 418 | |
| 419 static PyObject *CGContextRefObj_CGContextAddRect(CGContextRefObject *_self, PyObject *_args) | |
| 420 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
421 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
422 CGRect rect; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
423 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
424 CGRect_Convert, &rect)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
425 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
426 CGContextAddRect(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
427 rect); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
428 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
429 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
430 return _res; |
| 21386 | 431 } |
| 432 | |
| 433 static PyObject *CGContextRefObj_CGContextAddArc(CGContextRefObject *_self, PyObject *_args) | |
| 434 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
435 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
436 float x; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
437 float y; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
438 float radius; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
439 float startAngle; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
440 float endAngle; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
441 int clockwise; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
442 if (!PyArg_ParseTuple(_args, "fffffi", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
443 &x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
444 &y, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
445 &radius, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
446 &startAngle, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
447 &endAngle, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
448 &clockwise)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
449 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
450 CGContextAddArc(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
451 x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
452 y, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
453 radius, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
454 startAngle, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
455 endAngle, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
456 clockwise); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
457 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
458 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
459 return _res; |
| 21386 | 460 } |
| 461 | |
| 462 static PyObject *CGContextRefObj_CGContextAddArcToPoint(CGContextRefObject *_self, PyObject *_args) | |
| 463 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
464 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
465 float x1; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
466 float y1; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
467 float x2; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
468 float y2; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
469 float radius; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
470 if (!PyArg_ParseTuple(_args, "fffff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
471 &x1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
472 &y1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
473 &x2, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
474 &y2, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
475 &radius)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
476 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
477 CGContextAddArcToPoint(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
478 x1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
479 y1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
480 x2, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
481 y2, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
482 radius); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
483 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
484 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
485 return _res; |
| 21386 | 486 } |
| 487 | |
| 488 static PyObject *CGContextRefObj_CGContextIsPathEmpty(CGContextRefObject *_self, PyObject *_args) | |
| 489 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
490 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
491 int _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
492 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
493 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
494 _rv = CGContextIsPathEmpty(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
495 _res = Py_BuildValue("i", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
496 _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
497 return _res; |
| 21386 | 498 } |
| 499 | |
| 500 static PyObject *CGContextRefObj_CGContextGetPathCurrentPoint(CGContextRefObject *_self, PyObject *_args) | |
| 501 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
502 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
503 CGPoint _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
504 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
505 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
506 _rv = CGContextGetPathCurrentPoint(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
507 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
508 CGPoint_New, &_rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
509 return _res; |
| 21386 | 510 } |
| 511 | |
| 512 static PyObject *CGContextRefObj_CGContextGetPathBoundingBox(CGContextRefObject *_self, PyObject *_args) | |
| 513 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
514 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
515 CGRect _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
516 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
517 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
518 _rv = CGContextGetPathBoundingBox(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
519 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
520 CGRect_New, &_rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
521 return _res; |
| 21386 | 522 } |
| 523 | |
| 524 static PyObject *CGContextRefObj_CGContextDrawPath(CGContextRefObject *_self, PyObject *_args) | |
| 525 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
526 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
527 int mode; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
528 if (!PyArg_ParseTuple(_args, "i", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
529 &mode)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
530 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
531 CGContextDrawPath(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
532 mode); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
533 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
534 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
535 return _res; |
| 21386 | 536 } |
| 537 | |
| 538 static PyObject *CGContextRefObj_CGContextFillPath(CGContextRefObject *_self, PyObject *_args) | |
| 539 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
540 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
541 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
542 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
543 CGContextFillPath(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
544 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
545 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
546 return _res; |
| 21386 | 547 } |
| 548 | |
| 549 static PyObject *CGContextRefObj_CGContextEOFillPath(CGContextRefObject *_self, PyObject *_args) | |
| 550 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
551 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
552 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
553 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
554 CGContextEOFillPath(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
555 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
556 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
557 return _res; |
| 21386 | 558 } |
| 559 | |
| 560 static PyObject *CGContextRefObj_CGContextStrokePath(CGContextRefObject *_self, PyObject *_args) | |
| 561 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
562 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
563 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
564 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
565 CGContextStrokePath(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
566 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
567 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
568 return _res; |
| 21386 | 569 } |
| 570 | |
| 571 static PyObject *CGContextRefObj_CGContextFillRect(CGContextRefObject *_self, PyObject *_args) | |
| 572 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
573 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
574 CGRect rect; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
575 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
576 CGRect_Convert, &rect)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
577 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
578 CGContextFillRect(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
579 rect); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
580 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
581 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
582 return _res; |
| 21386 | 583 } |
| 584 | |
| 585 static PyObject *CGContextRefObj_CGContextStrokeRect(CGContextRefObject *_self, PyObject *_args) | |
| 586 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
587 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
588 CGRect rect; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
589 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
590 CGRect_Convert, &rect)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
591 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
592 CGContextStrokeRect(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
593 rect); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
594 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
595 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
596 return _res; |
| 21386 | 597 } |
| 598 | |
| 599 static PyObject *CGContextRefObj_CGContextStrokeRectWithWidth(CGContextRefObject *_self, PyObject *_args) | |
| 600 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
601 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
602 CGRect rect; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
603 float width; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
604 if (!PyArg_ParseTuple(_args, "O&f", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
605 CGRect_Convert, &rect, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
606 &width)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
607 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
608 CGContextStrokeRectWithWidth(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
609 rect, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
610 width); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
611 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
612 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
613 return _res; |
| 21386 | 614 } |
| 615 | |
| 616 static PyObject *CGContextRefObj_CGContextClearRect(CGContextRefObject *_self, PyObject *_args) | |
| 617 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
618 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
619 CGRect rect; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
620 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
621 CGRect_Convert, &rect)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
622 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
623 CGContextClearRect(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
624 rect); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
625 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
626 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
627 return _res; |
| 21386 | 628 } |
| 629 | |
| 630 static PyObject *CGContextRefObj_CGContextClip(CGContextRefObject *_self, PyObject *_args) | |
| 631 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
632 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
633 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
634 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
635 CGContextClip(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
636 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
637 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
638 return _res; |
| 21386 | 639 } |
| 640 | |
| 641 static PyObject *CGContextRefObj_CGContextEOClip(CGContextRefObject *_self, PyObject *_args) | |
| 642 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
643 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
644 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
645 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
646 CGContextEOClip(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
647 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
648 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
649 return _res; |
| 21386 | 650 } |
| 651 | |
| 652 static PyObject *CGContextRefObj_CGContextClipToRect(CGContextRefObject *_self, PyObject *_args) | |
| 653 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
654 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
655 CGRect rect; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
656 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
657 CGRect_Convert, &rect)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
658 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
659 CGContextClipToRect(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
660 rect); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
661 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
662 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
663 return _res; |
| 21386 | 664 } |
| 665 | |
| 666 static PyObject *CGContextRefObj_CGContextSetGrayFillColor(CGContextRefObject *_self, PyObject *_args) | |
| 667 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
668 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
669 float gray; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
670 float alpha; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
671 if (!PyArg_ParseTuple(_args, "ff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
672 &gray, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
673 &alpha)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
674 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
675 CGContextSetGrayFillColor(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
676 gray, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
677 alpha); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
678 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
679 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
680 return _res; |
| 21386 | 681 } |
| 682 | |
| 683 static PyObject *CGContextRefObj_CGContextSetGrayStrokeColor(CGContextRefObject *_self, PyObject *_args) | |
| 684 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
685 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
686 float gray; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
687 float alpha; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
688 if (!PyArg_ParseTuple(_args, "ff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
689 &gray, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
690 &alpha)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
691 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
692 CGContextSetGrayStrokeColor(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
693 gray, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
694 alpha); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
695 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
696 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
697 return _res; |
| 21386 | 698 } |
| 699 | |
| 700 static PyObject *CGContextRefObj_CGContextSetRGBFillColor(CGContextRefObject *_self, PyObject *_args) | |
| 701 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
702 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
703 float red; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
704 float green; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
705 float blue; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
706 float alpha; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
707 if (!PyArg_ParseTuple(_args, "ffff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
708 &red, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
709 &green, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
710 &blue, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
711 &alpha)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
712 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
713 CGContextSetRGBFillColor(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
714 red, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
715 green, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
716 blue, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
717 alpha); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
718 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
719 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
720 return _res; |
| 21386 | 721 } |
| 722 | |
| 723 static PyObject *CGContextRefObj_CGContextSetRGBStrokeColor(CGContextRefObject *_self, PyObject *_args) | |
| 724 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
725 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
726 float red; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
727 float green; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
728 float blue; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
729 float alpha; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
730 if (!PyArg_ParseTuple(_args, "ffff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
731 &red, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
732 &green, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
733 &blue, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
734 &alpha)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
735 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
736 CGContextSetRGBStrokeColor(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
737 red, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
738 green, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
739 blue, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
740 alpha); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
741 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
742 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
743 return _res; |
| 21386 | 744 } |
| 745 | |
| 746 static PyObject *CGContextRefObj_CGContextSetCMYKFillColor(CGContextRefObject *_self, PyObject *_args) | |
| 747 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
748 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
749 float cyan; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
750 float magenta; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
751 float yellow; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
752 float black; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
753 float alpha; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
754 if (!PyArg_ParseTuple(_args, "fffff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
755 &cyan, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
756 &magenta, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
757 &yellow, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
758 &black, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
759 &alpha)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
760 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
761 CGContextSetCMYKFillColor(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
762 cyan, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
763 magenta, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
764 yellow, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
765 black, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
766 alpha); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
767 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
768 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
769 return _res; |
| 21386 | 770 } |
| 771 | |
| 772 static PyObject *CGContextRefObj_CGContextSetCMYKStrokeColor(CGContextRefObject *_self, PyObject *_args) | |
| 773 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
774 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
775 float cyan; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
776 float magenta; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
777 float yellow; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
778 float black; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
779 float alpha; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
780 if (!PyArg_ParseTuple(_args, "fffff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
781 &cyan, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
782 &magenta, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
783 &yellow, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
784 &black, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
785 &alpha)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
786 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
787 CGContextSetCMYKStrokeColor(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
788 cyan, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
789 magenta, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
790 yellow, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
791 black, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
792 alpha); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
793 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
794 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
795 return _res; |
| 21386 | 796 } |
| 797 | |
|
31091
3861eb467c29
Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents:
30982
diff
changeset
|
798 static PyObject *CGContextRefObj_CGContextGetInterpolationQuality(CGContextRefObject *_self, PyObject *_args) |
|
3861eb467c29
Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents:
30982
diff
changeset
|
799 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
800 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
801 int _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
802 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
803 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
804 _rv = CGContextGetInterpolationQuality(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
805 _res = Py_BuildValue("i", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
806 _rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
807 return _res; |
|
31091
3861eb467c29
Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents:
30982
diff
changeset
|
808 } |
|
3861eb467c29
Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents:
30982
diff
changeset
|
809 |
|
3861eb467c29
Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents:
30982
diff
changeset
|
810 static PyObject *CGContextRefObj_CGContextSetInterpolationQuality(CGContextRefObject *_self, PyObject *_args) |
|
3861eb467c29
Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents:
30982
diff
changeset
|
811 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
812 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
813 int quality; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
814 if (!PyArg_ParseTuple(_args, "i", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
815 &quality)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
816 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
817 CGContextSetInterpolationQuality(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
818 quality); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
819 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
820 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
821 return _res; |
|
31091
3861eb467c29
Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents:
30982
diff
changeset
|
822 } |
|
3861eb467c29
Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Jack Jansen <jack.jansen@cwi.nl>
parents:
30982
diff
changeset
|
823 |
| 21386 | 824 static PyObject *CGContextRefObj_CGContextSetCharacterSpacing(CGContextRefObject *_self, PyObject *_args) |
| 825 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
826 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
827 float spacing; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
828 if (!PyArg_ParseTuple(_args, "f", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
829 &spacing)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
830 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
831 CGContextSetCharacterSpacing(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
832 spacing); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
833 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
834 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
835 return _res; |
| 21386 | 836 } |
| 837 | |
| 838 static PyObject *CGContextRefObj_CGContextSetTextPosition(CGContextRefObject *_self, PyObject *_args) | |
| 839 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
840 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
841 float x; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
842 float y; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
843 if (!PyArg_ParseTuple(_args, "ff", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
844 &x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
845 &y)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
846 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
847 CGContextSetTextPosition(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
848 x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
849 y); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
850 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
851 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
852 return _res; |
| 21386 | 853 } |
| 854 | |
| 855 static PyObject *CGContextRefObj_CGContextGetTextPosition(CGContextRefObject *_self, PyObject *_args) | |
| 856 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
857 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
858 CGPoint _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
859 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
860 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
861 _rv = CGContextGetTextPosition(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
862 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
863 CGPoint_New, &_rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
864 return _res; |
| 21386 | 865 } |
| 866 | |
| 867 static PyObject *CGContextRefObj_CGContextSetTextMatrix(CGContextRefObject *_self, PyObject *_args) | |
| 868 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
869 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
870 CGAffineTransform transform; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
871 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
872 CGAffineTransform_Convert, &transform)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
873 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
874 CGContextSetTextMatrix(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
875 transform); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
876 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
877 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
878 return _res; |
| 21386 | 879 } |
| 880 | |
| 881 static PyObject *CGContextRefObj_CGContextGetTextMatrix(CGContextRefObject *_self, PyObject *_args) | |
| 882 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
883 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
884 CGAffineTransform _rv; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
885 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
886 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
887 _rv = CGContextGetTextMatrix(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
888 _res = Py_BuildValue("O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
889 CGAffineTransform_New, &_rv); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
890 return _res; |
| 21386 | 891 } |
| 892 | |
| 893 static PyObject *CGContextRefObj_CGContextSetTextDrawingMode(CGContextRefObject *_self, PyObject *_args) | |
| 894 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
895 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
896 int mode; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
897 if (!PyArg_ParseTuple(_args, "i", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
898 &mode)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
899 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
900 CGContextSetTextDrawingMode(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
901 mode); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
902 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
903 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
904 return _res; |
| 21386 | 905 } |
| 906 | |
| 907 static PyObject *CGContextRefObj_CGContextSetFontSize(CGContextRefObject *_self, PyObject *_args) | |
| 908 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
909 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
910 float size; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
911 if (!PyArg_ParseTuple(_args, "f", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
912 &size)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
913 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
914 CGContextSetFontSize(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
915 size); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
916 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
917 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
918 return _res; |
| 21386 | 919 } |
| 920 | |
| 921 static PyObject *CGContextRefObj_CGContextSelectFont(CGContextRefObject *_self, PyObject *_args) | |
| 922 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
923 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
924 char * name; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
925 float size; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
926 int textEncoding; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
927 if (!PyArg_ParseTuple(_args, "sfi", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
928 &name, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
929 &size, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
930 &textEncoding)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
931 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
932 CGContextSelectFont(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
933 name, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
934 size, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
935 textEncoding); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
936 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
937 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
938 return _res; |
| 21386 | 939 } |
| 940 | |
| 941 static PyObject *CGContextRefObj_CGContextShowText(CGContextRefObject *_self, PyObject *_args) | |
| 942 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
943 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
944 char *cstring__in__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
945 long cstring__len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
946 int cstring__in_len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
947 if (!PyArg_ParseTuple(_args, "s#", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
948 &cstring__in__, &cstring__in_len__)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
949 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
950 cstring__len__ = cstring__in_len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
951 CGContextShowText(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
952 cstring__in__, cstring__len__); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
953 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
954 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
955 return _res; |
| 21386 | 956 } |
| 957 | |
| 958 static PyObject *CGContextRefObj_CGContextShowTextAtPoint(CGContextRefObject *_self, PyObject *_args) | |
| 959 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
960 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
961 float x; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
962 float y; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
963 char *cstring__in__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
964 long cstring__len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
965 int cstring__in_len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
966 if (!PyArg_ParseTuple(_args, "ffs#", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
967 &x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
968 &y, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
969 &cstring__in__, &cstring__in_len__)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
970 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
971 cstring__len__ = cstring__in_len__; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
972 CGContextShowTextAtPoint(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
973 x, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
974 y, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
975 cstring__in__, cstring__len__); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
976 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
977 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
978 return _res; |
| 21386 | 979 } |
| 980 | |
| 981 static PyObject *CGContextRefObj_CGContextEndPage(CGContextRefObject *_self, PyObject *_args) | |
| 982 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
983 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
984 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
985 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
986 CGContextEndPage(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
987 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
988 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
989 return _res; |
| 21386 | 990 } |
| 991 | |
| 992 static PyObject *CGContextRefObj_CGContextFlush(CGContextRefObject *_self, PyObject *_args) | |
| 993 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
994 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
995 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
996 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
997 CGContextFlush(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
998 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
999 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1000 return _res; |
| 21386 | 1001 } |
| 1002 | |
| 1003 static PyObject *CGContextRefObj_CGContextSynchronize(CGContextRefObject *_self, PyObject *_args) | |
| 1004 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1005 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1006 if (!PyArg_ParseTuple(_args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1007 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1008 CGContextSynchronize(_self->ob_itself); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1009 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1010 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1011 return _res; |
| 21386 | 1012 } |
| 1013 | |
| 1014 static PyObject *CGContextRefObj_CGContextSetShouldAntialias(CGContextRefObject *_self, PyObject *_args) | |
| 1015 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1016 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1017 int shouldAntialias; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1018 if (!PyArg_ParseTuple(_args, "i", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1019 &shouldAntialias)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1020 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1021 CGContextSetShouldAntialias(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1022 shouldAntialias); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1023 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1024 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1025 return _res; |
| 21386 | 1026 } |
| 1027 | |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1028 #ifndef __LP64__ |
|
22113
79f292dbabce
Added support for SyncCGContextOriginWithPort().
Just van Rossum <just@letterror.com>
parents:
21464
diff
changeset
|
1029 static PyObject *CGContextRefObj_SyncCGContextOriginWithPort(CGContextRefObject *_self, PyObject *_args) |
|
79f292dbabce
Added support for SyncCGContextOriginWithPort().
Just van Rossum <just@letterror.com>
parents:
21464
diff
changeset
|
1030 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1031 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1032 CGrafPtr port; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1033 if (!PyArg_ParseTuple(_args, "O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1034 GrafObj_Convert, &port)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1035 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1036 SyncCGContextOriginWithPort(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1037 port); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1038 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1039 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1040 return _res; |
|
22113
79f292dbabce
Added support for SyncCGContextOriginWithPort().
Just van Rossum <just@letterror.com>
parents:
21464
diff
changeset
|
1041 } |
|
79f292dbabce
Added support for SyncCGContextOriginWithPort().
Just van Rossum <just@letterror.com>
parents:
21464
diff
changeset
|
1042 |
|
22125
74f16f7a6369
Added ClipCGContextToRegion() from Quickdraw.h.
Just van Rossum <just@letterror.com>
parents:
22113
diff
changeset
|
1043 static PyObject *CGContextRefObj_ClipCGContextToRegion(CGContextRefObject *_self, PyObject *_args) |
|
74f16f7a6369
Added ClipCGContextToRegion() from Quickdraw.h.
Just van Rossum <just@letterror.com>
parents:
22113
diff
changeset
|
1044 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1045 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1046 Rect portRect; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1047 RgnHandle region; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1048 if (!PyArg_ParseTuple(_args, "O&O&", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1049 PyMac_GetRect, &portRect, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1050 ResObj_Convert, ®ion)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1051 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1052 ClipCGContextToRegion(_self->ob_itself, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1053 &portRect, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1054 region); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1055 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1056 _res = Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1057 return _res; |
|
22125
74f16f7a6369
Added ClipCGContextToRegion() from Quickdraw.h.
Just van Rossum <just@letterror.com>
parents:
22113
diff
changeset
|
1058 } |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1059 #endif |
|
22125
74f16f7a6369
Added ClipCGContextToRegion() from Quickdraw.h.
Just van Rossum <just@letterror.com>
parents:
22113
diff
changeset
|
1060 |
| 21386 | 1061 static PyMethodDef CGContextRefObj_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1062 {"CGContextSaveGState", (PyCFunction)CGContextRefObj_CGContextSaveGState, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1063 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1064 {"CGContextRestoreGState", (PyCFunction)CGContextRefObj_CGContextRestoreGState, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1065 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1066 {"CGContextScaleCTM", (PyCFunction)CGContextRefObj_CGContextScaleCTM, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1067 PyDoc_STR("(float sx, float sy) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1068 {"CGContextTranslateCTM", (PyCFunction)CGContextRefObj_CGContextTranslateCTM, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1069 PyDoc_STR("(float tx, float ty) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1070 {"CGContextRotateCTM", (PyCFunction)CGContextRefObj_CGContextRotateCTM, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1071 PyDoc_STR("(float angle) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1072 {"CGContextConcatCTM", (PyCFunction)CGContextRefObj_CGContextConcatCTM, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1073 PyDoc_STR("(CGAffineTransform transform) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1074 {"CGContextGetCTM", (PyCFunction)CGContextRefObj_CGContextGetCTM, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1075 PyDoc_STR("() -> (CGAffineTransform _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1076 {"CGContextSetLineWidth", (PyCFunction)CGContextRefObj_CGContextSetLineWidth, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1077 PyDoc_STR("(float width) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1078 {"CGContextSetLineCap", (PyCFunction)CGContextRefObj_CGContextSetLineCap, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1079 PyDoc_STR("(int cap) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1080 {"CGContextSetLineJoin", (PyCFunction)CGContextRefObj_CGContextSetLineJoin, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1081 PyDoc_STR("(int join) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1082 {"CGContextSetMiterLimit", (PyCFunction)CGContextRefObj_CGContextSetMiterLimit, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1083 PyDoc_STR("(float limit) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1084 {"CGContextSetFlatness", (PyCFunction)CGContextRefObj_CGContextSetFlatness, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1085 PyDoc_STR("(float flatness) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1086 {"CGContextSetAlpha", (PyCFunction)CGContextRefObj_CGContextSetAlpha, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1087 PyDoc_STR("(float alpha) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1088 {"CGContextBeginPath", (PyCFunction)CGContextRefObj_CGContextBeginPath, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1089 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1090 {"CGContextMoveToPoint", (PyCFunction)CGContextRefObj_CGContextMoveToPoint, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1091 PyDoc_STR("(float x, float y) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1092 {"CGContextAddLineToPoint", (PyCFunction)CGContextRefObj_CGContextAddLineToPoint, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1093 PyDoc_STR("(float x, float y) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1094 {"CGContextAddCurveToPoint", (PyCFunction)CGContextRefObj_CGContextAddCurveToPoint, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1095 PyDoc_STR("(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1096 {"CGContextAddQuadCurveToPoint", (PyCFunction)CGContextRefObj_CGContextAddQuadCurveToPoint, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1097 PyDoc_STR("(float cpx, float cpy, float x, float y) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1098 {"CGContextClosePath", (PyCFunction)CGContextRefObj_CGContextClosePath, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1099 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1100 {"CGContextAddRect", (PyCFunction)CGContextRefObj_CGContextAddRect, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1101 PyDoc_STR("(CGRect rect) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1102 {"CGContextAddArc", (PyCFunction)CGContextRefObj_CGContextAddArc, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1103 PyDoc_STR("(float x, float y, float radius, float startAngle, float endAngle, int clockwise) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1104 {"CGContextAddArcToPoint", (PyCFunction)CGContextRefObj_CGContextAddArcToPoint, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1105 PyDoc_STR("(float x1, float y1, float x2, float y2, float radius) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1106 {"CGContextIsPathEmpty", (PyCFunction)CGContextRefObj_CGContextIsPathEmpty, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1107 PyDoc_STR("() -> (int _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1108 {"CGContextGetPathCurrentPoint", (PyCFunction)CGContextRefObj_CGContextGetPathCurrentPoint, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1109 PyDoc_STR("() -> (CGPoint _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1110 {"CGContextGetPathBoundingBox", (PyCFunction)CGContextRefObj_CGContextGetPathBoundingBox, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1111 PyDoc_STR("() -> (CGRect _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1112 {"CGContextDrawPath", (PyCFunction)CGContextRefObj_CGContextDrawPath, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1113 PyDoc_STR("(int mode) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1114 {"CGContextFillPath", (PyCFunction)CGContextRefObj_CGContextFillPath, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1115 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1116 {"CGContextEOFillPath", (PyCFunction)CGContextRefObj_CGContextEOFillPath, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1117 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1118 {"CGContextStrokePath", (PyCFunction)CGContextRefObj_CGContextStrokePath, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1119 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1120 {"CGContextFillRect", (PyCFunction)CGContextRefObj_CGContextFillRect, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1121 PyDoc_STR("(CGRect rect) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1122 {"CGContextStrokeRect", (PyCFunction)CGContextRefObj_CGContextStrokeRect, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1123 PyDoc_STR("(CGRect rect) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1124 {"CGContextStrokeRectWithWidth", (PyCFunction)CGContextRefObj_CGContextStrokeRectWithWidth, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1125 PyDoc_STR("(CGRect rect, float width) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1126 {"CGContextClearRect", (PyCFunction)CGContextRefObj_CGContextClearRect, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1127 PyDoc_STR("(CGRect rect) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1128 {"CGContextClip", (PyCFunction)CGContextRefObj_CGContextClip, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1129 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1130 {"CGContextEOClip", (PyCFunction)CGContextRefObj_CGContextEOClip, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1131 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1132 {"CGContextClipToRect", (PyCFunction)CGContextRefObj_CGContextClipToRect, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1133 PyDoc_STR("(CGRect rect) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1134 {"CGContextSetGrayFillColor", (PyCFunction)CGContextRefObj_CGContextSetGrayFillColor, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1135 PyDoc_STR("(float gray, float alpha) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1136 {"CGContextSetGrayStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetGrayStrokeColor, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1137 PyDoc_STR("(float gray, float alpha) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1138 {"CGContextSetRGBFillColor", (PyCFunction)CGContextRefObj_CGContextSetRGBFillColor, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1139 PyDoc_STR("(float red, float green, float blue, float alpha) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1140 {"CGContextSetRGBStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetRGBStrokeColor, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1141 PyDoc_STR("(float red, float green, float blue, float alpha) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1142 {"CGContextSetCMYKFillColor", (PyCFunction)CGContextRefObj_CGContextSetCMYKFillColor, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1143 PyDoc_STR("(float cyan, float magenta, float yellow, float black, float alpha) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1144 {"CGContextSetCMYKStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetCMYKStrokeColor, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1145 PyDoc_STR("(float cyan, float magenta, float yellow, float black, float alpha) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1146 {"CGContextGetInterpolationQuality", (PyCFunction)CGContextRefObj_CGContextGetInterpolationQuality, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1147 PyDoc_STR("() -> (int _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1148 {"CGContextSetInterpolationQuality", (PyCFunction)CGContextRefObj_CGContextSetInterpolationQuality, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1149 PyDoc_STR("(int quality) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1150 {"CGContextSetCharacterSpacing", (PyCFunction)CGContextRefObj_CGContextSetCharacterSpacing, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1151 PyDoc_STR("(float spacing) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1152 {"CGContextSetTextPosition", (PyCFunction)CGContextRefObj_CGContextSetTextPosition, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1153 PyDoc_STR("(float x, float y) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1154 {"CGContextGetTextPosition", (PyCFunction)CGContextRefObj_CGContextGetTextPosition, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1155 PyDoc_STR("() -> (CGPoint _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1156 {"CGContextSetTextMatrix", (PyCFunction)CGContextRefObj_CGContextSetTextMatrix, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1157 PyDoc_STR("(CGAffineTransform transform) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1158 {"CGContextGetTextMatrix", (PyCFunction)CGContextRefObj_CGContextGetTextMatrix, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1159 PyDoc_STR("() -> (CGAffineTransform _rv)")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1160 {"CGContextSetTextDrawingMode", (PyCFunction)CGContextRefObj_CGContextSetTextDrawingMode, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1161 PyDoc_STR("(int mode) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1162 {"CGContextSetFontSize", (PyCFunction)CGContextRefObj_CGContextSetFontSize, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1163 PyDoc_STR("(float size) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1164 {"CGContextSelectFont", (PyCFunction)CGContextRefObj_CGContextSelectFont, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1165 PyDoc_STR("(char * name, float size, int textEncoding) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1166 {"CGContextShowText", (PyCFunction)CGContextRefObj_CGContextShowText, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1167 PyDoc_STR("(Buffer cstring) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1168 {"CGContextShowTextAtPoint", (PyCFunction)CGContextRefObj_CGContextShowTextAtPoint, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1169 PyDoc_STR("(float x, float y, Buffer cstring) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1170 {"CGContextEndPage", (PyCFunction)CGContextRefObj_CGContextEndPage, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1171 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1172 {"CGContextFlush", (PyCFunction)CGContextRefObj_CGContextFlush, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1173 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1174 {"CGContextSynchronize", (PyCFunction)CGContextRefObj_CGContextSynchronize, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1175 PyDoc_STR("() -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1176 {"CGContextSetShouldAntialias", (PyCFunction)CGContextRefObj_CGContextSetShouldAntialias, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1177 PyDoc_STR("(int shouldAntialias) -> None")}, |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1178 #ifndef __LP64__ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1179 {"SyncCGContextOriginWithPort", (PyCFunction)CGContextRefObj_SyncCGContextOriginWithPort, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1180 PyDoc_STR("(CGrafPtr port) -> None")}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1181 {"ClipCGContextToRegion", (PyCFunction)CGContextRefObj_ClipCGContextToRegion, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1182 PyDoc_STR("(Rect portRect, RgnHandle region) -> None")}, |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1183 #endif |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1184 {NULL, NULL, 0} |
| 21386 | 1185 }; |
| 1186 | |
|
26464
14fc187334c5
Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents:
24865
diff
changeset
|
1187 #define CGContextRefObj_getsetlist NULL |
| 21386 | 1188 |
|
26524
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
1189 |
| 21386 | 1190 #define CGContextRefObj_compare NULL |
| 1191 | |
| 1192 #define CGContextRefObj_repr NULL | |
| 1193 | |
| 1194 #define CGContextRefObj_hash NULL | |
|
26524
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
1195 #define CGContextRefObj_tp_init 0 |
|
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
1196 |
|
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
1197 #define CGContextRefObj_tp_alloc PyType_GenericAlloc |
|
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
1198 |
|
35200
5df1c692bb41
Updated (and regenerated) for name change in tp_init method arguments:
Jack Jansen <jack.jansen@cwi.nl>
parents:
31091
diff
changeset
|
1199 static PyObject *CGContextRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds) |
|
26524
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
1200 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1201 PyObject *_self; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1202 CGContextRef itself; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1203 char *kw[] = {"itself", 0}; |
|
26524
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
1204 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1205 if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CGContextRefObj_Convert, &itself)) return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1206 if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1207 ((CGContextRefObject *)_self)->ob_itself = itself; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1208 return _self; |
|
26524
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
1209 } |
|
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
1210 |
|
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
1211 #define CGContextRefObj_tp_free PyObject_Del |
|
7aba859cee54
Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents:
26464
diff
changeset
|
1212 |
| 21386 | 1213 |
| 1214 PyTypeObject CGContextRef_Type = { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1215 PyObject_HEAD_INIT(NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1216 0, /*ob_size*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1217 "_CG.CGContextRef", /*tp_name*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1218 sizeof(CGContextRefObject), /*tp_basicsize*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1219 0, /*tp_itemsize*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1220 /* methods */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1221 (destructor) CGContextRefObj_dealloc, /*tp_dealloc*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1222 0, /*tp_print*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1223 (getattrfunc)0, /*tp_getattr*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1224 (setattrfunc)0, /*tp_setattr*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1225 (cmpfunc) CGContextRefObj_compare, /*tp_compare*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1226 (reprfunc) CGContextRefObj_repr, /*tp_repr*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1227 (PyNumberMethods *)0, /* tp_as_number */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1228 (PySequenceMethods *)0, /* tp_as_sequence */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1229 (PyMappingMethods *)0, /* tp_as_mapping */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1230 (hashfunc) CGContextRefObj_hash, /*tp_hash*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1231 0, /*tp_call*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1232 0, /*tp_str*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1233 PyObject_GenericGetAttr, /*tp_getattro*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1234 PyObject_GenericSetAttr, /*tp_setattro */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1235 0, /*tp_as_buffer*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1236 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1237 0, /*tp_doc*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1238 0, /*tp_traverse*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1239 0, /*tp_clear*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1240 0, /*tp_richcompare*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1241 0, /*tp_weaklistoffset*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1242 0, /*tp_iter*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1243 0, /*tp_iternext*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1244 CGContextRefObj_methods, /* tp_methods */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1245 0, /*tp_members*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1246 CGContextRefObj_getsetlist, /*tp_getset*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1247 0, /*tp_base*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1248 0, /*tp_dict*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1249 0, /*tp_descr_get*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1250 0, /*tp_descr_set*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1251 0, /*tp_dictoffset*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1252 CGContextRefObj_tp_init, /* tp_init */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1253 CGContextRefObj_tp_alloc, /* tp_alloc */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1254 CGContextRefObj_tp_new, /* tp_new */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1255 CGContextRefObj_tp_free, /* tp_free */ |
| 21386 | 1256 }; |
| 1257 | |
| 1258 /* ------------------ End object type CGContextRef ------------------ */ | |
| 1259 | |
| 1260 | |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1261 #ifndef __LP64__ |
| 21386 | 1262 static PyObject *CG_CreateCGContextForPort(PyObject *_self, PyObject *_args) |
| 1263 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1264 PyObject *_res = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1265 GrafPtr port; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1266 CGContextRef ctx; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1267 OSStatus _err; |
| 21386 | 1268 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1269 if (!PyArg_ParseTuple(_args, "O&", GrafObj_Convert, &port)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1270 return NULL; |
| 21386 | 1271 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1272 _err = CreateCGContextForPort(port, &ctx); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1273 if (_err != noErr) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1274 if (_err != noErr) return PyMac_Error(_err); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1275 _res = Py_BuildValue("O&", CGContextRefObj_New, ctx); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1276 return _res; |
| 21386 | 1277 |
| 1278 } | |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1279 #endif |
| 21386 | 1280 |
| 1281 static PyMethodDef CG_methods[] = { | |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1282 #ifndef __LP64__ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1283 {"CreateCGContextForPort", (PyCFunction)CG_CreateCGContextForPort, 1, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1284 PyDoc_STR("(CGrafPtr) -> CGContextRef")}, |
|
47473
c34e34057714
MacOS X: Enable 4-way universal builds
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
35200
diff
changeset
|
1285 #endif |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1286 {NULL, NULL, 0} |
| 21386 | 1287 }; |
| 1288 | |
| 1289 | |
| 1290 | |
| 1291 | |
| 1292 void init_CG(void) | |
| 1293 { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1294 PyObject *m; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1295 PyObject *d; |
| 21386 | 1296 |
| 1297 | |
| 1298 | |
| 1299 | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1300 m = Py_InitModule("_CG", CG_methods); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1301 d = PyModule_GetDict(m); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1302 CG_Error = PyMac_GetOSErrException(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1303 if (CG_Error == NULL || |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1304 PyDict_SetItemString(d, "Error", CG_Error) != 0) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1305 return; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1306 CGContextRef_Type.ob_type = &PyType_Type; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1307 if (PyType_Ready(&CGContextRef_Type) < 0) return; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1308 Py_INCREF(&CGContextRef_Type); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1309 PyModule_AddObject(m, "CGContextRef", (PyObject *)&CGContextRef_Type); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1310 /* Backward-compatible name */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1311 Py_INCREF(&CGContextRef_Type); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
47473
diff
changeset
|
1312 PyModule_AddObject(m, "CGContextRefType", (PyObject *)&CGContextRef_Type); |
| 21386 | 1313 } |
| 1314 | |
| 1315 /* ========================= End module _CG ========================= */ | |
| 1316 |
