You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Shamjith K V <sh...@yahoo.co.uk> on 2006/07/05 07:27:09 UTC

How to remove default offset in the rendered svg images --- Plz Help

Hi ..
When I viewed the below rectangle.svg in squiggle, the rendered image
is displayed after an offset from left. 
Can any body please help me to remove this offset ?

<!------rectangle.svg -------------->
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="102400" height="76800" viewBox = "0 0 102400 76800"  version = "1.1">
 <rect x="0" y="1000" width= "48000" height="5000" stroke = "blue" fill = "red" />
</svg>
<!-----rectangle.svg ------------------>

Thanks and Regards,
Shamjith

 		
---------------------------------
 Try the all-new Yahoo! Mail . "The New Version is radically easier to use" – The Wall Street Journal

Re: How to remove default offset in the rendered svg images --- Plz Help

Posted by Shamjith K V <sh...@yahoo.co.uk>.
Dear Thomas Deweese,
  Thank you so much for your help.
  It was the problem with preserveAspectRatio.
  I have specified it as "xMinYMin meet"
  and it did well..
  Thanks a lot...
  Regards,
  Shamjith.

thomas.deweese@kodak.com wrote:
  Hi Shamjith,

Shamjith K V wrote on 07/05/2006 01:27:09 AM:

> When I viewed the below rectangle.svg in squiggle, the rendered image
> is displayed after an offset from left. 
> Can any body please help me to remove this offset ?

I believe you are seeing the effects of viewBox/preserveAspectRatio.
If this is the problem then you first need to decide how you want
to handle mismatched aspect ratios. You might check the SVG
specification for the allowed values of preserveAspectRatio in
particular you might be interested in "xMinYMin meet" or 
"xMinYMin slice".

You can also replace the viewBox/preserveAspectRatio handling in
the JSVGCanvas by overiding the 'calculateViewingTransform' method.

> 
> >
> 
> = "1.1">
> = "red" />
> 
> 
> 
> Thanks and Regards,
> Shamjith
> Try the all-new Yahoo! Mail . "The New Version is radically easier to 
use" ? 
> The Wall Street Journal

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org



 		
---------------------------------
 All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine

Re: How to remove default offset in the rendered svg images --- Plz Help

Posted by th...@kodak.com.
Hi Shamjith,

Shamjith K V <sh...@yahoo.co.uk> wrote on 07/05/2006 01:27:09 AM:

> When I viewed the below rectangle.svg in squiggle, the rendered image
> is displayed after an offset from left. 
> Can any body please help me to remove this offset ?

   I believe you are seeing the effects of viewBox/preserveAspectRatio.
If this is the problem then you first need to decide how you want
to handle mismatched aspect ratios.  You might check the SVG
specification for the allowed values of preserveAspectRatio in
particular you might be interested in "xMinYMin meet" or 
"xMinYMin slice".

   You can also replace the viewBox/preserveAspectRatio handling in
the JSVGCanvas by overiding the 'calculateViewingTransform' method.

> <!------rectangle.svg -------------->
> <?xml version="1.0" standalone="no"?>>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.
> org/Graphics/SVG/1.1/DTD/svg11.dtd">
> <svg width="102400" height="76800" viewBox = "0 0 102400 76800"  version 
= "1.1">
>  <rect x="0" y="1000" width= "48000" height="5000" stroke = "blue" fill 
= "red" />
> </svg>
> <!-----rectangle.svg ------------------>
> 
> Thanks and Regards,
> Shamjith
>  Try the all-new Yahoo! Mail . "The New Version is radically easier to 
use" ? 
> The Wall Street Journal

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org