As an SVG Rendering developer I like to share some info about "stroke-width"

-Stroke-width is a touchy things.
(1) As an example a line with one pixels stroke-width will have the larger
width it it slants. If will becomes almost 2 pixels (because of the
anti-alias We need to make it look smooth by adding gradient).
(2) When rendering the images; one have to round that value to the near
number of pixels with the minimum is one pixel - As the (1) above if it
slants it will be bigger. For that you can specify the width = 0.0000001 the
it will be always 1 unless you zoom it up a more than 1 million times
larger.
(3) Depend on the value of the width and the zoom scale value you may have
it unchanged when it fall with the stretch-hold. May be it very large. - It
may change on 1% different then stay at that value for the long pause when
you increase.
(4) For the best scaling stroke width then you may have to make a path draw
the border of that "stroke" the have it fill. Even it this case when it
reduce to one it will have the slant thing bigger the 100% horizontal or
vertical.

Hope it helps.


Phi


On 8/8/06, Peter Kalev <[EMAIL PROTECTED]> wrote:
>
>    You are right - the only way to adjust the "stroke-width" during zoom
> is with JavaScript.
>
> On zoom, loop through all the elements that need their stroke adjusted,
> one by one read their "stroke-width", multiply it by the zoom factor then
> set it.
>
> Hope that helps...
>
> _____
>
> From: [email protected] 
> <svg-developers%40yahoogroups.com>[mailto:
> [email protected] <svg-developers%40yahoogroups.com>] On
> Behalf Of csorba_edith
> Sent: Tuesday, August 08, 2006 5:40 AM
> To: [email protected] <svg-developers%40yahoogroups.com>
> Subject: [svg-developers] decrease stroke-width when zoomed in?
>
> Hi,
> I would like to ask if anybody knows how it is possible to influence
> the stroke-width when a feature is zoomed in too much. I want to make
> the stroke of my features descrease proportionally with the zoom in rate.
> I saw the option used in the Yosemite Hiking map:
>
> document.getElementById("park_boundary")
> .setAttributeNS(null,"stroke-width",myMainMap.curWidth*0.005);
>
> But I did not manage to implement it on my map. I changed the multiple
> factor (0.005) but it simple has no effect.
> Can somebody please explain how it works, or whether there is another
> solution (demonstrate on a working example maybe).
> Thank you in advance.
> Regards
> Csorba
>
> [Non-text portions of this message have been removed]
>
> 
>



-- 
Phi - Tran
Hugely increase your speed, saving your band-width with ZipProtocol
plus crystal clear SVG Rendering image at
HTTP://oneplusplus.com


[Non-text portions of this message have been removed]



-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to