author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 30 May 2012 20:06:35 +0000 | |
changeset 11 | fdc697f4f190 |
parent 7 | 392289f92fab |
child 12 | e5f0c18af8a9 |
permissions | -rw-r--r-- |
1 | 1 |
"{ Package: 'stx:goodies/libcairo' }" |
2 |
||
3 |
"{ NameSpace: Cairo }" |
|
4 |
||
5 |
ExternalStructure subclass:#Matrix |
|
6 |
instanceVariableNames:'' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
9 |
category:'Cairo - Objects' |
1 | 10 |
! |
11 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
12 |
|
1 | 13 |
!Matrix class methodsFor:'accessing'! |
14 |
||
15 |
libraryName |
|
16 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
17 |
OperatingSystem isUNIXlike ifTrue:[^'libcairo.so.2']. |
1 | 18 |
|
19 |
OperatingSystem isMSWINDOWSlike ifTrue:[^'cairo.dll']. |
|
20 |
||
21 |
self error:'Library name for host OS is not known' |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
22 |
! |
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
23 |
|
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
24 |
structSize |
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
25 |
|
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
26 |
^384 |
1 | 27 |
! ! |
28 |
||
29 |
!Matrix class methodsFor:'primitives'! |
|
30 |
||
31 |
primInit: matrix xx: xx yx: yx xy: xy yy: yy x0: x0 y0: y0 |
|
32 |
||
33 |
<cdecl: void "cairo_matrix_init" ( Cairo::Matrix double double double double double double ) > |
|
34 |
self primitiveFailed |
|
35 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
36 |
"Modified: / 10-09-2008 / 18:19:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 37 |
! |
38 |
||
39 |
primInitIdentity: matrix |
|
40 |
||
41 |
<cdecl: void "cairo_matrix_init_identity" ( Cairo::Matrix ) > |
|
42 |
self primitiveFailed |
|
43 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
44 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 45 |
! |
46 |
||
47 |
primInitRotate: matrix radians: radians |
|
48 |
||
49 |
<cdecl: void "cairo_matrix_init_rotate" ( Cairo::Matrix double ) > |
|
50 |
self primitiveFailed |
|
51 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
52 |
"Modified: / 10-09-2008 / 18:19:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 53 |
! |
54 |
||
55 |
primInitScale: matrix sx: sx sy: sy |
|
56 |
||
57 |
<cdecl: void "cairo_matrix_init_scale" ( Cairo::Matrix double double ) > |
|
58 |
self primitiveFailed |
|
59 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
60 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 61 |
! |
62 |
||
63 |
primInitTranslate: matrix tx: tx ty: ty |
|
64 |
||
65 |
<cdecl: void "cairo_matrix_init_translate" ( Cairo::Matrix double double ) > |
|
66 |
self primitiveFailed |
|
67 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
68 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 69 |
! |
70 |
||
71 |
primInvert: matrix |
|
72 |
||
73 |
<cdecl: int32 "cairo_matrix_invert" ( Cairo::Matrix ) > |
|
74 |
self primitiveFailed |
|
75 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
76 |
"Modified: / 10-09-2008 / 18:19:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 77 |
! |
78 |
||
11 | 79 |
primMatrixInit: matrix xx: xx yx: yx xy: xy yy: yy x0: x0 y0: y0 |
80 |
||
81 |
<cdecl: void "cairo_matrix_init" ( Cairo::Matrix double double double double double double ) > |
|
82 |
self primitiveFailed |
|
83 |
! |
|
84 |
||
85 |
primMatrixInitIdentity: matrix |
|
86 |
||
87 |
<cdecl: void "cairo_matrix_init_identity" ( Cairo::Matrix ) > |
|
88 |
self primitiveFailed |
|
89 |
! |
|
90 |
||
91 |
primMatrixInitRotate: matrix radians: radians |
|
92 |
||
93 |
<cdecl: void "cairo_matrix_init_rotate" ( Cairo::Matrix double ) > |
|
94 |
self primitiveFailed |
|
95 |
! |
|
96 |
||
97 |
primMatrixInitScale: matrix sx: sx sy: sy |
|
98 |
||
99 |
<cdecl: void "cairo_matrix_init_scale" ( Cairo::Matrix double double ) > |
|
100 |
self primitiveFailed |
|
101 |
! |
|
102 |
||
103 |
primMatrixInitTranslate: matrix tx: tx ty: ty |
|
104 |
||
105 |
<cdecl: void "cairo_matrix_init_translate" ( Cairo::Matrix double double ) > |
|
106 |
self primitiveFailed |
|
107 |
! |
|
108 |
||
109 |
primMatrixInvert: matrix |
|
110 |
||
111 |
<cdecl: int32 "cairo_matrix_invert" ( Cairo::Matrix ) > |
|
112 |
self primitiveFailed |
|
113 |
! |
|
114 |
||
115 |
primMatrixMultiply: result a: a b: b |
|
116 |
||
117 |
<cdecl: void "cairo_matrix_multiply" ( Cairo::Matrix Cairo::Matrix Cairo::Matrix ) > |
|
118 |
self primitiveFailed |
|
119 |
! |
|
120 |
||
121 |
primMatrixRotate: matrix radians: radians |
|
122 |
||
123 |
<cdecl: void "cairo_matrix_rotate" ( Cairo::Matrix double ) > |
|
124 |
self primitiveFailed |
|
125 |
! |
|
126 |
||
127 |
primMatrixScale: matrix sx: sx sy: sy |
|
128 |
||
129 |
<cdecl: void "cairo_matrix_scale" ( Cairo::Matrix double double ) > |
|
130 |
self primitiveFailed |
|
131 |
! |
|
132 |
||
133 |
primMatrixTransformDistance: matrix dx: dx dy: dy |
|
134 |
||
135 |
<cdecl: void "cairo_matrix_transform_distance" ( Cairo::Matrix doublePointer doublePointer ) > |
|
136 |
self primitiveFailed |
|
137 |
! |
|
138 |
||
139 |
primMatrixTransformPoint: matrix x: x y: y |
|
140 |
||
141 |
<cdecl: void "cairo_matrix_transform_point" ( Cairo::Matrix doublePointer doublePointer ) > |
|
142 |
self primitiveFailed |
|
143 |
! |
|
144 |
||
145 |
primMatrixTranslate: matrix tx: tx ty: ty |
|
146 |
||
147 |
<cdecl: void "cairo_matrix_translate" ( Cairo::Matrix double double ) > |
|
148 |
self primitiveFailed |
|
149 |
! |
|
150 |
||
1 | 151 |
primMultiply: result a: a b: b |
152 |
||
153 |
<cdecl: void "cairo_matrix_multiply" ( Cairo::Matrix Cairo::Matrix Cairo::Matrix ) > |
|
154 |
self primitiveFailed |
|
155 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
156 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 157 |
! |
158 |
||
159 |
primRotate: matrix radians: radians |
|
160 |
||
161 |
<cdecl: void "cairo_matrix_rotate" ( Cairo::Matrix double ) > |
|
162 |
self primitiveFailed |
|
163 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
164 |
"Modified: / 10-09-2008 / 18:19:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 165 |
! |
166 |
||
167 |
primScale: matrix sx: sx sy: sy |
|
168 |
||
169 |
<cdecl: void "cairo_matrix_scale" ( Cairo::Matrix double double ) > |
|
170 |
self primitiveFailed |
|
171 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
172 |
"Modified: / 10-09-2008 / 18:19:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 173 |
! |
174 |
||
175 |
primTransformDistance: matrix dx: dx dy: dy |
|
176 |
||
177 |
<cdecl: void "cairo_matrix_transform_distance" ( Cairo::Matrix pointer pointer ) > |
|
178 |
self primitiveFailed |
|
179 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
180 |
"Modified: / 10-09-2008 / 18:19:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 181 |
! |
182 |
||
183 |
primTransformPoint: matrix x: x y: y |
|
184 |
||
185 |
<cdecl: void "cairo_matrix_transform_point" ( Cairo::Matrix pointer pointer ) > |
|
186 |
self primitiveFailed |
|
187 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
188 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 189 |
! |
190 |
||
191 |
primTranslate: matrix tx: tx ty: ty |
|
192 |
||
193 |
<cdecl: void "cairo_matrix_translate" ( Cairo::Matrix double double ) > |
|
194 |
self primitiveFailed |
|
195 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
196 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 197 |
! ! |
198 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
199 |
!Matrix methodsFor:'accessing'! |
1 | 200 |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
201 |
x0 |
1 | 202 |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
203 |
^self doubleAt:1 + 32 |
1 | 204 |
! |
205 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
206 |
x0: value |
1 | 207 |
|
208 |
self doubleAt:1 + 32 put:value |
|
209 |
! |
|
210 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
211 |
xx |
1 | 212 |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
213 |
^self doubleAt:1 + 0 |
1 | 214 |
! |
215 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
216 |
xx: value |
1 | 217 |
|
218 |
self doubleAt:1 + 0 put:value |
|
219 |
! |
|
220 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
221 |
xy |
1 | 222 |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
223 |
^self doubleAt:1 + 16 |
1 | 224 |
! |
225 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
226 |
xy: value |
1 | 227 |
|
228 |
self doubleAt:1 + 16 put:value |
|
229 |
! |
|
230 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
231 |
y0 |
1 | 232 |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
233 |
^self doubleAt:1 + 40 |
1 | 234 |
! |
235 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
236 |
y0: value |
1 | 237 |
|
238 |
self doubleAt:1 + 40 put:value |
|
239 |
! |
|
240 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
241 |
yx |
1 | 242 |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
243 |
^self doubleAt:1 + 8 |
1 | 244 |
! |
245 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
246 |
yx: value |
1 | 247 |
|
248 |
self doubleAt:1 + 8 put:value |
|
249 |
! |
|
250 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
251 |
yy |
1 | 252 |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
253 |
^self doubleAt:1 + 24 |
1 | 254 |
! |
255 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
256 |
yy: value |
1 | 257 |
|
258 |
self doubleAt:1 + 24 put:value |
|
259 |
! ! |
|
260 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
261 |
!Matrix class methodsFor:'documentation'! |
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
262 |
|
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
263 |
version |
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
264 |
^'$Id$' |
11 | 265 |
! |
266 |
||
267 |
version_SVN |
|
268 |
^ '$Id:: $' |
|
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
269 |
! ! |