Mac OS 9
CGAffineTransform.h
Go to the documentation of this file.
1 
19 #ifndef __CGAFFINETRANSFORM__
20 #define __CGAFFINETRANSFORM__
21 
22 #ifndef __CGBASE__
23 #include <CGBase.h>
24 #endif
25 
26 #ifndef __CGGEOMETRY__
27 #include <CGGeometry.h>
28 #endif
29 
30 #if PRAGMA_ONCE
31 #pragma once
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38 
39 #if PRAGMA_IMPORT
40 #pragma import on
41 #endif
42 
43 #if PRAGMA_STRUCT_ALIGN
44 #pragma options align = mac68k
45 #elif PRAGMA_STRUCT_PACKPUSH
46 #pragma pack(push, 2)
47 #elif PRAGMA_STRUCT_PACK
48 #pragma pack(2)
49 #endif
50 
52  {
53  float a;
54  float b;
55  float c;
56  float d;
57  float tx;
58  float ty;
59  };
60  typedef struct CGAffineTransform CGAffineTransform;
81  CGAffineTransformMake(float a, float b, float c, float d, float tx, float ty);
82 
94  CGAffineTransformMakeTranslation(float tx, float ty);
95 
107  CGAffineTransformMakeScale(float sx, float sy);
108 
121 
134 
147 
160 
173 
186 
198  CGPoint
200 
212  CGSize
214 
215 #ifdef __MWERKS__
216  CG_INLINE CGAffineTransform __CGAffineTransformMake(float a, float b, float c,
217  float d, float tx,
218  float ty)
219  {
221  t.a = a;
222  t.b = b;
223  t.c = c;
224  t.d = d;
225  t.tx = tx;
226  t.ty = ty;
227  return t;
228  }
229 #define CGAffineTransformMake __CGAffineTransformMake
230 
231  CG_INLINE CGPoint __CGPointApplyAffineTransform(CGPoint point,
233  {
234  CGPoint p;
235 
236  p.x = t.a * point.x + t.c * point.y + t.tx;
237  p.y = t.b * point.x + t.d * point.y + t.ty;
238  return p;
239  }
240 #define CGPointApplyAffineTransform __CGPointApplyAffineTransform
241 
242  CG_INLINE CGSize __CGSizeApplyAffineTransform(CGSize size,
244  {
245  CGSize s;
246 
247  s.width = t.a * size.width + t.c * size.height;
248  s.height = t.b * size.width + t.d * size.height;
249  return s;
250  }
251 #define CGSizeApplyAffineTransform __CGSizeApplyAffineTransform
252 
253 #endif
255 #if PRAGMA_STRUCT_ALIGN
256 #pragma options align = reset
257 #elif PRAGMA_STRUCT_PACKPUSH
258 #pragma pack(pop)
259 #elif PRAGMA_STRUCT_PACK
260 #pragma pack()
261 #endif
262 
263 #ifdef PRAGMA_IMPORT_OFF
264 #pragma import off
265 #elif PRAGMA_IMPORT
266 #pragma import reset
267 #endif
268 
269 #ifdef __cplusplus
270 }
271 #endif
272 
273 #endif
CGAffineTransform CGAffineTransformInvert(CGAffineTransform t)
CGAffineTransform CGAffineTransformMakeTranslation(float tx, float ty)
CGAffineTransform CGAffineTransformMake(float a, float b, float c, float d, float tx, float ty)
const CGAffineTransform CGAffineTransformIdentity
CGAffineTransform CGAffineTransformMakeScale(float sx, float sy)
CGAffineTransform CGAffineTransformRotate(CGAffineTransform t, float angle)
CGAffineTransform CGAffineTransformMakeRotation(float angle)
CGSize CGSizeApplyAffineTransform(CGSize size, CGAffineTransform t)
CGPoint CGPointApplyAffineTransform(CGPoint point, CGAffineTransform t)
CGAffineTransform CGAffineTransformTranslate(CGAffineTransform t, float tx, float ty)
CGAffineTransform CGAffineTransformConcat(CGAffineTransform t1, CGAffineTransform t2)
CGAffineTransform CGAffineTransformScale(CGAffineTransform t, float sx, float sy)
xxx put contents here xxx
xxx put contents here xxx
Definition: CGAffineTransform.h:52
Definition: CGGeometry.h:64
Definition: CGGeometry.h:71