Open
Bug 1066416
Opened 11 years ago
Updated 3 years ago
Add ability to specify stroke scaling style.
Categories
(Core :: Graphics: Canvas2D, enhancement)
Tracking
()
NEW
People
(Reporter: mbx, Unassigned)
References
Details
This is motivated by bug 1064110. The Flash stroking model supports 4 stroke scaling modes: none, horizontal, vertical and normal. These modes scale the current lineWidth based on the current transformation matrix and apply it uniformly to a transformed path in global coordinate space. The result is a lot more useful than what Canvas 2D does by default, which is to transform the stroke along with the path.
I propose adding a `lineScaleMode` property on the Canvas2DRenderingContext, which would have the following possible values: "default" | "none" | "normal" (I don't know how useful having, horizontal and vertical scale modes is).
"default" - does what stroke normally does.
"none" - only the path is transformed by the current transformation matrix, the lineWidth is unaffected and is applied uniformly to the transformed path.
"normal" - same as "none", but the lineWidth is scaled by the average of the scaleX and scaleY properties of the current transformation matrix.
Comment 1•11 years ago
|
||
"normal" is somewhat normative, I suppose. Also not really descriptive. How about "uniform"?
| Reporter | ||
Comment 2•11 years ago
|
||
Yes, makes a lot more sense.
Comment 3•11 years ago
|
||
Not a Shumway blocker. Shumway's workaround is pretty fast, but this would be a nice feature for Canvas2D.
Updated•11 years ago
|
Whiteboard: [shumway]
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•