W3C home > Mailing lists > Public > www-svg@w3.org > June 2006

Re: Desired behavior of pathLength and startOffset

From: <thomas.deweese@kodak.com>
Date: Fri, 9 Jun 2006 12:09:52 -0400
To: amenzie@us.ibm.com
Cc: www-svg@w3.org, www-svg-request@w3.org
Message-ID: <OF2DC0B46F.AA664975-ON85257188.00586116-85257188.0058CB54@knotes.kodak.com>

Hi Alex,

www-svg-request@w3.org wrote on 06/08/2006 04:15:21 PM:

>         I am having some trouble figuring out the desired behavior for 
text 
> being rendered on a path when both a pathLenght and a startOffset are 
> specified.  It seems to me that setting pathLength=?2? and 
startOffset=?1? 
> should cause the text to be rendered starting at the paths midpoint.

   Cameron is correct that Batik doesn't implement pathLength (which IIRC 
can
actually impact lots of things, stroking etc).  It does however implement
percentages for startOffset, so your above example could be written as:
        startOffset="50%"

   Rather than mucking with both pathLength and startOffset, of course as
is often the case this might be a simple example where the real example
is much more complex...

> The attached SVG script demonstrates these conditions.  I would expect 
the text on
> the bottom rectangle to be rendered starting at the lower right hand 
corner of
> the path.  However, under these conditions both the SVG plugin by Adobe 
and 
> the Batik SVG viewer display the text as if the pathLength attribute 
were 
> unspecified. 

> In the Opera9 Beta the text is compressed and all the letters 
> are rendered on top of one another at the start of the path.

   This sounds like they are confusing pathLength with textLength.

> I would appreciate any insights into the desired behavior under these 
> conditions and thank you for your time. 

   I think you understand these attributes correctly it's just that the
implementations don't ;)
Received on Friday, 9 June 2006 16:17:11 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:34 GMT