public abstract class GraphicElement extends Object
Represents base class for graphics object on the page.
Modifier and Type | Method and Description |
---|---|
void |
addOnPage(Page destination)
Adds current element on the page.
|
Matrix |
getMatrix()
Gets graphic element matrix.
|
List<Operator> |
getOperators()
Gets a collection of operators representing the element.
|
XFormPlacement |
getParent()
Gets the current
XFormPlacement in which the element is located. |
Point |
getPosition()
Gets or sets the position in the current coordinate space.
|
abstract Rectangle |
getRectangle()
Gets the bounding rectangle of the
GraphicElement . |
void |
remove()
Removes current element from the page.
|
String |
saveToSvg(Page page)
Converts the element into a single SVG image.
|
void |
saveToSvg(Page page,
String svgFilePath)
Converts the element into a single SVG image file.
|
void |
setPosition(Point value)
Gets or sets the position in the current coordinate space.
|
public final Matrix getMatrix()
Gets graphic element matrix. The matrix sets when element is created. It changes when SetPosition() is called.
public abstract Rectangle getRectangle()
Gets the bounding rectangle of the GraphicElement
.
public Point getPosition()
Gets or sets the position in the current coordinate space. If @link #getParent is not null then the element have xForm coordinate space.
public void setPosition(Point value)
Gets or sets the position in the current coordinate space.
If Parent
(getParent()
) is not null
then the element have xForm coordinate space.
value
- Point instancepublic final void remove()
Removes current element from the page. If there are many elements to remove better use Page#deleteGraphics(GraphicElementCollection).
public void addOnPage(Page destination)
Adds current element on the page. If there are many elements to add better use Page#addGraphics(GraphicElementCollection,Rectangle).
destination
- Destination pagepublic final XFormPlacement getParent()
Gets the current XFormPlacement
in which the element is located.
public final List<Operator> getOperators()
Gets a collection of operators representing the element.
public final String saveToSvg(Page page)
Converts the element into a single SVG image.
page
- The page of element.Copyright © 2024 Aspose. All Rights Reserved.