WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 63933
26331
[Canvas] add: lineStyle = none|solid|dotted|dashed
https://bugs.webkit.org/show_bug.cgi?id=26331
Summary
[Canvas] add: lineStyle = none|solid|dotted|dashed
Dirk Schulze
Reported
2009-06-11 14:42:38 PDT
It would helpful to have something like lineStyle, that draws a path dotted, solid, dashed or not at all (last is maybe senceless).
Attachments
canvas lineStyle
(9.65 KB, patch)
2009-06-11 14:56 PDT
,
Dirk Schulze
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dirk Schulze
Comment 1
2009-06-11 14:56:59 PDT
Created
attachment 31174
[details]
canvas lineStyle lineStyle is not in the spec of HTML 5 atm. This patch adds a basic concept for lineStyle and supports dashed, dotted or solid strokes as well as none. You can make use of it with: context.webkitLineStyle = 'dashed|dotted|solid|none' the default is solid of course. There are no configurations possible at the moment (size of gaps between dashes and so on). And maybe it would make it to difficult. I hope to get some feedback or improvement.
Oliver Hunt
Comment 2
2009-06-11 15:33:31 PDT
Comment on
attachment 31174
[details]
canvas lineStyle I'm not sure what the correct approach to get webkitLineStyle vs. lineStyle -- i think sam would be the right person to ask. Otherwise this patch is fine -- i'm clearing the review flag so no one else reviews or tries to land.
Dirk Schulze
Comment 3
2009-06-13 13:47:25 PDT
I could just test it on gtk atm and I see a bad behavior of dotted paths. The length of a dot is not scaled to the thickness of the stroked path. That means that the distance between two dots is always the same, independently of the stroke width. I looked to the css implemenatation and the benefit on css is that it only needs to stroke lines and circles. All ports have a special implementation (all the same?) to solve the problem in GraphicsContext. I don't know if we can reuse the logic to calculate the size of the dot in a universal path. I'll take a look at this. The situation for solid and none is clear. And dashed lines look ok, but we may use the same logic as for dotted paths.
Dirk Schulze
Comment 4
2009-08-21 01:57:32 PDT
(In reply to
comment #3
) The problems with dotted lines dont affect on Qt. I'll test the patch on Cg soon but this might be a cairo bug.
Ian 'Hixie' Hickson
Comment 5
2012-02-28 14:22:53 PST
*** This bug has been marked as a duplicate of
bug 63933
***
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