Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / GraphicsMatrix.xs
1 #############################################################################
2 ## Name:        XS/GraphicsMatrix.xs
3 ## Purpose:     XS for Wx::GraphicsMatrix
4 ## Author:      Klaas Hartmann
5 ## Modified by:
6 ## Created:     29/06/2007
7 ## RCS-ID:      $Id: GraphicsMatrix.xs 2110 2007-08-03 19:20:51Z mbarbon $
8 ## Copyright:   (c) 2007 Klaas Hartmann
9 ## Licence:     This program is free software; you can redistribute it and/or
10 ##              modify it under the same terms as Perl itself
11 #############################################################################
12
13 #if wxUSE_GRAPHICS_CONTEXT
14
15 #include <wx/graphics.h>
16
17 MODULE=Wx PACKAGE=Wx::GraphicsMatrix
18
19 void
20 wxGraphicsMatrix::Concat ( t )
21     wxGraphicsMatrix* t
22
23 void
24 wxGraphicsMatrix::Get ( )
25   PREINIT:
26     wxDouble a, b, c, d, tx, ty;
27   PPCODE:
28     THIS->Get( &a, &b, &c, &d, &tx, &ty );
29     EXTEND( SP, 6 );
30     PUSHs( sv_2mortal( newSVnv( a ) ) );
31     PUSHs( sv_2mortal( newSVnv( b ) ) );
32     PUSHs( sv_2mortal( newSVnv( c ) ) );
33     PUSHs( sv_2mortal( newSVnv( d ) ) );
34     PUSHs( sv_2mortal( newSVnv( tx ) ) );
35     PUSHs( sv_2mortal( newSVnv( ty ) ) );
36
37 void
38 wxGraphicsMatrix::Invert ()
39
40 bool 
41 wxGraphicsMatrix::IsEqual ( t )
42     wxGraphicsMatrix* t
43   C_ARGS: *t
44
45 bool
46 wxGraphicsMatrix::IsIdentity ()
47
48 void 
49 wxGraphicsMatrix::Rotate (angle)
50     wxDouble angle
51
52 void 
53 wxGraphicsMatrix::Scale (xScale, yScale)
54     wxDouble xScale
55     wxDouble yScale
56
57 void 
58 wxGraphicsMatrix::Translate (dx, dy)
59     wxDouble dx
60     wxDouble dy
61
62 void 
63 wxGraphicsMatrix::Set (a, b, c, d, tx, ty)
64     wxDouble a
65     wxDouble b
66     wxDouble c 
67     wxDouble d
68     wxDouble tx
69     wxDouble ty
70
71 void
72 wxGraphicsMatrix::TransformPoint ( x, y )
73     wxDouble x
74     wxDouble y
75   PREINIT:
76     wxDouble x_out, y_out;
77   PPCODE:
78     x_out = x;
79     y_out = y;
80     THIS->TransformPoint( &x, &y );
81     EXTEND( SP, 2 );
82     PUSHs( sv_2mortal( newSVnv( x ) ) );
83     PUSHs( sv_2mortal( newSVnv( y ) ) );
84
85 void
86 wxGraphicsMatrix::TransformDistance ( dx, dy )
87     wxDouble dx
88     wxDouble dy
89   PREINIT:
90     wxDouble dx_out, dy_out;
91   PPCODE:
92     dx_out = dx;
93     dy_out = dy;
94     THIS->TransformDistance( &dx, &dy );
95     EXTEND( SP, 2 );
96     PUSHs( sv_2mortal( newSVnv( dx ) ) );
97     PUSHs( sv_2mortal( newSVnv( dy ) ) );
98
99 #endif