#ifndef SVGAngle_h
#define SVGAngle_h
#include "SVGPropertyTraits.h"
namespace WebCore {
typedef int ExceptionCode;
class SVGAngle {
WTF_MAKE_FAST_ALLOCATED;
public:
SVGAngle();
enum SVGAngleType {
SVG_ANGLETYPE_UNKNOWN = 0,
SVG_ANGLETYPE_UNSPECIFIED = 1,
SVG_ANGLETYPE_DEG = 2,
SVG_ANGLETYPE_RAD = 3,
SVG_ANGLETYPE_GRAD = 4
};
SVGAngleType unitType() const { return m_unitType; }
void setValue(float);
float value() const;
void setValueInSpecifiedUnits(float valueInSpecifiedUnits) { m_valueInSpecifiedUnits = valueInSpecifiedUnits; }
float valueInSpecifiedUnits() const { return m_valueInSpecifiedUnits; }
void setValueAsString(const String&, ExceptionCode&);
String valueAsString() const;
void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits, ExceptionCode&);
void convertToSpecifiedUnits(unsigned short unitType, ExceptionCode&);
private:
SVGAngleType m_unitType;
float m_valueInSpecifiedUnits;
};
template<>
struct SVGPropertyTraits<SVGAngle> {
static SVGAngle initialValue() { return SVGAngle(); }
static String toString(const SVGAngle& type) { return type.valueAsString(); }
};
}
#endif // SVGAngle_h