-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
I could reproduce the problem and removing the comma between translate
and rotate does the trick. Don't know why...

Regards,
Steffen

[EMAIL PROTECTED] schrieb:
> When I do such a calculation I have no image in the viewable area.
> 
> <svg:g
> transform="translate({$svg_bitmap_width_offset},{$svg_bitmap_height_offset}),
> rotate({$width_middle}, {$height_middle}, {$bitmap_rotation})">
>   <svg:image x="2" y="2" width="{$svg_bitmap_width}"
> height="{$svg_bitmap_height}" xlink:href="{$bitmap_path}">
>   <svg:title>Front Bitmap</svg:title>
>   </svg:image>
> </svg:g>
> 
> When I do the rotation around the offset of the image:
> 
> <svg:g
> transform="translate({$svg_bitmap_width_offset},{$svg_bitmap_height_offset}),
> rotate({$svg_bitmap_width_offset}, {$svg_bitmap_height_offset},
> {$bitmap_rotation})">
>   <svg:image x="2" y="2" width="{$svg_bitmap_width}"
> height="{$svg_bitmap_height}" xlink:href="{$bitmap_path}">
>   <svg:title>Front Bitmap</svg:title>
>   </svg:image>
> </svg:g>
> 
> I do have an image in the viewable, but it still is not rotated.
> 
> I think you might be right about the image not being in the viewable area,
> but rotating around the center doesn't seem to be the solution.
> 
> Chantal
> 
>> It's probably being rotated outside the viewable area.  If you want to
>> rotate around the center of the image, I think you have to calculate it as
>> such:
>>
>> cx = x + (width / 2)
>> cy = y + (height / 2)
>>
>> where x, y, width, and height come from your image.
>>
>> Michael
>>
>> ________________________________
>>
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Sent: Wed 9/24/2008 10:59 AM
>> To: [email protected]
>> Subject: RE: image rotation
>>
>>
>>
>> I see. I have to give the point where to rotate around.
>> But it still gives the same result. when I use rotate(...) inside the
>> transform attribute, my image doesn't appear at all. When I use the
>> seperate rotation attribute (which I used before on text) the image
>> appears, but not rotated.
>>
>> Chantal
>>
>>> Well I'm not sure what you're trying to do.  Are you trying to simply
>>> rotate the element around the center?  If so, you can just do this:
>>>
>>> transform="rotate(cx, cy, t)" where cx is the x coordinate of the image
>>> center, cy is the y coordinate of the image center and t is the rotate
>>> angle in degrees.
>>>
>>> Michael
>>>
>>> ________________________________
>>>
>>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>>> Sent: Wed 9/24/2008 9:49 AM
>>> To: [email protected]
>>> Subject: RE: image rotation
>>>
>>>
>>>
>>> If I change it to the format like you said:
>>>
>>> <!-- Draw Bitmap -->
>>> <svg:g
>>> transform="translate({$svg_bitmap_width_offset},{$svg_bitmap_height_offset})
>>> rotate({$bitmap_rotation})">
>>>   <svg:image x="2" y="2" width="{$svg_bitmap_width}"
>>> height="{$svg_bitmap_height}" xlink:href="{$bitmap_path}">
>>>   <svg:title>Front Bitmap</svg:title>
>>>   </svg:image>
>>> </svg:g>
>>>
>>> I get no image at all... (even with hard-coded values for rotation
>>> angle)
>>> If I use hard-coded values in the code of my first post, the image still
>>> isn't rotated.
>>>
>>> Chantal
>>>
>>>> I think the format for your transform is wrong:
>>>>
>>>> transform="translate(x,y), rotate(t)"
>>>>
>>>> http://www.w3.org/TR/SVG/coords.html#TransformAttribute
>>>> <http://www.w3.org/TR/SVG/coords.html#TransformAttribute>
>>>>
>>>> Michael
>>>>
>>>> ________________________________
>>>>
>>>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>>>> Sent: Wed 9/24/2008 4:41 AM
>>>> To: [email protected]
>>>> Subject: svg:image rotation
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> From an xml file I read a path of an image and a rotation. Now I want
>>>> to
>>>> display the image and rotate it according to what is in the XML file.
>>>>
>>>> This is the code I use:
>>>>
>>>> <!-- Draw Bitmap -->
>>>> <svg:g
>>>> transform="translate({$svg_bitmap_width_offset),{$svg_bitmap_height_offset})"
>>>> rotation="{$bitmap_rotation}">
>>>>   <svg:image x="2" y="2" width="{$svg_bitmap_width}"
>>>> height="{$svg_bitmap_height}" xlink:href="{$bitmap_path}">
>>>>     <svg:title>Front Bitmap</svg:title>
>>>>   </svg:image>
>>>> </svg:g>
>>>>
>>>> Now when I view, the image is not rotated.
>>>> I tried searching with google, but I can't seem to find anything, and I
>>>> begin to wonder if it is possible at all.
>>>>
>>>> Is there, and if yes what is the correct solution to my problem?
>>>>
>>>> Thanks in advance,
>>>>
>>>> Chantal
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail:
>>>> [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail:
>>>> [EMAIL PROTECTED]
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFI2079/IDsT/9gdXwRAuKcAJ9jJmiEf7OskfjI+HHx0+gjXaQQfwCgjNnc
3F8K0bH43nKMG/POtOYGp9g=
=488T
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to