Untitled


SUBMITTED BY: Guest

DATE: Nov. 25, 2014, 7:16 a.m.

FORMAT: Text only

SIZE: 2.5 kB

HITS: 47381

  1. /* CoreGraphics - CGLayer.h
  2. * Copyright (c) 2004-2008 Apple Inc.
  3. * All rights reserved. */
  4. #ifndef CGLAYER_H_
  5. #define CGLAYER_H_
  6. typedef struct CGLayer *CGLayerRef;
  7. #include <CoreGraphics/CGBase.h>
  8. #include <CoreGraphics/CGContext.h>
  9. CF_IMPLICIT_BRIDGING_ENABLED
  10. /* Create a layer of size `size' relative to the context `context'. The
  11. value of `size' is specified in default user space (base space) units.
  12. The parameter `auxiliaryInfo' should be NULL; it is reserved for future
  13. expansion. */
  14. CG_EXTERN CGLayerRef CGLayerCreateWithContext(CGContextRef context,
  15. CGSize size, CFDictionaryRef auxiliaryInfo)
  16. CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
  17. /* Equivalent to `CFRetain(layer)', except it doesn't crash (as CFRetain
  18. does) if `layer' is NULL. */
  19. CG_EXTERN CGLayerRef CGLayerRetain(CGLayerRef layer)
  20. CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
  21. /* Equivalent to `CFRelease(layer)', except it doesn't crash (as CFRelease
  22. does) if `layer' is NULL. */
  23. CG_EXTERN void CGLayerRelease(CGLayerRef layer)
  24. CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
  25. /* Return the size of the layer `layer'. */
  26. CG_EXTERN CGSize CGLayerGetSize(CGLayerRef layer)
  27. CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
  28. /* Return the context of `layer'. */
  29. CG_EXTERN CGContextRef CGLayerGetContext(CGLayerRef layer)
  30. CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
  31. /* Draw the contents of `layer' into `rect' of `context'. The contents are
  32. scaled, if necessary, to fit into `rect'; the rectangle `rect' is in user
  33. space. */
  34. CG_EXTERN void CGContextDrawLayerInRect(CGContextRef context, CGRect rect,
  35. CGLayerRef layer) CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
  36. /* Draw the contents of `layer' at `point' in `context'. This is equivalent
  37. to calling "CGContextDrawLayerInRect" with a rectangle having origin at
  38. `point' and size equal to the size of `layer'. */
  39. CG_EXTERN void CGContextDrawLayerAtPoint(CGContextRef context, CGPoint point,
  40. CGLayerRef layer) CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
  41. /* Return the CFTypeID for CGLayerRefs. */
  42. CG_EXTERN CFTypeID CGLayerGetTypeID(void)
  43. CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
  44. CF_IMPLICIT_BRIDGING_DISABLED
  45. #endif /* CGLAYER_H_ */

comments powered by Disqus