Closed Bug 215891 Opened 21 years ago Closed 21 years ago

Aspect ratio of SVG file is not preserved

Categories

(Core :: SVG, defect)

Other Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 111496

People

(Reporter: darryl, Assigned: alex)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030809
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030809

When you display an SVG file whose width and height is 100% 100%, the aspect
ratio of the viewBox is not preserved.  Other SVG viewers (Batik, Adobe plug-in)
preserve aspect ratio by default.  For interoperability, Mozilla should also.

Reproducible: Always

Steps to Reproduce:
1. open an SVG file with height and width of 100% 100% that contains, say
a rect with width == height

2. resize browser so viewing area aspect ratio changes



Actual Results:  
Image scales, aspect ratio is not preserved.

Expected Results:  
Image scales, aspect ratio is preserved.

Example svg file...

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN"   
  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
<svg version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" 
  xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" 
  height="100%" viewBox="0 0 480 360">

  <rect x="100" y="100" width="200" height="200" fill="red"/>
</svg>
Version: Trunk → Other Branch

*** This bug has been marked as a duplicate of 111496 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.