On Fri, 26 Dec 2008 23:21:56 +0000
John Delacour <[email protected]> wrote:
> I've written to the author of svg2pdf but while I await an answer
> perhaps someone here has come across the problem:
>
> I have installed the latest version of Cairo etc and svg2pdf on the
> Mac and simple things so far have worked well, but if I transform an
> object giving the centre of rotation -- transform="rotate(a x y)" --
> not only do I not get any rotation at all but I lose other
> properties, such as fill-colour. If I supply only the angle then
> it's all right, except that I don't get what I want.
>
> Printing from FireFox and Safari to vector pdf works fine in this
> respect with the same svg files.
One trick I learned a while back was to separate the positioning in a
group (<g/> tag) around the actual object.
Specify the object in its own little coordinate system and then move
that with the group. For example, if we wanted to place a rectangle
(30x50) at 100, 50 and rotate it by 30 degrees, you could do this:
<g transform="translate(100, 50)">
<rect x="-15" y="-25" width="30" height="50" transform="rotate(30)"/>
</g>
Now the positioning and rotation are completely independent. Notice
that I've selected x and y coordinates that put the center of the
object at 0,0.
HTH,
G. Wade
--
No, no, you're not thinking, you're just being logical.
-- Neils Bohr
------------------------------------
-----
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[email protected]
mailto:[email protected]
<*> 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/