33 class SVGStyledElement;
36 LengthTypeUnknown = 0,
38 LengthTypePercentage = 2,
59 SVG_LENGTHTYPE_UNKNOWN = LengthTypeUnknown,
60 SVG_LENGTHTYPE_NUMBER = LengthTypeNumber,
61 SVG_LENGTHTYPE_PERCENTAGE = LengthTypePercentage,
62 SVG_LENGTHTYPE_EMS = LengthTypeEMS,
63 SVG_LENGTHTYPE_EXS = LengthTypeEXS,
64 SVG_LENGTHTYPE_PX = LengthTypePX,
65 SVG_LENGTHTYPE_CM = LengthTypeCM,
66 SVG_LENGTHTYPE_MM = LengthTypeMM,
67 SVG_LENGTHTYPE_IN = LengthTypeIN,
68 SVG_LENGTHTYPE_PT = LengthTypePT,
69 SVG_LENGTHTYPE_PC = LengthTypePC
72 SVGLength(
const SVGStyledElement* context = 0, SVGLengthMode mode = LengthModeOther,
const String& valueAsString =
String());
75 SVGLengthType unitType()
const;
80 float valueInSpecifiedUnits()
const;
81 void setValueInSpecifiedUnits(
float);
83 float valueAsPercentage()
const;
85 String valueAsString()
const;
86 bool setValueAsString(
const String&);
88 void newValueSpecifiedUnits(
unsigned short,
float valueInSpecifiedUnits);
89 void convertToSpecifiedUnits(
unsigned short);
92 static float PercentageOfViewport(
float value,
const SVGStyledElement*, SVGLengthMode);
94 inline bool isRelative()
const
96 SVGLengthType type = unitType();
97 return (type == LengthTypePercentage || type == LengthTypeEMS || type == LengthTypeEXS);
101 float m_valueInSpecifiedUnits;
104 const SVGStyledElement* m_context;
109 #endif // ENABLE(SVG)
110 #endif // SVGLength_h