pupsnow / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

Stroke-Width is capped at 255 #230

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Look at the attached screenshot that compares a magnified look at my mapping 
example between 
native SVG vs Flash renderer.

The properties are as follows

viewBox="-340431 -475036 672623 911401"

stroke-width="300" (black borderline)
stroke-width="1500" (white borderline)

in the Flash renderer both paths are drawn using the same stroke-width whereas 
the native SVG 
renderer reflects the proportion of the stroke-width definition.

While this might be related to Issue 172 "Fractional stroke widths are not 
supported", the solution 
there will involve alpha transparency whereas here it must have to do with the 
magnification level.

The mapping example would be
http://vis.uell.net/gsvg/electionAtlasGermany.html

Original issue reported on code.google.com by mneu...@gmail.com on 22 Aug 2009 at 3:02

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by grick23@gmail.com on 24 Aug 2009 at 5:56

GoogleCodeExporter commented 9 years ago
Flash caps its maximum stroke size (thickness) at 255 which is why these 
strokes look
the same. I am currently not aware of any way to work around this limitation.

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Graphics
.html#lineStyle()

Issue was previously named "Stroke-Width 300 vs. 1500: difference not visible 
(large
viewbox)"

Original comment by grick23@gmail.com on 24 Aug 2009 at 6:56

GoogleCodeExporter commented 9 years ago
Just to make sure, I am not mistaken here: I am not calling for such
broad strokes at all. The stroke width of 300 or 1500 is used in a
gigantic viewbox ("-340431 -475036 672623 911401") to produce visible
results.

I don't know how you manage to scale down this large viewbox into the
browser window but would guess that all other properties would be
scaled down too.

The large viewbox stems from a professional grade shape file and is quite 
common in cartographic drawings.

Michael

Original comment by mneu...@gmail.com on 24 Aug 2009 at 8:01

GoogleCodeExporter commented 9 years ago
You are not mistaken. In real pixel terms the stroke is not that big. However, 
in the
huge coordinate system you are using the numerical stroke value is too high. I 
do not
alter the coordinate system for rendering in flash and so the stroke value is 
passed
right through.

A potential solution might be to choose a smaller coordinate system for flash
rendering. This would require scaling all of the drawing values manually and 
could
get pretty complicated. You'd need heuristics to calculate the best coordinate 
system
because fractional strokes would actually benefit from a larger coordinate 
system
(Issue 172).

Original comment by grick23@gmail.com on 24 Aug 2009 at 8:20

GoogleCodeExporter commented 9 years ago
Sounds like this is a good candidate to mark WONTFIX. I'll let Rick decide.

Original comment by bradneub...@gmail.com on 20 Oct 2009 at 12:30