WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 24243
[Qt] gradients and patterns for FontQt
https://bugs.webkit.org/show_bug.cgi?id=24243
Summary
[Qt] gradients and patterns for FontQt
Dirk Schulze
Reported
2009-02-27 12:04:05 PST
We need support for gradients and patterns on FontQt
Attachments
patterns and gradients for Qt
(2.89 KB, patch)
2009-02-27 12:05 PST
,
Dirk Schulze
zack
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dirk Schulze
Comment 1
2009-02-27 12:05:27 PST
Created
attachment 28095
[details]
patterns and gradients for Qt This adds the support.
Zack Rusin
Comment 2
2009-02-27 12:27:29 PST
Comment on
attachment 28095
[details]
patterns and gradients for Qt
> + 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.
Dirk Schulze
Comment 3
2009-02-27 12:35:59 PST
landed in
r41294
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug