1 /*
2 * Interface wrapper code.
3 *
4 * Generated by SIP 4.19.16
5 *
6 * Copyright: (c) 2018 by Total Control Software
7 * License: wxWindows License
8 */
9
10 #include "sipAPI_core.h"
11
12 #include <wx/affinematrix2d.h>
13
14 #include <wx/geometry.h>
15 #include <wx/affinematrix2dbase.h>
16 #include <wx/affinematrix2dbase.h>
17
18
19 class sipwxAffineMatrix2D : public ::wxAffineMatrix2D
20 {
21 public:
22 sipwxAffineMatrix2D();
23 sipwxAffineMatrix2D(const ::wxAffineMatrix2D&);
24 virtual ~sipwxAffineMatrix2D();
25
26 /*
27 * There is a protected method for every virtual method visible from
28 * this class.
29 */
30 protected:
31 void Set(const ::wxMatrix2D&,const ::wxPoint2DDouble&) SIP_OVERRIDE;
32 void Get( ::wxMatrix2D*, ::wxPoint2DDouble*) const SIP_OVERRIDE;
33 void Concat(const ::wxAffineMatrix2DBase&) SIP_OVERRIDE;
34 bool Invert() SIP_OVERRIDE;
35 bool IsIdentity() const SIP_OVERRIDE;
36 void Translate( ::wxDouble, ::wxDouble) SIP_OVERRIDE;
37 void Scale( ::wxDouble, ::wxDouble) SIP_OVERRIDE;
38 void Rotate( ::wxDouble) SIP_OVERRIDE;
39
40 public:
41 sipSimpleWrapper *sipPySelf;
42
43 private:
44 sipwxAffineMatrix2D(const sipwxAffineMatrix2D &);
45 sipwxAffineMatrix2D &operator = (const sipwxAffineMatrix2D &);
46
47 char sipPyMethods[8];
48 };
49
sipwxAffineMatrix2D()50 sipwxAffineMatrix2D::sipwxAffineMatrix2D(): ::wxAffineMatrix2D(), sipPySelf(SIP_NULLPTR)
51 {
52 memset(sipPyMethods, 0, sizeof (sipPyMethods));
53 }
54
sipwxAffineMatrix2D(const::wxAffineMatrix2D & a0)55 sipwxAffineMatrix2D::sipwxAffineMatrix2D(const ::wxAffineMatrix2D& a0): ::wxAffineMatrix2D(a0), sipPySelf(SIP_NULLPTR)
56 {
57 memset(sipPyMethods, 0, sizeof (sipPyMethods));
58 }
59
~sipwxAffineMatrix2D()60 sipwxAffineMatrix2D::~sipwxAffineMatrix2D()
61 {
62 sipInstanceDestroyedEx(&sipPySelf);
63 }
64
Set(const::wxMatrix2D & mat2D,const::wxPoint2DDouble & tr)65 void sipwxAffineMatrix2D::Set(const ::wxMatrix2D& mat2D,const ::wxPoint2DDouble& tr)
66 {
67 sip_gilstate_t sipGILState;
68 PyObject *sipMeth;
69
70 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,SIP_NULLPTR,sipName_Set);
71
72 if (!sipMeth)
73 {
74 ::wxAffineMatrix2D::Set(mat2D,tr);
75 return;
76 }
77
78 extern void sipVH__core_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxMatrix2D&,const ::wxPoint2DDouble&);
79
80 sipVH__core_3(sipGILState, 0, sipPySelf, sipMeth, mat2D, tr);
81 }
82
Get(::wxMatrix2D * mat2D,::wxPoint2DDouble * tr) const83 void sipwxAffineMatrix2D::Get( ::wxMatrix2D*mat2D, ::wxPoint2DDouble*tr) const
84 {
85 sip_gilstate_t sipGILState;
86 PyObject *sipMeth;
87
88 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,SIP_NULLPTR,sipName_Get);
89
90 if (!sipMeth)
91 {
92 ::wxAffineMatrix2D::Get(mat2D,tr);
93 return;
94 }
95
96 extern void sipVH__core_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxMatrix2D*, ::wxPoint2DDouble*);
97
98 sipVH__core_4(sipGILState, 0, sipPySelf, sipMeth, mat2D, tr);
99 }
100
Concat(const::wxAffineMatrix2DBase & t)101 void sipwxAffineMatrix2D::Concat(const ::wxAffineMatrix2DBase& t)
102 {
103 sip_gilstate_t sipGILState;
104 PyObject *sipMeth;
105
106 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,SIP_NULLPTR,sipName_Concat);
107
108 if (!sipMeth)
109 {
110 ::wxAffineMatrix2D::Concat(t);
111 return;
112 }
113
114 extern void sipVH__core_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxAffineMatrix2DBase&);
115
116 sipVH__core_5(sipGILState, 0, sipPySelf, sipMeth, t);
117 }
118
Invert()119 bool sipwxAffineMatrix2D::Invert()
120 {
121 sip_gilstate_t sipGILState;
122 PyObject *sipMeth;
123
124 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[3],sipPySelf,SIP_NULLPTR,sipName_Invert);
125
126 if (!sipMeth)
127 return ::wxAffineMatrix2D::Invert();
128
129 extern bool sipVH__core_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
130
131 return sipVH__core_6(sipGILState, 0, sipPySelf, sipMeth);
132 }
133
IsIdentity() const134 bool sipwxAffineMatrix2D::IsIdentity() const
135 {
136 sip_gilstate_t sipGILState;
137 PyObject *sipMeth;
138
139 sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[4]),sipPySelf,SIP_NULLPTR,sipName_IsIdentity);
140
141 if (!sipMeth)
142 return ::wxAffineMatrix2D::IsIdentity();
143
144 extern bool sipVH__core_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);
145
146 return sipVH__core_6(sipGILState, 0, sipPySelf, sipMeth);
147 }
148
Translate(::wxDouble dx,::wxDouble dy)149 void sipwxAffineMatrix2D::Translate( ::wxDouble dx, ::wxDouble dy)
150 {
151 sip_gilstate_t sipGILState;
152 PyObject *sipMeth;
153
154 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[5],sipPySelf,SIP_NULLPTR,sipName_Translate);
155
156 if (!sipMeth)
157 {
158 ::wxAffineMatrix2D::Translate(dx,dy);
159 return;
160 }
161
162 extern void sipVH__core_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxDouble, ::wxDouble);
163
164 sipVH__core_7(sipGILState, 0, sipPySelf, sipMeth, dx, dy);
165 }
166
Scale(::wxDouble xScale,::wxDouble yScale)167 void sipwxAffineMatrix2D::Scale( ::wxDouble xScale, ::wxDouble yScale)
168 {
169 sip_gilstate_t sipGILState;
170 PyObject *sipMeth;
171
172 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[6],sipPySelf,SIP_NULLPTR,sipName_Scale);
173
174 if (!sipMeth)
175 {
176 ::wxAffineMatrix2D::Scale(xScale,yScale);
177 return;
178 }
179
180 extern void sipVH__core_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxDouble, ::wxDouble);
181
182 sipVH__core_7(sipGILState, 0, sipPySelf, sipMeth, xScale, yScale);
183 }
184
Rotate(::wxDouble cRadians)185 void sipwxAffineMatrix2D::Rotate( ::wxDouble cRadians)
186 {
187 sip_gilstate_t sipGILState;
188 PyObject *sipMeth;
189
190 sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[7],sipPySelf,SIP_NULLPTR,sipName_Rotate);
191
192 if (!sipMeth)
193 {
194 ::wxAffineMatrix2D::Rotate(cRadians);
195 return;
196 }
197
198 extern void sipVH__core_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxDouble);
199
200 sipVH__core_8(sipGILState, 0, sipPySelf, sipMeth, cRadians);
201 }
202
203
204 PyDoc_STRVAR(doc_wxAffineMatrix2D_IsEqual, "IsEqual(t)\n"
205 "\n"
206 "Check that this matrix is identical with t.");
207
208 extern "C" {static PyObject *meth_wxAffineMatrix2D_IsEqual(PyObject *, PyObject *, PyObject *);}
meth_wxAffineMatrix2D_IsEqual(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)209 static PyObject *meth_wxAffineMatrix2D_IsEqual(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
210 {
211 PyObject *sipParseErr = SIP_NULLPTR;
212
213 {
214 const ::wxAffineMatrix2DBase* t;
215 ::wxAffineMatrix2D *sipCpp;
216
217 static const char *sipKwdList[] = {
218 sipName_t,
219 };
220
221 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp, sipType_wxAffineMatrix2DBase, &t))
222 {
223 PyErr_Clear();
224
225 Py_BEGIN_ALLOW_THREADS
226 sipCpp->IsEqual(*t);
227 Py_END_ALLOW_THREADS
228
229 if (PyErr_Occurred())
230 return 0;
231
232 Py_INCREF(Py_None);
233 return Py_None;
234 }
235 }
236
237 /* Raise an exception if the arguments couldn't be parsed. */
238 sipNoMethod(sipParseErr, sipName_AffineMatrix2D, sipName_IsEqual, SIP_NULLPTR);
239
240 return SIP_NULLPTR;
241 }
242
243
244 PyDoc_STRVAR(doc_wxAffineMatrix2D_Get, "Get() -> (mat2D, tr)\n"
245 "\n"
246 "Get the component values of the matrix.");
247
248 extern "C" {static PyObject *meth_wxAffineMatrix2D_Get(PyObject *, PyObject *, PyObject *);}
meth_wxAffineMatrix2D_Get(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)249 static PyObject *meth_wxAffineMatrix2D_Get(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
250 {
251 PyObject *sipParseErr = SIP_NULLPTR;
252 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
253
254 {
255 ::wxMatrix2D* mat2D;
256 ::wxPoint2DDouble* tr;
257 const ::wxAffineMatrix2D *sipCpp;
258
259 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, SIP_NULLPTR, "B", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp))
260 {
261 mat2D = new ::wxMatrix2D();
262 tr = new ::wxPoint2DDouble();
263
264 PyErr_Clear();
265
266 Py_BEGIN_ALLOW_THREADS
267 (sipSelfWasArg ? sipCpp-> ::wxAffineMatrix2D::Get(mat2D,tr) : sipCpp->Get(mat2D,tr));
268 Py_END_ALLOW_THREADS
269
270 if (PyErr_Occurred())
271 return 0;
272
273 return sipBuildResult(0,"(NN)",mat2D,sipType_wxMatrix2D,SIP_NULLPTR,tr,sipType_wxPoint2DDouble,SIP_NULLPTR);
274 }
275 }
276
277 /* Raise an exception if the arguments couldn't be parsed. */
278 sipNoMethod(sipParseErr, sipName_AffineMatrix2D, sipName_Get, SIP_NULLPTR);
279
280 return SIP_NULLPTR;
281 }
282
283
284 PyDoc_STRVAR(doc_wxAffineMatrix2D_Set, "Set(mat2D, tr)\n"
285 "\n"
286 "Set all elements of this matrix.");
287
288 extern "C" {static PyObject *meth_wxAffineMatrix2D_Set(PyObject *, PyObject *, PyObject *);}
meth_wxAffineMatrix2D_Set(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)289 static PyObject *meth_wxAffineMatrix2D_Set(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
290 {
291 PyObject *sipParseErr = SIP_NULLPTR;
292 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
293
294 {
295 const ::wxMatrix2D* mat2D;
296 const ::wxPoint2DDouble* tr;
297 int trState = 0;
298 ::wxAffineMatrix2D *sipCpp;
299
300 static const char *sipKwdList[] = {
301 sipName_mat2D,
302 sipName_tr,
303 };
304
305 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9J1", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp, sipType_wxMatrix2D, &mat2D, sipType_wxPoint2DDouble, &tr, &trState))
306 {
307 PyErr_Clear();
308
309 Py_BEGIN_ALLOW_THREADS
310 (sipSelfWasArg ? sipCpp-> ::wxAffineMatrix2D::Set(*mat2D,*tr) : sipCpp->Set(*mat2D,*tr));
311 Py_END_ALLOW_THREADS
312 sipReleaseType(const_cast< ::wxPoint2DDouble *>(tr),sipType_wxPoint2DDouble,trState);
313
314 if (PyErr_Occurred())
315 return 0;
316
317 Py_INCREF(Py_None);
318 return Py_None;
319 }
320 }
321
322 /* Raise an exception if the arguments couldn't be parsed. */
323 sipNoMethod(sipParseErr, sipName_AffineMatrix2D, sipName_Set, SIP_NULLPTR);
324
325 return SIP_NULLPTR;
326 }
327
328
329 PyDoc_STRVAR(doc_wxAffineMatrix2D_Concat, "Concat(t)\n"
330 "\n"
331 "Concatenate this matrix with another one.");
332
333 extern "C" {static PyObject *meth_wxAffineMatrix2D_Concat(PyObject *, PyObject *, PyObject *);}
meth_wxAffineMatrix2D_Concat(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)334 static PyObject *meth_wxAffineMatrix2D_Concat(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
335 {
336 PyObject *sipParseErr = SIP_NULLPTR;
337 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
338
339 {
340 const ::wxAffineMatrix2DBase* t;
341 ::wxAffineMatrix2D *sipCpp;
342
343 static const char *sipKwdList[] = {
344 sipName_t,
345 };
346
347 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp, sipType_wxAffineMatrix2DBase, &t))
348 {
349 PyErr_Clear();
350
351 Py_BEGIN_ALLOW_THREADS
352 (sipSelfWasArg ? sipCpp-> ::wxAffineMatrix2D::Concat(*t) : sipCpp->Concat(*t));
353 Py_END_ALLOW_THREADS
354
355 if (PyErr_Occurred())
356 return 0;
357
358 Py_INCREF(Py_None);
359 return Py_None;
360 }
361 }
362
363 /* Raise an exception if the arguments couldn't be parsed. */
364 sipNoMethod(sipParseErr, sipName_AffineMatrix2D, sipName_Concat, SIP_NULLPTR);
365
366 return SIP_NULLPTR;
367 }
368
369
370 PyDoc_STRVAR(doc_wxAffineMatrix2D_Invert, "Invert() -> bool\n"
371 "\n"
372 "Invert this matrix.");
373
374 extern "C" {static PyObject *meth_wxAffineMatrix2D_Invert(PyObject *, PyObject *);}
meth_wxAffineMatrix2D_Invert(PyObject * sipSelf,PyObject * sipArgs)375 static PyObject *meth_wxAffineMatrix2D_Invert(PyObject *sipSelf, PyObject *sipArgs)
376 {
377 PyObject *sipParseErr = SIP_NULLPTR;
378 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
379
380 {
381 ::wxAffineMatrix2D *sipCpp;
382
383 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp))
384 {
385 bool sipRes;
386
387 PyErr_Clear();
388
389 Py_BEGIN_ALLOW_THREADS
390 sipRes = (sipSelfWasArg ? sipCpp-> ::wxAffineMatrix2D::Invert() : sipCpp->Invert());
391 Py_END_ALLOW_THREADS
392
393 if (PyErr_Occurred())
394 return 0;
395
396 return PyBool_FromLong(sipRes);
397 }
398 }
399
400 /* Raise an exception if the arguments couldn't be parsed. */
401 sipNoMethod(sipParseErr, sipName_AffineMatrix2D, sipName_Invert, SIP_NULLPTR);
402
403 return SIP_NULLPTR;
404 }
405
406
407 PyDoc_STRVAR(doc_wxAffineMatrix2D_IsIdentity, "IsIdentity() -> bool\n"
408 "\n"
409 "Check if this is the identity matrix.");
410
411 extern "C" {static PyObject *meth_wxAffineMatrix2D_IsIdentity(PyObject *, PyObject *);}
meth_wxAffineMatrix2D_IsIdentity(PyObject * sipSelf,PyObject * sipArgs)412 static PyObject *meth_wxAffineMatrix2D_IsIdentity(PyObject *sipSelf, PyObject *sipArgs)
413 {
414 PyObject *sipParseErr = SIP_NULLPTR;
415 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
416
417 {
418 const ::wxAffineMatrix2D *sipCpp;
419
420 if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp))
421 {
422 bool sipRes;
423
424 PyErr_Clear();
425
426 Py_BEGIN_ALLOW_THREADS
427 sipRes = (sipSelfWasArg ? sipCpp-> ::wxAffineMatrix2D::IsIdentity() : sipCpp->IsIdentity());
428 Py_END_ALLOW_THREADS
429
430 if (PyErr_Occurred())
431 return 0;
432
433 return PyBool_FromLong(sipRes);
434 }
435 }
436
437 /* Raise an exception if the arguments couldn't be parsed. */
438 sipNoMethod(sipParseErr, sipName_AffineMatrix2D, sipName_IsIdentity, SIP_NULLPTR);
439
440 return SIP_NULLPTR;
441 }
442
443
444 PyDoc_STRVAR(doc_wxAffineMatrix2D_Translate, "Translate(dx, dy)\n"
445 "\n"
446 "Add the translation to this matrix.");
447
448 extern "C" {static PyObject *meth_wxAffineMatrix2D_Translate(PyObject *, PyObject *, PyObject *);}
meth_wxAffineMatrix2D_Translate(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)449 static PyObject *meth_wxAffineMatrix2D_Translate(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
450 {
451 PyObject *sipParseErr = SIP_NULLPTR;
452 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
453
454 {
455 ::wxDouble dx;
456 ::wxDouble dy;
457 ::wxAffineMatrix2D *sipCpp;
458
459 static const char *sipKwdList[] = {
460 sipName_dx,
461 sipName_dy,
462 };
463
464 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bdd", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp, &dx, &dy))
465 {
466 PyErr_Clear();
467
468 Py_BEGIN_ALLOW_THREADS
469 (sipSelfWasArg ? sipCpp-> ::wxAffineMatrix2D::Translate(dx,dy) : sipCpp->Translate(dx,dy));
470 Py_END_ALLOW_THREADS
471
472 if (PyErr_Occurred())
473 return 0;
474
475 Py_INCREF(Py_None);
476 return Py_None;
477 }
478 }
479
480 /* Raise an exception if the arguments couldn't be parsed. */
481 sipNoMethod(sipParseErr, sipName_AffineMatrix2D, sipName_Translate, SIP_NULLPTR);
482
483 return SIP_NULLPTR;
484 }
485
486
487 PyDoc_STRVAR(doc_wxAffineMatrix2D_Scale, "Scale(xScale, yScale)\n"
488 "\n"
489 "Add scaling to this matrix.");
490
491 extern "C" {static PyObject *meth_wxAffineMatrix2D_Scale(PyObject *, PyObject *, PyObject *);}
meth_wxAffineMatrix2D_Scale(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)492 static PyObject *meth_wxAffineMatrix2D_Scale(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
493 {
494 PyObject *sipParseErr = SIP_NULLPTR;
495 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
496
497 {
498 ::wxDouble xScale;
499 ::wxDouble yScale;
500 ::wxAffineMatrix2D *sipCpp;
501
502 static const char *sipKwdList[] = {
503 sipName_xScale,
504 sipName_yScale,
505 };
506
507 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bdd", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp, &xScale, &yScale))
508 {
509 PyErr_Clear();
510
511 Py_BEGIN_ALLOW_THREADS
512 (sipSelfWasArg ? sipCpp-> ::wxAffineMatrix2D::Scale(xScale,yScale) : sipCpp->Scale(xScale,yScale));
513 Py_END_ALLOW_THREADS
514
515 if (PyErr_Occurred())
516 return 0;
517
518 Py_INCREF(Py_None);
519 return Py_None;
520 }
521 }
522
523 /* Raise an exception if the arguments couldn't be parsed. */
524 sipNoMethod(sipParseErr, sipName_AffineMatrix2D, sipName_Scale, SIP_NULLPTR);
525
526 return SIP_NULLPTR;
527 }
528
529
530 PyDoc_STRVAR(doc_wxAffineMatrix2D_Mirror, "Mirror(direction=HORIZONTAL)\n"
531 "\n"
532 "Add mirroring to this matrix.");
533
534 extern "C" {static PyObject *meth_wxAffineMatrix2D_Mirror(PyObject *, PyObject *, PyObject *);}
meth_wxAffineMatrix2D_Mirror(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)535 static PyObject *meth_wxAffineMatrix2D_Mirror(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
536 {
537 PyObject *sipParseErr = SIP_NULLPTR;
538
539 {
540 int direction = wxHORIZONTAL;
541 ::wxAffineMatrix2D *sipCpp;
542
543 static const char *sipKwdList[] = {
544 sipName_direction,
545 };
546
547 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|i", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp, &direction))
548 {
549 PyErr_Clear();
550
551 Py_BEGIN_ALLOW_THREADS
552 sipCpp->Mirror(direction);
553 Py_END_ALLOW_THREADS
554
555 if (PyErr_Occurred())
556 return 0;
557
558 Py_INCREF(Py_None);
559 return Py_None;
560 }
561 }
562
563 /* Raise an exception if the arguments couldn't be parsed. */
564 sipNoMethod(sipParseErr, sipName_AffineMatrix2D, sipName_Mirror, SIP_NULLPTR);
565
566 return SIP_NULLPTR;
567 }
568
569
570 PyDoc_STRVAR(doc_wxAffineMatrix2D_Rotate, "Rotate(cRadians)\n"
571 "\n"
572 "Add clockwise rotation to this matrix.");
573
574 extern "C" {static PyObject *meth_wxAffineMatrix2D_Rotate(PyObject *, PyObject *, PyObject *);}
meth_wxAffineMatrix2D_Rotate(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)575 static PyObject *meth_wxAffineMatrix2D_Rotate(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
576 {
577 PyObject *sipParseErr = SIP_NULLPTR;
578 bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));
579
580 {
581 ::wxDouble cRadians;
582 ::wxAffineMatrix2D *sipCpp;
583
584 static const char *sipKwdList[] = {
585 sipName_cRadians,
586 };
587
588 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bd", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp, &cRadians))
589 {
590 PyErr_Clear();
591
592 Py_BEGIN_ALLOW_THREADS
593 (sipSelfWasArg ? sipCpp-> ::wxAffineMatrix2D::Rotate(cRadians) : sipCpp->Rotate(cRadians));
594 Py_END_ALLOW_THREADS
595
596 if (PyErr_Occurred())
597 return 0;
598
599 Py_INCREF(Py_None);
600 return Py_None;
601 }
602 }
603
604 /* Raise an exception if the arguments couldn't be parsed. */
605 sipNoMethod(sipParseErr, sipName_AffineMatrix2D, sipName_Rotate, SIP_NULLPTR);
606
607 return SIP_NULLPTR;
608 }
609
610
611 PyDoc_STRVAR(doc_wxAffineMatrix2D_TransformPoint, "TransformPoint(p) -> Point2DDouble\n"
612 "TransformPoint(x, y) -> (x, y)\n"
613 "\n"
614 "Applies this matrix to the point.\n"
615 "");
616
617 extern "C" {static PyObject *meth_wxAffineMatrix2D_TransformPoint(PyObject *, PyObject *, PyObject *);}
meth_wxAffineMatrix2D_TransformPoint(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)618 static PyObject *meth_wxAffineMatrix2D_TransformPoint(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
619 {
620 PyObject *sipParseErr = SIP_NULLPTR;
621
622 {
623 const ::wxPoint2DDouble* p;
624 int pState = 0;
625 const ::wxAffineMatrix2D *sipCpp;
626
627 static const char *sipKwdList[] = {
628 sipName_p,
629 };
630
631 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp, sipType_wxPoint2DDouble, &p, &pState))
632 {
633 ::wxPoint2DDouble*sipRes;
634
635 PyErr_Clear();
636
637 Py_BEGIN_ALLOW_THREADS
638 sipRes = new ::wxPoint2DDouble(sipCpp->TransformPoint(*p));
639 Py_END_ALLOW_THREADS
640 sipReleaseType(const_cast< ::wxPoint2DDouble *>(p),sipType_wxPoint2DDouble,pState);
641
642 if (PyErr_Occurred())
643 return 0;
644
645 return sipConvertFromNewType(sipRes,sipType_wxPoint2DDouble,SIP_NULLPTR);
646 }
647 }
648
649 {
650 ::wxDouble x;
651 ::wxDouble y;
652 const ::wxAffineMatrix2D *sipCpp;
653
654 static const char *sipKwdList[] = {
655 sipName_x,
656 sipName_y,
657 };
658
659 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bdd", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp, &x, &y))
660 {
661 PyErr_Clear();
662
663 Py_BEGIN_ALLOW_THREADS
664 sipCpp->TransformPoint(&x,&y);
665 Py_END_ALLOW_THREADS
666
667 if (PyErr_Occurred())
668 return 0;
669
670 return sipBuildResult(0,"(dd)",x,y);
671 }
672 }
673
674 /* Raise an exception if the arguments couldn't be parsed. */
675 sipNoMethod(sipParseErr, sipName_AffineMatrix2D, sipName_TransformPoint, SIP_NULLPTR);
676
677 return SIP_NULLPTR;
678 }
679
680
681 PyDoc_STRVAR(doc_wxAffineMatrix2D_TransformDistance, "TransformDistance(p) -> Point2DDouble\n"
682 "TransformDistance(dx, dy) -> (dx, dy)\n"
683 "\n"
684 "Applies the linear part of this matrix, i.e. without translation.\n"
685 "");
686
687 extern "C" {static PyObject *meth_wxAffineMatrix2D_TransformDistance(PyObject *, PyObject *, PyObject *);}
meth_wxAffineMatrix2D_TransformDistance(PyObject * sipSelf,PyObject * sipArgs,PyObject * sipKwds)688 static PyObject *meth_wxAffineMatrix2D_TransformDistance(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
689 {
690 PyObject *sipParseErr = SIP_NULLPTR;
691
692 {
693 const ::wxPoint2DDouble* p;
694 int pState = 0;
695 const ::wxAffineMatrix2D *sipCpp;
696
697 static const char *sipKwdList[] = {
698 sipName_p,
699 };
700
701 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp, sipType_wxPoint2DDouble, &p, &pState))
702 {
703 ::wxPoint2DDouble*sipRes;
704
705 PyErr_Clear();
706
707 Py_BEGIN_ALLOW_THREADS
708 sipRes = new ::wxPoint2DDouble(sipCpp->TransformDistance(*p));
709 Py_END_ALLOW_THREADS
710 sipReleaseType(const_cast< ::wxPoint2DDouble *>(p),sipType_wxPoint2DDouble,pState);
711
712 if (PyErr_Occurred())
713 return 0;
714
715 return sipConvertFromNewType(sipRes,sipType_wxPoint2DDouble,SIP_NULLPTR);
716 }
717 }
718
719 {
720 ::wxDouble dx;
721 ::wxDouble dy;
722 const ::wxAffineMatrix2D *sipCpp;
723
724 static const char *sipKwdList[] = {
725 sipName_dx,
726 sipName_dy,
727 };
728
729 if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bdd", &sipSelf, sipType_wxAffineMatrix2D, &sipCpp, &dx, &dy))
730 {
731 PyErr_Clear();
732
733 Py_BEGIN_ALLOW_THREADS
734 sipCpp->TransformDistance(&dx,&dy);
735 Py_END_ALLOW_THREADS
736
737 if (PyErr_Occurred())
738 return 0;
739
740 return sipBuildResult(0,"(dd)",dx,dy);
741 }
742 }
743
744 /* Raise an exception if the arguments couldn't be parsed. */
745 sipNoMethod(sipParseErr, sipName_AffineMatrix2D, sipName_TransformDistance, SIP_NULLPTR);
746
747 return SIP_NULLPTR;
748 }
749
750
751 extern "C" {static PyObject *slot_wxAffineMatrix2D___ne__(PyObject *,PyObject *);}
slot_wxAffineMatrix2D___ne__(PyObject * sipSelf,PyObject * sipArg)752 static PyObject *slot_wxAffineMatrix2D___ne__(PyObject *sipSelf,PyObject *sipArg)
753 {
754 ::wxAffineMatrix2D *sipCpp = reinterpret_cast< ::wxAffineMatrix2D *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxAffineMatrix2D));
755
756 if (!sipCpp)
757 return SIP_NULLPTR;
758
759 PyObject *sipParseErr = SIP_NULLPTR;
760
761 {
762 const ::wxAffineMatrix2DBase* t;
763
764 if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_wxAffineMatrix2DBase, &t))
765 {
766 bool sipRes;
767
768 PyErr_Clear();
769
770 Py_BEGIN_ALLOW_THREADS
771 sipRes = sipCpp-> ::wxAffineMatrix2D::operator!=(*t);
772 Py_END_ALLOW_THREADS
773
774 if (PyErr_Occurred())
775 return 0;
776
777 return PyBool_FromLong(sipRes);
778 }
779 }
780
781 Py_XDECREF(sipParseErr);
782
783 if (sipParseErr == Py_None)
784 return SIP_NULLPTR;
785
786 return sipPySlotExtend(&sipModuleAPI__core, ne_slot, sipType_wxAffineMatrix2D, sipSelf, sipArg);
787 }
788
789
790 extern "C" {static PyObject *slot_wxAffineMatrix2D___eq__(PyObject *,PyObject *);}
slot_wxAffineMatrix2D___eq__(PyObject * sipSelf,PyObject * sipArg)791 static PyObject *slot_wxAffineMatrix2D___eq__(PyObject *sipSelf,PyObject *sipArg)
792 {
793 ::wxAffineMatrix2D *sipCpp = reinterpret_cast< ::wxAffineMatrix2D *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxAffineMatrix2D));
794
795 if (!sipCpp)
796 return SIP_NULLPTR;
797
798 PyObject *sipParseErr = SIP_NULLPTR;
799
800 {
801 const ::wxAffineMatrix2DBase* t;
802
803 if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_wxAffineMatrix2DBase, &t))
804 {
805 bool sipRes;
806
807 PyErr_Clear();
808
809 Py_BEGIN_ALLOW_THREADS
810 sipRes = sipCpp-> ::wxAffineMatrix2D::operator==(*t);
811 Py_END_ALLOW_THREADS
812
813 if (PyErr_Occurred())
814 return 0;
815
816 return PyBool_FromLong(sipRes);
817 }
818 }
819
820 Py_XDECREF(sipParseErr);
821
822 if (sipParseErr == Py_None)
823 return SIP_NULLPTR;
824
825 return sipPySlotExtend(&sipModuleAPI__core, eq_slot, sipType_wxAffineMatrix2D, sipSelf, sipArg);
826 }
827
828
829 /* Cast a pointer to a type somewhere in its inheritance hierarchy. */
830 extern "C" {static void *cast_wxAffineMatrix2D(void *, const sipTypeDef *);}
cast_wxAffineMatrix2D(void * sipCppV,const sipTypeDef * targetType)831 static void *cast_wxAffineMatrix2D(void *sipCppV, const sipTypeDef *targetType)
832 {
833 ::wxAffineMatrix2D *sipCpp = reinterpret_cast< ::wxAffineMatrix2D *>(sipCppV);
834
835 if (targetType == sipType_wxAffineMatrix2DBase)
836 return static_cast< ::wxAffineMatrix2DBase *>(sipCpp);
837
838 return sipCppV;
839 }
840
841
842 /* Call the instance's destructor. */
843 extern "C" {static void release_wxAffineMatrix2D(void *, int);}
release_wxAffineMatrix2D(void * sipCppV,int sipState)844 static void release_wxAffineMatrix2D(void *sipCppV, int sipState)
845 {
846 Py_BEGIN_ALLOW_THREADS
847
848 if (sipState & SIP_DERIVED_CLASS)
849 delete reinterpret_cast<sipwxAffineMatrix2D *>(sipCppV);
850 else
851 delete reinterpret_cast< ::wxAffineMatrix2D *>(sipCppV);
852
853 Py_END_ALLOW_THREADS
854 }
855
856
857 extern "C" {static void assign_wxAffineMatrix2D(void *, SIP_SSIZE_T, void *);}
assign_wxAffineMatrix2D(void * sipDst,SIP_SSIZE_T sipDstIdx,void * sipSrc)858 static void assign_wxAffineMatrix2D(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
859 {
860 reinterpret_cast< ::wxAffineMatrix2D *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxAffineMatrix2D *>(sipSrc);
861 }
862
863
864 extern "C" {static void *array_wxAffineMatrix2D(SIP_SSIZE_T);}
array_wxAffineMatrix2D(SIP_SSIZE_T sipNrElem)865 static void *array_wxAffineMatrix2D(SIP_SSIZE_T sipNrElem)
866 {
867 return new ::wxAffineMatrix2D[sipNrElem];
868 }
869
870
871 extern "C" {static void *copy_wxAffineMatrix2D(const void *, SIP_SSIZE_T);}
copy_wxAffineMatrix2D(const void * sipSrc,SIP_SSIZE_T sipSrcIdx)872 static void *copy_wxAffineMatrix2D(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
873 {
874 return new ::wxAffineMatrix2D(reinterpret_cast<const ::wxAffineMatrix2D *>(sipSrc)[sipSrcIdx]);
875 }
876
877
878 extern "C" {static void dealloc_wxAffineMatrix2D(sipSimpleWrapper *);}
dealloc_wxAffineMatrix2D(sipSimpleWrapper * sipSelf)879 static void dealloc_wxAffineMatrix2D(sipSimpleWrapper *sipSelf)
880 {
881 if (sipIsDerivedClass(sipSelf))
882 reinterpret_cast<sipwxAffineMatrix2D *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;
883
884 if (sipIsOwnedByPython(sipSelf))
885 {
886 release_wxAffineMatrix2D(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
887 }
888 }
889
890
891 extern "C" {static void *init_type_wxAffineMatrix2D(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
init_type_wxAffineMatrix2D(sipSimpleWrapper * sipSelf,PyObject * sipArgs,PyObject * sipKwds,PyObject ** sipUnused,PyObject **,PyObject ** sipParseErr)892 static void *init_type_wxAffineMatrix2D(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
893 {
894 sipwxAffineMatrix2D *sipCpp = SIP_NULLPTR;
895
896 {
897 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
898 {
899 PyErr_Clear();
900
901 Py_BEGIN_ALLOW_THREADS
902 sipCpp = new sipwxAffineMatrix2D();
903 Py_END_ALLOW_THREADS
904
905 if (PyErr_Occurred())
906 {
907 delete sipCpp;
908 return SIP_NULLPTR;
909 }
910
911 sipCpp->sipPySelf = sipSelf;
912
913 return sipCpp;
914 }
915 }
916
917 {
918 const ::wxAffineMatrix2D* a0;
919
920 if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxAffineMatrix2D, &a0))
921 {
922 Py_BEGIN_ALLOW_THREADS
923 sipCpp = new sipwxAffineMatrix2D(*a0);
924 Py_END_ALLOW_THREADS
925
926 sipCpp->sipPySelf = sipSelf;
927
928 return sipCpp;
929 }
930 }
931
932 return SIP_NULLPTR;
933 }
934
935
936 /* Define this type's super-types. */
937 static sipEncodedTypeDef supers_wxAffineMatrix2D[] = {{12, 255, 1}};
938
939
940 /* Define this type's Python slots. */
941 static sipPySlotDef slots_wxAffineMatrix2D[] = {
942 {(void *)slot_wxAffineMatrix2D___ne__, ne_slot},
943 {(void *)slot_wxAffineMatrix2D___eq__, eq_slot},
944 {0, (sipPySlotType)0}
945 };
946
947
948 static PyMethodDef methods_wxAffineMatrix2D[] = {
949 {SIP_MLNAME_CAST(sipName_Concat), SIP_MLMETH_CAST(meth_wxAffineMatrix2D_Concat), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxAffineMatrix2D_Concat)},
950 {SIP_MLNAME_CAST(sipName_Get), SIP_MLMETH_CAST(meth_wxAffineMatrix2D_Get), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxAffineMatrix2D_Get)},
951 {SIP_MLNAME_CAST(sipName_Invert), meth_wxAffineMatrix2D_Invert, METH_VARARGS, SIP_MLDOC_CAST(doc_wxAffineMatrix2D_Invert)},
952 {SIP_MLNAME_CAST(sipName_IsEqual), SIP_MLMETH_CAST(meth_wxAffineMatrix2D_IsEqual), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxAffineMatrix2D_IsEqual)},
953 {SIP_MLNAME_CAST(sipName_IsIdentity), meth_wxAffineMatrix2D_IsIdentity, METH_VARARGS, SIP_MLDOC_CAST(doc_wxAffineMatrix2D_IsIdentity)},
954 {SIP_MLNAME_CAST(sipName_Mirror), SIP_MLMETH_CAST(meth_wxAffineMatrix2D_Mirror), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxAffineMatrix2D_Mirror)},
955 {SIP_MLNAME_CAST(sipName_Rotate), SIP_MLMETH_CAST(meth_wxAffineMatrix2D_Rotate), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxAffineMatrix2D_Rotate)},
956 {SIP_MLNAME_CAST(sipName_Scale), SIP_MLMETH_CAST(meth_wxAffineMatrix2D_Scale), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxAffineMatrix2D_Scale)},
957 {SIP_MLNAME_CAST(sipName_Set), SIP_MLMETH_CAST(meth_wxAffineMatrix2D_Set), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxAffineMatrix2D_Set)},
958 {SIP_MLNAME_CAST(sipName_TransformDistance), SIP_MLMETH_CAST(meth_wxAffineMatrix2D_TransformDistance), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxAffineMatrix2D_TransformDistance)},
959 {SIP_MLNAME_CAST(sipName_TransformPoint), SIP_MLMETH_CAST(meth_wxAffineMatrix2D_TransformPoint), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxAffineMatrix2D_TransformPoint)},
960 {SIP_MLNAME_CAST(sipName_Translate), SIP_MLMETH_CAST(meth_wxAffineMatrix2D_Translate), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxAffineMatrix2D_Translate)}
961 };
962
963 PyDoc_STRVAR(doc_wxAffineMatrix2D, "AffineMatrix2D()\n"
964 "\n"
965 "A 3x2 matrix representing an affine 2D transformation.");
966
967
968 sipClassTypeDef sipTypeDef__core_wxAffineMatrix2D = {
969 {
970 -1,
971 SIP_NULLPTR,
972 SIP_NULLPTR,
973 SIP_TYPE_CLASS,
974 sipNameNr_wxAffineMatrix2D,
975 {SIP_NULLPTR},
976 SIP_NULLPTR
977 },
978 {
979 sipNameNr_AffineMatrix2D,
980 {0, 0, 1},
981 12, methods_wxAffineMatrix2D,
982 0, SIP_NULLPTR,
983 0, SIP_NULLPTR,
984 {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
985 },
986 doc_wxAffineMatrix2D,
987 -1,
988 -1,
989 supers_wxAffineMatrix2D,
990 slots_wxAffineMatrix2D,
991 init_type_wxAffineMatrix2D,
992 SIP_NULLPTR,
993 SIP_NULLPTR,
994 #if PY_MAJOR_VERSION >= 3
995 SIP_NULLPTR,
996 SIP_NULLPTR,
997 #else
998 SIP_NULLPTR,
999 SIP_NULLPTR,
1000 SIP_NULLPTR,
1001 SIP_NULLPTR,
1002 #endif
1003 dealloc_wxAffineMatrix2D,
1004 assign_wxAffineMatrix2D,
1005 array_wxAffineMatrix2D,
1006 copy_wxAffineMatrix2D,
1007 release_wxAffineMatrix2D,
1008 cast_wxAffineMatrix2D,
1009 SIP_NULLPTR,
1010 SIP_NULLPTR,
1011 SIP_NULLPTR,
1012 SIP_NULLPTR,
1013 SIP_NULLPTR,
1014 SIP_NULLPTR
1015 };
1016