[webkit-reviews] review granted: [Bug 24243] [Qt] gradients and patterns for FontQt : [Attachment 28095] patterns and gradients for Qt

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


Zack Rusin <zack at kde.org> has granted Dirk Schulze <krit at webkit.org>'s request
for review:
Bug 24243: [Qt] gradients and patterns for FontQt
https://bugs.webkit.org/show_bug.cgi?id=24243

Attachment 28095: patterns and gradients for Qt
https://bugs.webkit.org/attachment.cgi?id=28095&action=review

------- Additional Comments from Zack Rusin <zack at kde.org>
> +    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.


More information about the webkit-reviews mailing list