GSGeometry.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. GSGeometry.h ... Geometry-related APIs.
  3. Copyright (c) 2009 KennyTM~ <kennytm@gmail.com>
  4. All rights reserved.
  5. Redistribution and use in source and binary forms, with or without modification,
  6. are permitted provided that the following conditions are met:
  7. * Redistributions of source code must retain the above copyright notice, this
  8. list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright notice,
  10. this list of conditions and the following disclaimer in the documentation
  11. and/or other materials provided with the distribution.
  12. * Neither the name of the KennyTM~ nor the names of its contributors may be
  13. used to endorse or promote products derived from this software without
  14. specific prior written permission.
  15. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  16. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  17. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  18. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
  19. ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  20. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  21. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  22. ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  23. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  24. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25. */
  26. #ifndef GSGEOMETRY_H
  27. #define GSGEOMETRY_H
  28. #include <CoreGraphics/CoreGraphics.h>
  29. #include <CoreFoundation/CoreFoundation.h>
  30. #if __cplusplus
  31. extern "C" {
  32. #endif
  33. CGAffineTransform GSGeometryGetTransformFromRectToRect(CGRect from, CGRect to);
  34. /// Create a string representing the affine transform, in the form "[%f %f %f %f %f %f]"
  35. CFStringRef CFStringCreateWithCGAffineTransform(CGAffineTransform tx);
  36. CFStringRef CFStringCreateWithCGSize(CGSize size);
  37. CFStringRef CFStringCreateWithCGPoint(CGPoint pt);
  38. CFStringRef CFStringCreateWithCGRect(CGRect rect);
  39. #if __cplusplus
  40. }
  41. #endif
  42. #endif