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

Default behavior for not mentioning 'preserveAspectRatio' attribute

From: Mustafizur Rahaman <mustaf.here@gmail.com>
Date: Thu, 28 Jun 2007 16:36:24 +0530
Message-ID: <5fccfe10706280406r3c27536ck6e5fd15cd02c827@mail.gmail.com>
To: www-svg@w3.org
Cc: XDT876@motorola.com
Hi,

Let's say i have the following example

<?xml version="1.0"?>
<svg width="6cm" height="1cm" version="1.2" baseProfile="tiny"
     viewBox="0 0 3000 1000"
     xmlns="http://www.w3.org/2000/svg">
  <rect x="0" y="0" width="3000" height="1000"
        fill="yellow" stroke="blue" stroke-width="12"  />
  <!-- A large, red triangle -->
  <path fill="red"  d="M 750,100 L 250,900 L 1250,900 z"/>
  <!-- A text string that spans most of the viewport -->
  <text x="100" y="600" font-size="200" font-family="Verdana" >
    Stretch to fit
  </text>
</svg>

Where, i have used viewBox but not specified the *preserveAspectRatio *
attribute.My question is what is the expected behavior here as i did not
find any mention of such scenario in the Spec.The result is attached in *
Pic1.jpg*
**
When i changed the value of the initial viewport as mentioned below svg
width="4cm" height="3cm" version="1.2" baseProfile="tiny" the result is
attached in *Pic2.jpg.*
**
Can anyone please explain the difference of behavior?

Thank & Regs,



Pic1.JPG
(image/jpeg attachment: Pic1.JPG)

Pic2.JPG
(image/jpeg attachment: Pic2.JPG)

Received on Thursday, 28 June 2007 11:06:32 GMT

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