[Webkit-unassigned] [Bug 24243] [Qt] gradients and patterns for FontQt

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 27 12:27:30 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=24243


zack at kde.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #28095|review?                     |review+
               Flag|                            |




------- Comment #2 from zack at kde.org  2009-02-27 12:27 PDT -------
(From update of attachment 28095)
> +    if (ctx->textDrawingMode() & cTextStroke) {
> +        if (ctx->strokeGradient()) {
> +            QBrush brush(*ctx->strokeGradient()->platformGradient());
> +            brush.setMatrix(ctx->strokeGradient()->gradientSpaceTransform());
> +            p->setPen(QPen(brush, 0));
> +        } else if (ctx->strokePattern()) {
> +            TransformationMatrix affine;
> +            p->setPen(QPen(QBrush(ctx->strokePattern()->createPlatformPattern(affine)), 0));
> +        } else
> +            p->setPen(QColor(ctx->strokeColor()));
> +    }
>  
>      QString string = qstring(run);

I think it's good enough to go in, but the above section has to be prefixed
with "FIXME: stroking is currently not working or such". Basically the issue is
that Qt doesn't support stroking of text per se. So what needs to be done is
that it has to be emulated with a path as in:
if (ctx->textDrawingMode() & cTextStroke) {
  QPainterPath path;
  path.addText(0, 0, currentFont, text);
  ...
  p->strokePath(path, theCorretPen);
}
Basically stroke the path constructed from the given text string.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list