Re: Regarding viewport question

On Wed, 11 Jul 2007 12:01:15 +0200, Mustafizur Rahaman  
<mustaf.here@gmail.com> wrote:

> Hi All:
>
> Can any one please respond to me...and if the question is not clear,let  
> me
> know, i can try to explain where ever any one has problem.
>
> Thanks.
>
>
> On 7/10/07, Mustafizur Rahaman <mustaf.here@gmail.com> wrote:
>>
>> Hi All:
>>
>> I read that as per SVG 1.2 Tiny, only svg,image,video,animation element
>> can have their own viewport.  I saw that in SVG 1.1 there is something
>> symbol element which can have their own viewport, but symbol element is  
>> not
>> mentioned in SVG Tiny 1.2. So, my question is other than svg,
>> image,video,animation, is there any other element in SVG Tiny 1.2 which
>> can have their own viewport.

I'm not sure if 1.2T is different, but 1.1 mentions the foreignObject  
element.

>> Let me explain the problem, so that you will understand it better.
>>
>> Let's say i have a triangle which i have constructed using path
>> element.This triangle i want to draw at three places on my SVG canvas,  
>> but
>> each of the triangle should be of different size.I can achieve it using
>> transform attribute, but my problem is i dont know the scale factor in
>> advance.

Sounds like you should use the <use> element with different values on each  
for the transform attribute.
You can change the transform attribute in script if you know later which  
scale factor to use.

>> what i want to do is that, on my canvas i can specify three rectangular
>> region each of different sizes, and when the triangle will be drawn in  
>> that
>> rectangular region, the triangle size will be changed automatically
>> depending on the rectangular region( let's assume i want to maintain  
>> aspect
>> ratio)

Right, so if you want to use preserveAspectRatio with some value then you  
need to use <symbol> (which only works if the viewer supports SVG 1.1).
Another option is to use <animation> but then you have to put your  
triangle in a separate file since <animation> can't contain a fragment  
identifier in the xlink:href.
Yet another option is to use an <svg> subfragment in the main svg file,  
but that's not supported in 1.2T either, and <use> is forbidden to point  
at an <svg> fragment in 1.2T.

The <image> element won't work because you can't reference an svg with it  
according to 1.2T.

Regards
/Erik

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Received on Wednesday, 11 July 2007 10:39:48 UTC