BaseClassForAllSVGBasicShapes.h 987 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. This class is FOR IMPLEMENTATION ONLY, it is NOT part of the SVG Spec.
  3. All the SVG Basic Shapes are rendered in ObjectiveC using the same CGPath primitive - so this class provides
  4. a clean, OOP, way of implementing that.
  5. Sub-classes MUST write to the "pathForShapeInRelativeCoords" property, and this superclass will automatically generate
  6. the required CALayer on the fly, using that CGPath
  7. */
  8. #import "SVGElement.h"
  9. #import "ConverterSVGToCALayer.h"
  10. #import "SVGUtils.h"
  11. #import "SVGTransformable.h"
  12. @class SVGGradientElement;
  13. @class SVGKPattern;
  14. @interface BaseClassForAllSVGBasicShapes : SVGElement < SVGStylable, SVGTransformable, ConverterSVGToCALayer >
  15. {
  16. /* FIXME: are any of these private elements in the SVG spec? */
  17. NSString *_styleClass;
  18. CGRect _layerRect;
  19. }
  20. /** The actual path as parsed from the original file. THIS MIGHT NOT BE NORMALISED (TODO: perhaps an extra feature?) */
  21. @property (nonatomic, readonly) CGPathRef pathForShapeInRelativeCoords;
  22. @end