#include "platform/geometry/FloatRect.h"
#include "wtf/HashSet.h"
-namespace WebCore {
+namespace blink {
-class AffineTransform;
class RenderObject;
-class RenderSVGResourceMarker FINAL : public RenderSVGResourceContainer {
+class RenderSVGResourceMarker final : public RenderSVGResourceContainer {
public:
explicit RenderSVGResourceMarker(SVGMarkerElement*);
virtual ~RenderSVGResourceMarker();
- virtual const char* renderName() const OVERRIDE { return "RenderSVGResourceMarker"; }
+ virtual const char* renderName() const override { return "RenderSVGResourceMarker"; }
- virtual void removeAllClientsFromCache(bool markForInvalidation = true) OVERRIDE;
- virtual void removeClientFromCache(RenderObject*, bool markForInvalidation = true) OVERRIDE;
-
- void draw(PaintInfo&, const AffineTransform&);
+ virtual void removeAllClientsFromCache(bool markForInvalidation = true) override;
+ virtual void removeClientFromCache(RenderObject*, bool markForInvalidation = true) override;
// Calculates marker boundaries, mapped to the target element's coordinate space
FloatRect markerBoundaries(const AffineTransform& markerTransformation) const;
- virtual void applyViewportClip(PaintInfo&) OVERRIDE;
- virtual void layout() OVERRIDE;
- virtual void calcViewport() OVERRIDE;
+ virtual void layout() override;
+ virtual void calcViewport() override;
- virtual const AffineTransform& localToParentTransform() const OVERRIDE;
+ virtual const AffineTransform& localToParentTransform() const override;
AffineTransform markerTransformation(const FloatPoint& origin, float angle, float strokeWidth) const;
- virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short) OVERRIDE { return false; }
-
FloatPoint referencePoint() const;
float angle() const;
SVGMarkerUnitsType markerUnits() const { return toSVGMarkerElement(element())->markerUnits()->currentValue()->enumValue(); }
+ SVGMarkerOrientType orientType() const { return toSVGMarkerElement(element())->orientType()->currentValue()->enumValue(); }
+
+ const FloatRect& viewport() const { return m_viewport; }
- virtual RenderSVGResourceType resourceType() const OVERRIDE { return s_resourceType; }
- static const RenderSVGResourceType s_resourceType;
+ static const RenderSVGResourceType s_resourceType = MarkerResourceType;
+ virtual RenderSVGResourceType resourceType() const override { return s_resourceType; }
private:
// Generates a transformation matrix usable to render marker content. Handles scaling the marker content