CGPathWriter.h 1.7 KB

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