Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

270 lines
5.8 KiB

  1. /*
  2. File: CGAffineTransform.h
  3. Contains: CoreGraphics affine transforms
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 2000-2001 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef CGAFFINETRANSFORM_H_
  11. #define CGAFFINETRANSFORM_H_
  12. #ifndef __CGBASE__
  13. #include <CGBase.h>
  14. #endif
  15. #ifndef __CGGEOMETRY__
  16. #include <CGGeometry.h>
  17. #endif
  18. #if PRAGMA_ONCE
  19. #pragma once
  20. #endif
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #if PRAGMA_IMPORT
  25. #pragma import on
  26. #endif
  27. #if PRAGMA_STRUCT_ALIGN
  28. #pragma options align=mac68k
  29. #elif PRAGMA_STRUCT_PACKPUSH
  30. #pragma pack(push, 2)
  31. #elif PRAGMA_STRUCT_PACK
  32. #pragma pack(2)
  33. #endif
  34. struct CGAffineTransform {
  35. float a;
  36. float b;
  37. float c;
  38. float d;
  39. float tx;
  40. float ty;
  41. };
  42. typedef struct CGAffineTransform CGAffineTransform;
  43. /* The identity transform: [ 1 0 0 1 0 0 ]. */
  44. /*
  45. * CGAffineTransformIdentity
  46. *
  47. * Availability:
  48. * Non-Carbon CFM: not available
  49. * CarbonLib: not available
  50. * Mac OS X: in version 10.0 and later
  51. */
  52. extern const CGAffineTransform CGAffineTransformIdentity;
  53. /* Return the transform [ a b c d tx ty ]. */
  54. /*
  55. * CGAffineTransformMake()
  56. *
  57. * Availability:
  58. * Non-Carbon CFM: not available
  59. * CarbonLib: not available
  60. * Mac OS X: in version 10.0 and later
  61. */
  62. EXTERN_API_C( CGAffineTransform )
  63. CGAffineTransformMake(
  64. float a,
  65. float b,
  66. float c,
  67. float d,
  68. float tx,
  69. float ty);
  70. /* Return a transform which translates by `(tx, ty)':
  71. * t' = [ 1 0 0 1 tx ty ] */
  72. /*
  73. * CGAffineTransformMakeTranslation()
  74. *
  75. * Availability:
  76. * Non-Carbon CFM: not available
  77. * CarbonLib: not available
  78. * Mac OS X: in version 10.0 and later
  79. */
  80. EXTERN_API_C( CGAffineTransform )
  81. CGAffineTransformMakeTranslation(
  82. float tx,
  83. float ty);
  84. /* Return a transform which scales by `(sx, sy)':
  85. * t' = [ sx 0 0 sy 0 0 ] */
  86. /*
  87. * CGAffineTransformMakeScale()
  88. *
  89. * Availability:
  90. * Non-Carbon CFM: not available
  91. * CarbonLib: not available
  92. * Mac OS X: in version 10.0 and later
  93. */
  94. EXTERN_API_C( CGAffineTransform )
  95. CGAffineTransformMakeScale(
  96. float sx,
  97. float sy);
  98. /* Return a transform which rotates by `angle' radians:
  99. * t' = [ cos(angle) sin(angle) -sin(angle) cos(angle) 0 0 ] */
  100. /*
  101. * CGAffineTransformMakeRotation()
  102. *
  103. * Availability:
  104. * Non-Carbon CFM: not available
  105. * CarbonLib: not available
  106. * Mac OS X: in version 10.0 and later
  107. */
  108. EXTERN_API_C( CGAffineTransform )
  109. CGAffineTransformMakeRotation(float angle);
  110. /* Translate `t' by `(tx, ty)' and return the result:
  111. * t' = [ 1 0 0 1 tx ty ] * t */
  112. /*
  113. * CGAffineTransformTranslate()
  114. *
  115. * Availability:
  116. * Non-Carbon CFM: not available
  117. * CarbonLib: not available
  118. * Mac OS X: in version 10.0 and later
  119. */
  120. EXTERN_API_C( CGAffineTransform )
  121. CGAffineTransformTranslate(
  122. CGAffineTransform t,
  123. float tx,
  124. float ty);
  125. /* Scale `t' by `(sx, sy)' and return the result:
  126. * t' = [ sx 0 0 sy 0 0 ] * t */
  127. /*
  128. * CGAffineTransformScale()
  129. *
  130. * Availability:
  131. * Non-Carbon CFM: not available
  132. * CarbonLib: not available
  133. * Mac OS X: in version 10.0 and later
  134. */
  135. EXTERN_API_C( CGAffineTransform )
  136. CGAffineTransformScale(
  137. CGAffineTransform t,
  138. float sx,
  139. float sy);
  140. /* Rotate `t' by `angle' radians and return the result:
  141. * t' = [ cos(angle) sin(angle) -sin(angle) cos(angle) 0 0 ] * t */
  142. /*
  143. * CGAffineTransformRotate()
  144. *
  145. * Availability:
  146. * Non-Carbon CFM: not available
  147. * CarbonLib: not available
  148. * Mac OS X: in version 10.0 and later
  149. */
  150. EXTERN_API_C( CGAffineTransform )
  151. CGAffineTransformRotate(
  152. CGAffineTransform t,
  153. float angle);
  154. /* Invert `t' and return the result. If `t' has zero determinant, then `t'
  155. * is returned unchanged. */
  156. /*
  157. * CGAffineTransformInvert()
  158. *
  159. * Availability:
  160. * Non-Carbon CFM: not available
  161. * CarbonLib: not available
  162. * Mac OS X: in version 10.0 and later
  163. */
  164. EXTERN_API_C( CGAffineTransform )
  165. CGAffineTransformInvert(CGAffineTransform t);
  166. /* Concatenate `t2' to `t1' and returne the result:
  167. * t' = t1 * t2 */
  168. /*
  169. * CGAffineTransformConcat()
  170. *
  171. * Availability:
  172. * Non-Carbon CFM: not available
  173. * CarbonLib: not available
  174. * Mac OS X: in version 10.0 and later
  175. */
  176. EXTERN_API_C( CGAffineTransform )
  177. CGAffineTransformConcat(
  178. CGAffineTransform t1,
  179. CGAffineTransform t2);
  180. /* Transform `point' by `t' and return the result:
  181. * p' = p * t
  182. * where p = [ x y 1 ]. */
  183. /*
  184. * CGPointApplyAffineTransform()
  185. *
  186. * Availability:
  187. * Non-Carbon CFM: not available
  188. * CarbonLib: not available
  189. * Mac OS X: in version 10.0 and later
  190. */
  191. EXTERN_API_C( CGPoint )
  192. CGPointApplyAffineTransform(
  193. CGPoint point,
  194. CGAffineTransform t);
  195. /* Transform `size' by `t' and return the result:
  196. * s' = s * t
  197. * where s = [ width height 0 ]. */
  198. /*
  199. * CGSizeApplyAffineTransform()
  200. *
  201. * Availability:
  202. * Non-Carbon CFM: not available
  203. * CarbonLib: not available
  204. * Mac OS X: in version 10.0 and later
  205. */
  206. EXTERN_API_C( CGSize )
  207. CGSizeApplyAffineTransform(
  208. CGSize size,
  209. CGAffineTransform t);
  210. #if PRAGMA_STRUCT_ALIGN
  211. #pragma options align=reset
  212. #elif PRAGMA_STRUCT_PACKPUSH
  213. #pragma pack(pop)
  214. #elif PRAGMA_STRUCT_PACK
  215. #pragma pack()
  216. #endif
  217. #ifdef PRAGMA_IMPORT_OFF
  218. #pragma import off
  219. #elif PRAGMA_IMPORT
  220. #pragma import reset
  221. #endif
  222. #ifdef __cplusplus
  223. }
  224. #endif
  225. #endif /* CGAFFINETRANSFORM_H_ */