#ifndef KSVG_SVGAngleImpl_H
#define KSVG_SVGAngleImpl_H
#if SVG_SUPPORT
#include "PlatformString.h"
namespace WebCore
{
class SVGStyledElement;
class SVGAngle : public Shared<SVGAngle>
{
public:
SVGAngle(const SVGStyledElement *context);
virtual ~SVGAngle();
enum SVGAngleType {
SVG_ANGLETYPE_UNKNOWN = 0,
SVG_ANGLETYPE_UNSPECIFIED = 1,
SVG_ANGLETYPE_DEG = 2,
SVG_ANGLETYPE_RAD = 3,
SVG_ANGLETYPE_GRAD = 4
};
unsigned short unitType() const;
void setValue(float);
float value() const;
void setValueInSpecifiedUnits(float valueInSpecifiedUnits);
float valueInSpecifiedUnits() const;
void setValueAsString(const String&);
String valueAsString() const;
void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits);
void convertToSpecifiedUnits(unsigned short unitType);
static double todeg(double rad);
static double torad(double deg);
static double shortestArcBisector(double angle1, double angle2);
const SVGStyledElement* context() const;
void setContext(const SVGStyledElement*);
private:
unsigned short m_unitType;
float m_value;
float m_valueInSpecifiedUnits;
mutable String m_valueAsString;
const SVGStyledElement *m_context;
void calculate();
};
};
#endif // SVG_SUPPORT
#endif