TrafoParser.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // TrafoParser.h
  3. //
  4. // Created by Marcus Rohrmoser on 11.03.10.
  5. // Copyright (c) 2010-2014, 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 "RagelParser.h"
  28. #import <CoreGraphics/CGAffineTransform.h>
  29. /** Parser for <a href="http://www.w3.org/TR/SVG11/coords.html#TransformAttribute">SVG transform attributes</a>.
  30. *
  31. * The implementation is generated via <a href="http://www.complang.org/ragel/">Ragel</a>
  32. * from TrafoParser.rl.
  33. *
  34. * <b>DO NOT EDIT TrafoParser.m MANUALLY!!!</b>
  35. *
  36. * See also https://lib2geom.svn.sourceforge.net/svnroot/lib2geom/lib2geom/trunk/src/2geom/svg-path-parser.rl
  37. */
  38. @interface TrafoParser : RagelParser {}
  39. /** Do the actual parsing. Stateless and reentrant.
  40. * @param data content of a svg transform attribute.
  41. * @param errPtr out parameter to report parsing problems.
  42. * @return a core graphics transformation.
  43. */
  44. -(CGAffineTransform)newCGAffineTransformWithNSString:(NSString *)data error:(NSError **)errPtr;
  45. #if 0
  46. -(CGAffineTransform)newCGAffineTransformWithCString:(const char *)data length:(int)length error:(NSError **)errPtr;
  47. #endif
  48. @end