public class SVGDiagram extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected boolean |
ignoreClipHeuristic
If true, no attempt will be made to discard geometry based on it being
out of bounds.
|
static long |
serialVersionUID |
Constructor and Description |
---|
SVGDiagram(URI xmlBase,
SVGUniverse universe)
Creates a new instance of SVGDiagram
|
Modifier and Type | Method and Description |
---|---|
Rectangle |
getDeviceViewport() |
SVGElement |
getElement(String name) |
float |
getHeight() |
SVGRoot |
getRoot() |
SVGUniverse |
getUniverse() |
Rectangle2D |
getViewRect() |
Rectangle2D |
getViewRect(Rectangle2D rect)
Returns the viewing rectangle of this diagram in device coordinates.
|
float |
getWidth() |
URI |
getXMLBase() |
boolean |
ignoringClipHeuristic() |
List<List<SVGElement>> |
pick(Point2D point,
boolean boundingBox,
List<List<SVGElement>> retVec) |
List<List<SVGElement>> |
pick(Point2D point,
List<List<SVGElement>> retVec)
Searches thorough the scene graph for all RenderableElements that have
shapes that contain the passed point.
|
List<List<SVGElement>> |
pick(Rectangle2D pickArea,
boolean boundingBox,
List<List<SVGElement>> retVec) |
List<List<SVGElement>> |
pick(Rectangle2D pickArea,
List<List<SVGElement>> retVec) |
void |
removeElement(String name) |
void |
render(Graphics2D g)
Draws this diagram to the passed graphics context
|
void |
setDeviceViewport(Rectangle deviceViewport)
Sets the dimensions of the device being rendered into.
|
void |
setElement(String name,
SVGElement node) |
void |
setIgnoringClipHeuristic(boolean ignoreClipHeuristic) |
void |
setRoot(SVGRoot root) |
void |
updateTime(double curTime)
Updates all attributes in this diagram associated with a time event.
|
public static final long serialVersionUID
protected boolean ignoreClipHeuristic
public SVGDiagram(URI xmlBase, SVGUniverse universe)
xmlBase
- universe
- public void render(Graphics2D g) throws SVGException
g
- SVGException
public List<List<SVGElement>> pick(Point2D point, List<List<SVGElement>> retVec) throws SVGException
point
- retVec
- SVGException
public List<List<SVGElement>> pick(Point2D point, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException
SVGException
public List<List<SVGElement>> pick(Rectangle2D pickArea, List<List<SVGElement>> retVec) throws SVGException
SVGException
public List<List<SVGElement>> pick(Rectangle2D pickArea, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException
SVGException
public SVGUniverse getUniverse()
public URI getXMLBase()
public float getWidth()
public float getHeight()
public Rectangle2D getViewRect(Rectangle2D rect)
rect
- public Rectangle2D getViewRect()
public SVGElement getElement(String name)
public void setElement(String name, SVGElement node)
public void removeElement(String name)
public boolean ignoringClipHeuristic()
public void setIgnoringClipHeuristic(boolean ignoreClipHeuristic)
public void updateTime(double curTime) throws SVGException
curTime
- SVGException
public Rectangle getDeviceViewport()
public void setDeviceViewport(Rectangle deviceViewport)
deviceViewport
- Copyright © 2011-2019 Kitfox Studios. All Rights Reserved.