1,295
edits
| Line 215: | Line 215: | ||
Stroking and filling are just two ways to turn a path into a mask into which the source pattern is drawn. StrokeStyle and FillStyle control that process. ''Therefore blurring and opacity belong here, because they are additional effects on the the mask obtained from the path.'' | Stroking and filling are just two ways to turn a path into a mask into which the source pattern is drawn. StrokeStyle and FillStyle control that process. ''Therefore blurring and opacity belong here, because they are additional effects on the the mask obtained from the path.'' | ||
I suggest having first-class support for blur and opacity here because canvas needs them (blur for shadows, opacity for global alpha) and many cases can be implemented more efficiently than creating a temporary mask and/or rendering through a | I suggest having first-class support for blur and opacity here because canvas needs them (blur for shadows, opacity for global alpha) and many cases can be implemented more efficiently than creating a temporary mask and/or rendering through a temporary surface, or munging the source pattern, as we do now. Blur will also be useful for CSS box-shadow/text-shadow. | ||
struct StrokeStyle { | struct StrokeStyle { | ||
float mLineWidth; | float mLineWidth; | ||
float mMiterLimit; | float mMiterLimit; | ||
LineCap mLineCap; | LineCap mLineCap; | ||
edits