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

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"
  <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

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 *
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,

(image/jpeg attachment: Pic1.JPG)

(image/jpeg attachment: Pic2.JPG)

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:16 UTC