Specyfing paths with percentages unit.

"Kamil Trebunia / ffreak" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.svg
Organization http://groups.google.com
Message-ID <[email protected]>
I've got a question with probably obvious answer, but I can't find
it...

I want to draw a simple path, but using percentages as units.

I've got svg element of 380x190 size. And I've got path like this one:

        <path id="path_one" fill="url(#gradient_one)"
              d="M  136,183
                 C  205,190  358,138  368,116
                 C  377, 91  380, 59  281, 22
                 C  245,  9   98,  0   62, 13
                 C   10, 32    0, 65    6, 87
                 C   12,108   47,175  136,183
                 z"
        />

It works perfect. But when I convert path coordinates to percentages,
like this:

d="M 36%,96% C 54%,100% 94%,73% 97%,61% C 99%,48% 100%,31% 74%,12% C
64%,5% 26%,0% 16%,7% C 3%,17% 0%,34% 2%,46% C 3%,57% 12%,92% 36%,96%
z"

Then it doesn't work at all - nothing renders.

I can easily draw a line using percentage units:
<line x1="10%" y1="90%" x2="100%" y2="90%" stroke="red" stroke-
width="2" />

But the same doesn't work with "path" element - why?


P.S.
Sorry if I hit the wrong group - is there any more suitable then this
one?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.