Hi,
 
We're currently having a problem displaying some SVG which we have generated on the fly inside our program, the problem being that we just get an empty window when we try to view the SVG in a JSVGCanvas. I have attached a samle of our SVG. As you can see, the co-ordinates are shifted a long way from the origin. At the moment we are trying to change the rendering transform to shift the graphics back to the origin using:
 
...
JSVGCanvas canvas = new JSVGCanvas();
...
AffineTransform trans = new AffineTransform();
trans.translate(-315000.0, -812000.0);
canvas.setRenderingTransform(trans);
...
 
But this does not seem to be working =(
 
Can anyone help? Unfortunately, due to some design constraints, we can't use the svg <g transform="..."> tags which would seem to be the natural solution.
 
Thanks,
 
Chris
 
��<?xml version="1.0" encoding="UTF-16"?>

<!DOCTYPE svg SYSTEM "svg.dtd">

<svg width="100%" height="100%">

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="314901.34375,812502.3125,315001.1875,812490.3125,314996.84375,812453.8125,314966.84375,812457.8125,314969.5,812480.3125,314966.375,812480.8125,314963.25,812454.3125,314896.625,812462.3125,314901.34375,812502.3125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="314901.34375,812502.3125,315001.1875,812490.3125,314996.84375,812453.8125,314966.84375,812457.8125,314969.5,812480.3125,314966.375,812480.8125,314963.25,812454.3125,314896.625,812462.3125,314901.34375,812502.3125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="315017.46875,812456.3125,315033.21875,812486.8125,315389.46875,812444.8125,315419.28125,812301.8125,315004.90625,812347.8125,315017.46875,812456.3125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="315017.46875,812456.3125,315033.21875,812486.8125,315389.46875,812444.8125,315419.28125,812301.8125,315004.90625,812347.8125,315017.46875,812456.3125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="315389.46875,812444.8125,315437.34375,812439.3125,315485.4375,812208.3125,315437.78125,812212.8125,315421.46875,812291.3125,315419.28125,812301.8125,315389.46875,812444.8125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="315389.46875,812444.8125,315437.34375,812439.3125,315485.4375,812208.3125,315437.78125,812212.8125,315421.46875,812291.3125,315419.28125,812301.8125,315389.46875,812444.8125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="315003.75,812337.8125,315004.90625,812347.8125,315419.28125,812301.8125,315421.46875,812291.3125,315244.0625,812311.3125,315003.75,812337.8125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="315003.75,812337.8125,315004.90625,812347.8125,315419.28125,812301.8125,315421.46875,812291.3125,315244.0625,812311.3125,315003.75,812337.8125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="315003.75,812337.8125,315244.0625,812311.3125,315238.5625,812260.8125,315154.25,812270.3125,314997.9375,812287.8125,315003.75,812337.8125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="315003.75,812337.8125,315244.0625,812311.3125,315238.5625,812260.8125,315154.25,812270.3125,314997.9375,812287.8125,315003.75,812337.8125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="315244.0625,812311.3125,315421.46875,812291.3125,315437.78125,812212.8125,315443.84375,812183.8125,315317.96875,812198.3125,315312.59375,812150.3125,315141.71875,812169.8125,315150.375,812239.3125,315151.1875,812245.8125,315154.25,812270.3125,315238.5625,812260.8125,315244.0625,812311.3125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="315244.0625,812311.3125,315421.46875,812291.3125,315437.78125,812212.8125,315443.84375,812183.8125,315317.96875,812198.3125,315312.59375,812150.3125,315141.71875,812169.8125,315150.375,812239.3125,315151.1875,812245.8125,315154.25,812270.3125,315238.5625,812260.8125,315244.0625,812311.3125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="314997.9375,812287.8125,315154.25,812270.3125,315151.1875,812245.8125,314995.09375,812263.3125,314997.9375,812287.8125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="314997.9375,812287.8125,315154.25,812270.3125,315151.1875,812245.8125,314995.09375,812263.3125,314997.9375,812287.8125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="314994.40625,812257.3125,314995.09375,812263.3125,315151.1875,812245.8125,315150.375,812239.3125,314994.40625,812257.3125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="314994.40625,812257.3125,314995.09375,812263.3125,315151.1875,812245.8125,315150.375,812239.3125,314994.40625,812257.3125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="314994.40625,812257.3125,315150.375,812239.3125,315141.71875,812169.8125,315135.9375,812170.3125,315131.34375,812131.3125,314981.71875,812147.8125,314994.40625,812257.3125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="314994.40625,812257.3125,315150.375,812239.3125,315141.71875,812169.8125,315135.9375,812170.3125,315131.34375,812131.3125,314981.71875,812147.8125,314994.40625,812257.3125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="315317.96875,812198.3125,315443.84375,812183.8125,315454.1875,812133.8125,315312.59375,812150.3125,315317.96875,812198.3125"/>

	</g>

	<g style="stroke:#000000; fill:none; stroke-width:5; fill-opacity:1">

		<polygon points="315317.96875,812198.3125,315443.84375,812183.8125,315454.1875,812133.8125,315312.59375,812150.3125,315317.96875,812198.3125"/>

	</g>

</svg>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to