RenderSVGInlineText.cpp [plain text]
#include "config.h"
#if ENABLE(SVG)
#include "RenderSVGInlineText.h"
#include "AffineTransform.h"
#include "GraphicsContext.h"
#include "SVGInlineTextBox.h"
#include "KCanvasRenderingStyle.h"
namespace WebCore {
RenderSVGInlineText::RenderSVGInlineText(Node* n, StringImpl* str)
: RenderText(n, str)
{
}
void RenderSVGInlineText::absoluteRects(Vector<IntRect>& rects, int tx, int ty, bool)
{
FloatRect absoluteRect = absoluteTransform().mapRect(FloatRect(tx, ty, width(), height()));
rects.append(enclosingIntRect(absoluteRect));
}
IntRect RenderSVGInlineText::selectionRect(bool clipToVisibleContent)
{
IntRect rect = RenderText::selectionRect(clipToVisibleContent);
rect = parent()->absoluteTransform().mapRect(rect);
return rect;
}
InlineTextBox* RenderSVGInlineText::createInlineTextBox()
{
return new (renderArena()) SVGInlineTextBox(this);
}
}
#endif // ENABLE(SVG)