SVGUtils.h 591 B

1234567891011121314151617181920212223242526
  1. //
  2. // SVGUtils.h
  3. // SVGKit
  4. //
  5. // Copyright Matt Rajca 2010-2011. All rights reserved.
  6. //
  7. #import <CoreFoundation/CoreFoundation.h>
  8. #import <CoreGraphics/CoreGraphics.h>
  9. #define RGB_N(v) (v) / 255.0f
  10. typedef struct {
  11. uint8_t r;
  12. uint8_t g;
  13. uint8_t b;
  14. uint8_t a;
  15. } SVGColor;
  16. SVGColor SVGColorMake (uint8_t r, uint8_t g, uint8_t b, uint8_t a);
  17. SVGColor SVGColorFromString (const char *string);
  18. CGFloat SVGPercentageFromString (const char *string);
  19. CGMutablePathRef createPathFromPointsInString (const char *string, boolean_t close);
  20. CGColorRef CGColorWithSVGColor (SVGColor color);