Cairo__Matrix.st
changeset 11 fdc697f4f190
parent 7 392289f92fab
child 12 e5f0c18af8a9
equal deleted inserted replaced
10:dd5fece7c8d2 11:fdc697f4f190
    17 	OperatingSystem isUNIXlike ifTrue:[^'libcairo.so.2'].
    17 	OperatingSystem isUNIXlike ifTrue:[^'libcairo.so.2'].
    18 
    18 
    19 	OperatingSystem isMSWINDOWSlike ifTrue:[^'cairo.dll'].
    19 	OperatingSystem isMSWINDOWSlike ifTrue:[^'cairo.dll'].
    20 
    20 
    21 	self error:'Library name for host OS is not known'
    21 	self error:'Library name for host OS is not known'
    22 
       
    23     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
    24 !
    22 !
    25 
    23 
    26 structSize
    24 structSize
    27 
    25 
    28 	^384
    26 	^384
    29 
       
    30     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
    31 ! !
    27 ! !
    32 
    28 
    33 !Matrix class methodsFor:'primitives'!
    29 !Matrix class methodsFor:'primitives'!
    34 
    30 
    35 primInit: matrix xx: xx yx: yx xy: xy yy: yy x0: x0 y0: y0 
    31 primInit: matrix xx: xx yx: yx xy: xy yy: yy x0: x0 y0: y0 
    78 	self primitiveFailed
    74 	self primitiveFailed
    79 
    75 
    80     "Modified: / 10-09-2008 / 18:19:54 / Jan Vrany <vranyj1@fel.cvut.cz>"
    76     "Modified: / 10-09-2008 / 18:19:54 / Jan Vrany <vranyj1@fel.cvut.cz>"
    81 !
    77 !
    82 
    78 
       
    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 
    83 primMultiply: result a: a b: b 
   151 primMultiply: result a: a b: b 
    84 
   152 
    85 	<cdecl: void "cairo_matrix_multiply" ( Cairo::Matrix Cairo::Matrix Cairo::Matrix ) >
   153 	<cdecl: void "cairo_matrix_multiply" ( Cairo::Matrix Cairo::Matrix Cairo::Matrix ) >
    86 	self primitiveFailed
   154 	self primitiveFailed
    87 
   155 
   131 !Matrix methodsFor:'accessing'!
   199 !Matrix methodsFor:'accessing'!
   132 
   200 
   133 x0
   201 x0
   134 
   202 
   135 	^self doubleAt:1 + 32
   203 	^self doubleAt:1 + 32
   136 
       
   137     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   138 !
   204 !
   139 
   205 
   140 x0: value
   206 x0: value
   141 
   207 
   142 	self doubleAt:1 + 32 put:value
   208 	self doubleAt:1 + 32 put:value
   143 
       
   144     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   145 !
   209 !
   146 
   210 
   147 xx
   211 xx
   148 
   212 
   149 	^self doubleAt:1 + 0
   213 	^self doubleAt:1 + 0
   150 
       
   151     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   152 !
   214 !
   153 
   215 
   154 xx: value
   216 xx: value
   155 
   217 
   156 	self doubleAt:1 + 0 put:value
   218 	self doubleAt:1 + 0 put:value
   157 
       
   158     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   159 !
   219 !
   160 
   220 
   161 xy
   221 xy
   162 
   222 
   163 	^self doubleAt:1 + 16
   223 	^self doubleAt:1 + 16
   164 
       
   165     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   166 !
   224 !
   167 
   225 
   168 xy: value
   226 xy: value
   169 
   227 
   170 	self doubleAt:1 + 16 put:value
   228 	self doubleAt:1 + 16 put:value
   171 
       
   172     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   173 !
   229 !
   174 
   230 
   175 y0
   231 y0
   176 
   232 
   177 	^self doubleAt:1 + 40
   233 	^self doubleAt:1 + 40
   178 
       
   179     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   180 !
   234 !
   181 
   235 
   182 y0: value
   236 y0: value
   183 
   237 
   184 	self doubleAt:1 + 40 put:value
   238 	self doubleAt:1 + 40 put:value
   185 
       
   186     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   187 !
   239 !
   188 
   240 
   189 yx
   241 yx
   190 
   242 
   191 	^self doubleAt:1 + 8
   243 	^self doubleAt:1 + 8
   192 
       
   193     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   194 !
   244 !
   195 
   245 
   196 yx: value
   246 yx: value
   197 
   247 
   198 	self doubleAt:1 + 8 put:value
   248 	self doubleAt:1 + 8 put:value
   199 
       
   200     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   201 !
   249 !
   202 
   250 
   203 yy
   251 yy
   204 
   252 
   205 	^self doubleAt:1 + 24
   253 	^self doubleAt:1 + 24
   206 
       
   207     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   208 !
   254 !
   209 
   255 
   210 yy: value
   256 yy: value
   211 
   257 
   212 	self doubleAt:1 + 24 put:value
   258 	self doubleAt:1 + 24 put:value
   213 
       
   214     "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   215 ! !
   259 ! !
   216 
   260 
   217 !Matrix class methodsFor:'documentation'!
   261 !Matrix class methodsFor:'documentation'!
   218 
   262 
   219 version
   263 version
   220     ^'$Id$'
   264     ^'$Id$'
   221 ! !
   265 !
       
   266 
       
   267 version_SVN
       
   268     ^ '$Id::                                                                                                                        $'
       
   269 ! !