[Webkit-unassigned] [Bug 20543] SVG should use the new Gradient support on GraphicsContext
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 30 13:56:32 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=20543
eric at webkit.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #23953|review? |review-
Flag| |
------- Comment #9 from eric at webkit.org 2008-09-30 13:56 PDT -------
(From update of attachment 23953)
I have mixed feelings about this change. CG has no concept of "Spread Method",
so if/when we ever decide to implement that obscure part of SVG (which I've yet
to see a single SVG depend on), we'll need to write a "spread method"
implementation on top of GraphicsContext functions or on top of CG functions.
So if we have to write one generic implementation (for the currently
most-popular port of WebKit) then it makes me wonder if we'll want to use that
implementation for all other ports.
enum GradientSpreadMethod {
129 SPREADMETHOD_PAD = 1,
130 SPREADMETHOD_REFLECT = 2,
131 SPREADMETHOD_REPEAT = 3
132 };
This should follow the CamelCase naming convention of all other enums in that
file.
SpreadMethodPad
SpreadMethodRepeat
SpreadMethodReflect
74 GradientSpreadMethod spreadMethod;
That needs to be initialized to something.
459 if (spreadMethod())
That should never be false! Since spreadMethod() == 0 is not a valid value.
No default is needed here:
167 default:
168 gradient.setSpread(QGradient::PadSpread);
169 break;
I think this change is overall OK. I think we'll end up crossing the "how to
write a CG implementation" bridge when we come to it. And when we do write a
CG implementation of this we'll think about generalizing said implementation.
--
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