xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DeWeese Thomas <thomas.dewe...@gmail.com>
Subject Re: Need help for tranforming objects.
Date Wed, 31 Oct 2012 22:33:08 GMT
Hi Mayank,
    The simple answer is the viewBox attribute, which allows you to set the rectangle of the
infinite canvas that should fill to available JSVGCanvas.

    However I suspect that what may really want to do is simply translate the JSVGCanvas which
can be done
by manipulating the viewing transform on the canvas.

    If you need more information on either of these just reply.

   Thomas

On Oct 31, 2012, at 12:40 AM, Mayank <mayankmails@gmail.com> wrote:

> Hello All,
> 
> I am new to batik. I am able to read the SVG document and display it on
> SVGCanvas. It worked fine.
> 
> Now, the origin of SVG document and Root element in set to (x=0,y=0). Then I
> added a Rectangle element programmatically around the SVG components such
> that it include all the SVG components. Now, at  (x=0,y=0) I have root, SVG
> document and programmatically added rectangle. 
> 
> After this I moved rectangle and SVG components to let’s say
> (x=400,y=400).So, now I am able to view the rectangle at desired position on
> the canvas.
> 
> The rectangle and SVG components are away from origin of root. My question
> how can i transform the rectangle such that it shows up in left top corner
> of Canvas without shifting it to origin(0,0)?Root should be at (0,0) and
> rectangle should be at (400,400) but rectangle renders at let top of canvas.
> 
> Which property should be used in this case?
> 
> Thanks.
> 
> 
> 
> 
> --
> View this message in context: http://batik.2283329.n4.nabble.com/Need-help-for-tranforming-objects-tp4655320.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


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


Mime
View raw message