Changeset 41808 in webkit


Ignore:
Timestamp:
Mar 18, 2009 8:58:54 AM (15 years ago)
Author:
krit@webkit.org
Message:

2009-03-18 Dirk Schulze <krit@webkit.org>

Reviewed by Holger Freyther.

Added support for SVG's stroked texts to Qt.

[Qt] SVGs stroked text support missing
https://bugs.webkit.org/show_bug.cgi?id=24262

  • platform/graphics/qt/FontQt.cpp: (WebCore::Font::drawComplexText):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r41807 r41808  
     12009-03-18  Dirk Schulze  <krit@webkit.org>
     2
     3        Reviewed by Holger Freyther.
     4
     5        Added support for SVG's stroked texts to Qt.
     6
     7        [Qt] SVGs stroked text support missing
     8        https://bugs.webkit.org/show_bug.cgi?id=24262
     9
     10        * platform/graphics/qt/FontQt.cpp:
     11        (WebCore::Font::drawComplexText):
     12
    1132009-03-18  Mark Rowe  <mrowe@apple.com>
    214
  • trunk/WebCore/platform/graphics/qt/FontQt.cpp

    r41527 r41808  
    105105            QBrush brush(*ctx->strokeGradient()->platformGradient());
    106106            brush.setTransform(ctx->strokeGradient()->gradientSpaceTransform());
    107             p->setPen(QPen(brush, 0));
     107            p->setPen(QPen(brush, ctx->strokeThickness()));
    108108        } else if (ctx->strokePattern()) {
    109109            TransformationMatrix affine;
    110             p->setPen(QPen(QBrush(ctx->strokePattern()->createPlatformPattern(affine)), 0));
     110            p->setPen(QPen(QBrush(ctx->strokePattern()->createPlatformPattern(affine)), ctx->strokeThickness()));
    111111        } else
    112             p->setPen(QColor(ctx->strokeColor()));
     112            p->setPen(QPen(QColor(ctx->strokeColor()), ctx->strokeThickness()));
    113113    }
    114114
     
    175175        p->restore();
    176176    }
    177     p->drawText(pt, string, flags, run.padding());
     177    if (ctx->textDrawingMode() & cTextStroke) {
     178        QPainterPath path;
     179        path.addText(pt, font(), string);
     180        p->strokePath(path, p->pen());
     181    }
     182    if (ctx->textDrawingMode() & cTextFill)
     183        p->drawText(pt, string, flags, run.padding());
    178184}
    179185
Note: See TracChangeset for help on using the changeset viewer.