diff options
author | Steve Block <steveblock@google.com> | 2010-04-27 16:31:00 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-05-11 14:42:12 +0100 |
commit | dcc8cf2e65d1aa555cce12431a16547e66b469ee (patch) | |
tree | 92a8d65cd5383bca9749f5327fb5e440563926e6 /WebCore/svg/SVGFont.cpp | |
parent | ccac38a6b48843126402088a309597e682f40fe6 (diff) | |
download | external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.zip external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.gz external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.bz2 |
Merge webkit.org at r58033 : Initial merge by git
Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1
Diffstat (limited to 'WebCore/svg/SVGFont.cpp')
-rw-r--r-- | WebCore/svg/SVGFont.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/WebCore/svg/SVGFont.cpp b/WebCore/svg/SVGFont.cpp index b7ca5f2..dacbac2 100644 --- a/WebCore/svg/SVGFont.cpp +++ b/WebCore/svg/SVGFont.cpp @@ -1,5 +1,6 @@ /** * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> + * Copyright (C) Research In Motion Limited 2010. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -528,22 +529,16 @@ void Font::drawTextUsingSVGFont(GraphicsContext* context, const TextRun& run, glyphOrigin.setY(identifier.verticalOriginY * scale); } - context->translate(xStartOffset + currentPoint.x() + glyphOrigin.x(), currentPoint.y() + glyphOrigin.y()); - context->scale(FloatSize(scale, -scale)); + AffineTransform glyphPathTransform; + glyphPathTransform.translate(xStartOffset + currentPoint.x() + glyphOrigin.x(), currentPoint.y() + glyphOrigin.y()); + glyphPathTransform.scale(scale, -scale); - context->beginPath(); - context->addPath(identifier.pathData); + Path glyphPath = identifier.pathData; + glyphPath.transform(glyphPathTransform); - // FIXME: setup() tries to get objectBoundingBox() from run.referencingRenderObject() - // which is wrong. We need to change setup() to take a bounding box instead, or pass - // a RenderObject which would return the bounding box for identifier.pathData + context->beginPath(); + context->addPath(glyphPath); if (activePaintServer->setup(context, run.referencingRenderObject(), targetType)) { - // Spec: Any properties specified on a text elements which represents a length, such as the - // 'stroke-width' property, might produce surprising results since the length value will be - // processed in the coordinate system of the glyph. (TODO: What other lengths? miter-limit? dash-offset?) - if (targetType == ApplyToStrokeTargetType && scale != 0.0f) - context->setStrokeThickness(context->strokeThickness() / scale); - activePaintServer->renderPath(context, run.referencingRenderObject(), targetType); activePaintServer->teardown(context, run.referencingRenderObject(), targetType); } |