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 "Paul L. Bogen" <pl...@kbsi.com> on 2007/07/02 19:41:54 UTC
Calculating the bounds for a G Element
I want to determine the width and height of an arbitrary G element.
Can this be done without a GUI, as in pure DOM manipulation?
PAUL LOGASA BOGEN II
Programmer
KNOWLEDGE BASED SYSTEMS, INC.
1408 University Drive East
College Station, Texas 77840
Phone: 979-260-5274
Fax: 979-691-2928
www.kbsi.com
<file:///C:/Documents%20and%20Settings/plbogen/Application%20Data/Micros
oft/Signatures/www.kbsi.com>
RE: Calculating the bounds for a G Element
Posted by Dylan Browne <db...@mango-solutions.com>.
This is covered in the archives. The explanation is covered in the Batik
documentation:
http://wiki.apache.org/xmlgraphics-batik/BootSvgAndCssDom
The required code is something like this:
DOMImplementation impl =
SVGDOMImplementation.getDOMImplementation();
SVGDocument doc = (SVGDocument)
impl.createDocument(SVGDOMImplementation.SVG_NAMESPACE_URI, "svg",
null);
UserAgent userAgent = new UserAgentAdapter();
DocumentLoader loader = new DocumentLoader(userAgent);
BridgeContext ctx = new BridgeContext(userAgent, loader);
ctx.setDynamicState(BridgeContext.DYNAMIC);
GVTBuilder builder = new GVTBuilder();
builder.build(ctx, doc);
-----Original Message-----
From: javaNoob [mailto:noypi_baller@yahoo.com]
Sent: 04 July 2007 08:53
To: batik-users@xmlgraphics.apache.org
Subject: RE: Calculating the bounds for a G Element
Bishop, Michael W. CONTR J9C880 wrote:
>
> You have to boot the DOM and CSS portions of Batik, then get the
> bounding box of the G element.
>
> Michael Bishop
>
>
i also have a similar problem.. what do you mean by boot the DOM and
CSS?
--
View this message in context:
http://www.nabble.com/Calculating-the-bounds-for-a-G-Element-tf4013769.h
tml#a11426250
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
RE: Calculating the bounds for a G Element
Posted by javaNoob <no...@yahoo.com>.
Bishop, Michael W. CONTR J9C880 wrote:
>
> You have to boot the DOM and CSS portions of Batik, then get the
> bounding box of the G element.
>
> Michael Bishop
>
>
i also have a similar problem.. what do you mean by boot the DOM and CSS?
--
View this message in context: http://www.nabble.com/Calculating-the-bounds-for-a-G-Element-tf4013769.html#a11426250
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
RE: Calculating the bounds for a G Element
Posted by "Bishop, Michael W. CONTR J9C880" <Mi...@je.jfcom.mil>.
You have to boot the DOM and CSS portions of Batik, then get the
bounding box of the G element.
Michael Bishop
-----Original Message-----
From: Paul L. Bogen [mailto:plbogen@kbsi.com]
Sent: Monday, July 02, 2007 1:42 PM
To: batik-users@xmlgraphics.apache.org
Subject: Calculating the bounds for a G Element
I want to determine the width and height of an arbitrary G element.
Can this be done without a GUI, as in pure DOM manipulation?
PAUL LOGASA BOGEN II
Programmer
KNOWLEDGE BASED SYSTEMS, INC.
1408 University Drive East
College Station, Texas 77840
Phone: 979-260-5274
Fax: 979-691-2928
www.kbsi.com
<file:///C:/Documents%20and%20Settings/plbogen/Application%20Data/Micros
oft/Signatures/www.kbsi.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org