public class SVGDocumentReader extends Object
IlvGraphicBag
with the translation of
the SVG Element
instances of an SVG Document
. It is
used by the SVGInputStream
to read an SVG file in an
IlvManager
.Constructor and Description |
---|
SVGDocumentReader(SVGDocumentReaderConfigurator conf)
Builds an instance of an
SVGDocumentReader from the given
configurator. |
Modifier and Type | Method and Description |
---|---|
Document |
getDocument()
Returns the
Document corresponding to the SVG file. |
void |
readDocument(Document document,
IlvGraphicBag bag)
Loads the SVG
Document into the IlvGraphicBag . |
protected boolean |
readSVGDescElement(IlvGraphic graphic,
Element element)
You can override this method to read the SVG 'desc' elements.
|
protected boolean |
readSVGTitleElement(IlvGraphic graphic,
Element element)
You can override this method to read the SVG 'title' elements.
|
protected boolean |
readUnknownElement(IlvGraphic graphic,
Element element)
You can override this method to read the non-SVG elements that are present
in your
Document . |
public SVGDocumentReader(SVGDocumentReaderConfigurator conf)
SVGDocumentReader
from the given
configurator.public void readDocument(Document document, IlvGraphicBag bag) throws IOException
Document
into the IlvGraphicBag
.
When possible (that is, the IlvGraphicBag
is an
IlvManager
and the 'g' elements are not transformed) the
mechanism loads the top-level 'g' elements of the SVG document as layers of
the manager.IOException
public final Document getDocument()
Document
corresponding to the SVG file.protected boolean readSVGDescElement(IlvGraphic graphic, Element element)
true
, the 'desc' element will not be processed by the
default reader.graphic
- The latest IlvGraphic
that was read.element
- The SVG 'desc' element.protected boolean readSVGTitleElement(IlvGraphic graphic, Element element)
true
, the 'title' element will not be processed
by the default reader.graphic
- The latest IlvGraphic
that was read.element
- The SVG 'title' element.protected boolean readUnknownElement(IlvGraphic graphic, Element element)
Document
. If the method returns true
,
these elements will be totally ignored by the default reader.graphic
- The latest IlvGraphic
that was read.element
- The unknown element.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.