This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Adobe Illustrator for Windows > August 2006 > Scale transform, stroke width, and SVG import





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Scale transform, stroke width, and SVG import
H_Hecht@adobeforums.com

2006-08-26, 6:40 pm

Briefly, it appears as though Illustrator CS2 doesn't scale strokes in SVG files in elements subject to an SVG scale() transformation. The question is, am I simply missing something, or is this a known bug? The "Scale strokes and effects" preference doesn
't appear to have any effect.

Other scaling (pattern transforms, dimensions of paths, etc.) is done correctly, but the strokes are unscaled, contrary to the SVG spec and the behaviour of most other SVG viewers and editors (e.g. Batik, Inkscape, Corel Draw). Is there a workaround for t
his, apart from rewriting the input SVG not to use scale transforms or producing an Illustrator-only version with pre-scaled strokes?

I can provide a simple example, but I'm unsure how this forum treats pasted markup as I am new here.
Jacob_Bugge@adobeforums.com

2006-08-26, 6:40 pm

HH,

When you have an image on a website, you can link to it by copying/writing this into your message (folders are optional, .extension may be .gif, .jpg, etc.):

<a href="http://www.yourdomain.topdomain/folder1/folder2/.../imagename.extension"><img src="http://www.yourdomain.topdomain/folder1/folder2/.../imagename.extension" alt="" border="0"></a>
H_Hecht@adobeforums.com

2006-08-29, 3:42 am

Thank's for the advice, Jacob; it's probably easier to just copy and paste the six-line SVG, assuming I don't run afoul of character escaping. Here's my attempt:

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="300" width="300" version="1.1" baseProfile="full">
<line x1="0" y1="20" x2="300" y2="20" stroke="black" stroke-width="10"/>
<g transform="scale(1, 3)">
<line x1="0" y1="70" x2="300" y2="70" stroke="black" stroke-width="10"/>
</g>
</svg>

The issue in the context of this example is that the graphic ought to consist of two lines, one with a 10 unit stroke and one with a 30 unit stroke, as strokes scale in SVG. Whilst this is indeed the case in every piece of SVG-capable software I've tried
apart from Illustrator, AI CS2 stubbornly draws them both as 10 unit stroke lines and I can find no way to convince it to do otherwise.

If no one is aware of a method of addressing this problem (apart from increasing the stroke-width, as that breaks the file in every other program), I would be very much obliged if someone might at least suggest a better venue for the question; it so far a
ppears to me that the set of people using Illustrator to edit SVG that didn't originate in Illustrator is small, or reclusive, or perhaps simply not where I expect them to be found.
Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews