author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 17 Jun 2012 14:49:30 +0000 | |
changeset 16 | a810555a635c |
parent 13 | 71529a6f007d |
child 20 | 18a3e6b5f310 |
permissions | -rw-r--r-- |
11 | 1 |
"{ Package: 'stx:goodies/libcairo' }"! |
2 |
||
3 |
!Cairo class methodsFor:'accessing'! |
|
4 |
||
5 |
libraryName |
|
6 |
||
13 | 7 |
OperatingSystem isUNIXlike ifTrue:[^'libcairo.so.2']. |
11 | 8 |
|
13 | 9 |
OperatingSystem isMSWINDOWSlike ifTrue:[^'cairo.dll']. |
11 | 10 |
|
13 | 11 |
self error:'Library name for host OS is not known' |
11 | 12 |
|
13 |
"Created: / 10-09-2008 / 19:29:18 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
14 |
! ! |
|
15 |
||
16 |
!Cairo class methodsFor:'primitives'! |
|
17 |
||
18 |
primDebugResetStaticData |
|
19 |
||
20 |
<cdecl: void "cairo_debug_reset_static_data" ( ) > |
|
21 |
self primitiveFailed |
|
22 |
||
23 |
"Created: / 10-09-2008 / 19:08:49 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
24 |
! ! |
|
25 |
||
26 |
!Cairo class methodsFor:'primitives'! |
|
27 |
||
13 | 28 |
primFormatStrideForWidth: format width: width |
11 | 29 |
|
30 |
<cdecl: int32 "cairo_format_stride_for_width" ( int32 int32 ) > |
|
31 |
self primitiveFailed |
|
32 |
||
33 |
"Created: / 10-09-2008 / 19:08:49 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
34 |
! ! |
|
35 |
||
36 |
!Cairo class methodsFor:'primitives'! |
|
37 |
||
13 | 38 |
primStatusToString: status |
11 | 39 |
|
40 |
<cdecl: charPointer "cairo_status_to_string" ( int32 ) > |
|
41 |
self primitiveFailed |
|
42 |
||
43 |
"Created: / 10-09-2008 / 19:08:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
44 |
! ! |
|
1 | 45 |
|
11 | 46 |
!Cairo class methodsFor:'primitives'! |
47 |
||
48 |
primVersion |
|
49 |
||
50 |
<cdecl: int32 "cairo_version" ( ) > |
|
51 |
self primitiveFailed |
|
52 |
||
53 |
"Created: / 10-09-2008 / 19:08:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
54 |
! ! |
|
55 |
||
56 |
!Cairo class methodsFor:'primitives'! |
|
57 |
||
58 |
primVersionString |
|
59 |
||
60 |
<cdecl: charPointer "cairo_version_string" ( ) > |
|
61 |
self primitiveFailed |
|
62 |
||
63 |
"Created: / 10-09-2008 / 19:08:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
64 |
! ! |
|
65 |
||
66 |
!Cairo class methodsFor:'accessing'! |
|
67 |
||
68 |
statusToString: status |
|
69 |
||
70 |
^self primStatusToString: status |
|
71 |
||
72 |
"Created: / 10-09-2008 / 19:33:31 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
73 |
! ! |
|
74 |
||
75 |
!Cairo class methodsFor:'accessing'! |
|
76 |
||
77 |
version |
|
78 |
||
79 |
^self primVersion |
|
80 |
||
81 |
"Created: / 10-09-2008 / 19:32:34 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
82 |
! ! |
|
83 |
||
84 |
!Cairo class methodsFor:'accessing'! |
|
85 |
||
86 |
versionString |
|
87 |
||
88 |
^self primVersionString |
|
89 |
||
90 |
"Created: / 10-09-2008 / 19:32:48 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
91 |
! ! |
|
1 | 92 |
|
93 |
!DeviceGraphicsContext methodsFor:'cairo support'! |
|
94 |
||
95 |
drawableId |
|
96 |
||
97 |
^drawableId |
|
98 |
||
99 |
"Created: / 10-07-2008 / 10:20:04 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
100 |
! ! |
|
11 | 101 |
|
1 | 102 |
!GraphicsDevice methodsFor:'cairo support'! |
103 |
||
104 |
cairoSurfaceFor: view |
|
105 |
||
106 |
self error:'Graphics device not supported' |
|
107 |
||
108 |
"Created: / 10-07-2008 / 10:16:21 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
109 |
! ! |
|
11 | 110 |
|
1 | 111 |
!GraphicsDevice methodsFor:'accessing'! |
112 |
||
113 |
displayId |
|
114 |
^ displayId |
|
115 |
||
116 |
"Created: / 04-07-2008 / 12:58:56 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
117 |
! ! |
|
11 | 118 |
|
2
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
119 |
!SimpleView methodsFor:'cairo support'! |
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
120 |
|
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
121 |
cairo |
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
122 |
^ Cairo::GraphicsContext on:self cairoSurface |
2
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
123 |
|
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
124 |
"Created: / 10-09-2008 / 18:23:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
2
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
125 |
! ! |
11 | 126 |
|
2
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
127 |
!SimpleView methodsFor:'cairo support'! |
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
128 |
|
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
129 |
cairoSurface |
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
130 |
|
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
131 |
^Cairo::Surface forView: self |
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
132 |
|
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
133 |
"Created: / 10-07-2008 / 19:39:58 / Jan Vrany <vranyj1@fel.cvut.cz>" |
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
134 |
! ! |
11 | 135 |
|
1 | 136 |
!XWorkstation methodsFor:'cairo support'! |
137 |
||
138 |
cairoSurfaceFor: view |
|
139 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
140 |
| surface | |
13 | 141 |
surface := Cairo::Surface |
16 | 142 |
forXlib: displayId |
143 |
drawable: view drawableId address |
|
144 |
visual: self defaultVisual |
|
145 |
width: view width |
|
146 |
height: view height. |
|
147 |
surface setView: view. |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
148 |
"/view addDependent: surface. |
2
c2f163833877
Xlib surfaces are dependents of associated view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
149 |
^surface |
1 | 150 |
|
151 |
"Created: / 10-07-2008 / 10:16:36 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
152 |
"Modified: / 09-09-2008 / 22:57:22 / Jan Vrany <vranyj1@fel.cvut.cz>" |
16 | 153 |
"Modified: / 17-06-2012 / 15:05:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
154 |
! ! |
11 | 155 |
|
156 |
!stx_goodies_libcairo class methodsFor:'documentation'! |
|
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
157 |
|
11 | 158 |
extensionsVersion_SVN |
159 |
^ '$Id:: $' |
|
160 |
! ! |