You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Joonas Lyytinen <jo...@helsinki.fi> on 2001/03/21 13:19:05 UTC

Is there a bug in the PNG and JPEG transcoders in batik 1.0 beta rc5?


	For some reason if I rotate or translate elements in the SVG file,
	the transcoded .png or .jpg do not show those elements at all..
	for example, the following SVG file (created with SGVGraphics2D)

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20001102//EN'
'http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd'>
<svg fill-opacity="1" color-rendering="auto" color-interpolation="sRGB"
text-rendering="auto" stroke="black" stroke-linecap="square" width="200"
stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1"
fill="black" font-weight="normal" stroke-dasharray="none" stroke-width="1"
height="150" font-family="&apos;Arial&apos;" font-style="normal"
stroke-linejoin="miter" font-size="12" image-rendering="auto"
stroke-dashoffset="0">
	<!--Generated by the Java 2D API Graphics2D SVG Generator, Sun Microsystems
Inc.-->
	<defs id="genericDefs"/>
	<g>
		<g fill="white" stroke="white">
			<rect x="0" y="0" clip-path="none" width="200" filter="none" opacity="1"
height="150" stroke="none"/>
			<rect x="0" y="0" transform="translate(0,150)" clip-path="none"
fill="red" width="40" filter="none" opacity="1" height="6" stroke="none"/>
			<rect x="41" y="0" transform="translate(0,150)" clip-path="none"
fill="blue" width="40" filter="none" opacity="1" height="20" stroke="none"/>
			<rect x="82" y="0" transform="translate(0,150)" clip-path="none"
fill="lime" width="40" filter="none" opacity="1" height="33" stroke="none"/>
			<rect x="123" y="0" transform="translate(0,150)" clip-path="none"
fill="yellow" width="40" filter="none" opacity="1" height="46"
stroke="none"/>
			<rect x="164" y="0" transform="translate(0,150)" clip-path="none"
fill="rgb(255,200,0)" width="40" filter="none" opacity="1" height="60"
stroke="none"/>
		</g>
		<g font-size="8" font-family="sans-serif" transform="translate(0,150)">
			<text x="20" y="10" clip-path="none" filter="none" opacity="1"
stroke="none">0.41
      </text>
			<text x="60" y="10" clip-path="none" filter="none" opacity="1"
stroke="none">1.21
      </text>
			<text x="100" y="10" clip-path="none" filter="none" opacity="1"
stroke="none">2.01
      </text>
			<text x="140" y="10" clip-path="none" filter="none" opacity="1"
stroke="none">2.81
      </text>
			<text x="180" y="10" clip-path="none" filter="none" opacity="1"
stroke="none">3.61
      </text>
		</g>
	</g>
</svg>
 produces the following output:



Is there a bug in the PNG and JPEG transcoders in batik 1.0 beta rc5?

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "J" == Joonas Lyytinen <jo...@helsinki.fi> writes:

JL> 	For some reason if I rotate or translate elements in the SVG
JL> file, the transcoded .png or .jpg do not show those elements at
JL> all..  for example, the following SVG file (created with
JL> SGVGraphics2D)

    Well, it helps if you don't translate all your elements out of the
view box for the svg element.

J> [...]
J> <svg [...] width="200" [...] height="150"  [...]> 
                                        ^^^

J> [...]
J> <rect x="0" y="0" clip-path="none" width="200" filter="none"
J> opacity="1" height="150" stroke="none"/> 

J> <rect x="0" y="0" transform="translate(0,150)" [...]
                                            ^^^ now off canvas...

J> <rect x="41" y="0" transform="translate(0,150)" 
                                             ^^ now off canvas...

   [...]


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