SVGUtils.h 625 B

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