diff options
Diffstat (limited to 'Source/WebCore/svg/PatternAttributes.h')
-rw-r--r-- | Source/WebCore/svg/PatternAttributes.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/WebCore/svg/PatternAttributes.h b/Source/WebCore/svg/PatternAttributes.h index 613ab94..28a29c4 100644 --- a/Source/WebCore/svg/PatternAttributes.h +++ b/Source/WebCore/svg/PatternAttributes.h @@ -22,6 +22,7 @@ #if ENABLE(SVG) #include "SVGLength.h" +#include "SVGPreserveAspectRatio.h" namespace WebCore { @@ -33,6 +34,8 @@ struct PatternAttributes { , m_y() , m_width() , m_height() + , m_viewBox() + , m_preserveAspectRatio() , m_boundingBoxMode(true) , m_boundingBoxModeContent(false) , m_patternContentElement(0) @@ -40,6 +43,8 @@ struct PatternAttributes { , m_ySet(false) , m_widthSet(false) , m_heightSet(false) + , m_viewBoxSet(false) + , m_preserveAspectRatioSet(false) , m_boundingBoxModeSet(false) , m_boundingBoxModeContentSet(false) , m_patternTransformSet(false) @@ -51,6 +56,8 @@ struct PatternAttributes { SVGLength y() const { return m_y; } SVGLength width() const { return m_width; } SVGLength height() const { return m_height; } + FloatRect viewBox() const { return m_viewBox; } + SVGPreserveAspectRatio preserveAspectRatio() const { return m_preserveAspectRatio; } bool boundingBoxMode() const { return m_boundingBoxMode; } bool boundingBoxModeContent() const { return m_boundingBoxModeContent; } AffineTransform patternTransform() const { return m_patternTransform; } @@ -79,6 +86,18 @@ struct PatternAttributes { m_height = value; m_heightSet = true; } + + void setViewBox(const FloatRect& value) + { + m_viewBox = value; + m_viewBoxSet = true; + } + + void setPreserveAspectRatio(const SVGPreserveAspectRatio& value) + { + m_preserveAspectRatio = value; + m_preserveAspectRatioSet = true; + } void setBoundingBoxMode(bool value) { @@ -108,6 +127,8 @@ struct PatternAttributes { bool hasY() const { return m_ySet; } bool hasWidth() const { return m_widthSet; } bool hasHeight() const { return m_heightSet; } + bool hasViewBox() const { return m_viewBoxSet; } + bool hasPreserveAspectRatio() const { return m_preserveAspectRatioSet; } bool hasBoundingBoxMode() const { return m_boundingBoxModeSet; } bool hasBoundingBoxModeContent() const { return m_boundingBoxModeContentSet; } bool hasPatternTransform() const { return m_patternTransformSet; } @@ -119,6 +140,8 @@ private: SVGLength m_y; SVGLength m_width; SVGLength m_height; + FloatRect m_viewBox; + SVGPreserveAspectRatio m_preserveAspectRatio; bool m_boundingBoxMode; bool m_boundingBoxModeContent; AffineTransform m_patternTransform; @@ -129,6 +152,8 @@ private: bool m_ySet : 1; bool m_widthSet : 1; bool m_heightSet : 1; + bool m_viewBoxSet : 1; + bool m_preserveAspectRatioSet : 1; bool m_boundingBoxModeSet : 1; bool m_boundingBoxModeContentSet : 1; bool m_patternTransformSet : 1; |