SVGCharacterData.h [plain text]
#ifndef SVGCharacterData_h
#define SVGCharacterData_h
#if ENABLE(SVG)
#include <wtf/HashMap.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
class AffineTransform;
class RenderObject;
struct SVGCharOnPath : RefCounted<SVGCharOnPath> {
static PassRefPtr<SVGCharOnPath> create() { return adoptRef(new SVGCharOnPath); }
float xScale;
float yScale;
float xShift;
float yShift;
float orientationAngle;
bool hidden : 1;
private:
SVGCharOnPath()
: xScale(1.0f)
, yScale(1.0f)
, xShift(0.0f)
, yShift(0.0f)
, orientationAngle(0.0f)
, hidden(false)
{
}
};
struct SVGChar {
SVGChar()
: x(0.0f)
, y(0.0f)
, angle(0.0f)
, orientationShiftX(0.0f)
, orientationShiftY(0.0f)
, drawnSeperated(false)
, newTextChunk(false)
{
}
float x;
float y;
float angle;
float orientationShiftX;
float orientationShiftY;
RefPtr<SVGCharOnPath> pathData;
bool drawnSeperated : 1;
bool newTextChunk : 1;
bool isHidden() const;
AffineTransform characterTransform() const;
};
struct SVGTextDecorationInfo {
HashMap<int, RenderObject*> fillServerMap;
HashMap<int, RenderObject*> strokeServerMap;
};
}
#endif // ENABLE(SVG)
#endif // SVGCharacterData_h