NSCoder_MROCGPath.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // NSCoder_MROCGPath.h
  3. //
  4. // Created by Marcus Rohrmoser on 26.10.10.
  5. // Copyright (c) 2010-2015, Marcus Rohrmoser mobile Software
  6. // All rights reserved.
  7. //
  8. // Redistribution and use in source and binary forms, with or without modification, are permitted
  9. // provided that the following conditions are met:
  10. //
  11. // 1. Redistributions of source code must retain the above copyright notice, this list of conditions
  12. // and the following disclaimer.
  13. //
  14. // 2. The software must not be used for military or intelligence or related purposes nor
  15. // anything that's in conflict with human rights as declared in http://www.un.org/en/documents/udhr/ .
  16. //
  17. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
  18. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  19. // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  20. // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  21. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  22. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
  23. // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  24. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25. //
  26. //
  27. #import <CoreGraphics/CGPath.h>
  28. /** Persist a CGPath using the SVG path format as ASCII/C String
  29. * http://www.w3.org/TR/SVG11/paths.html#PathDataBNF .
  30. * @see CGPathToCString(CGPathRef p, size_t c, size_t i)
  31. * @see PathParser
  32. */
  33. @interface NSCoder(MROCGPath)
  34. -(void)encodeCGPath:(CGPathRef)value forKey:(NSString *)key;
  35. -(CGPathRef)decodeCGPathForKey:(NSString *)key;
  36. @end