public abstract class GraphicElement extends Object implements com.aspose.ms.System.IDisposable
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.
|
void |
dispose()
Releases all resources used by the
GraphicElement class. |
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 . |
Page |
getSourcePage()
Gets the page from which the graphic element is extracted.
|
void |
remove()
Removes current element from the page.
|
String |
saveToSvg()
Converts the element into a single SVG image.
|
void |
saveToSvg(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 Page getSourcePage()
Gets the page from which the graphic element is extracted.
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 Parent #getParent/#setParent(XFormPlacement) 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/#setParent(XFormPlacement) 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()
Converts the element into a single SVG image.
public final void saveToSvg(String svgFilePath)
Converts the element into a single SVG image file.
svgFilePath
- The file path to save svg-image.public final void dispose()
Releases all resources used by the GraphicElement
class.
dispose
in interface com.aspose.ms.System.IDisposable
Copyright © 2025 Aspose. All Rights Reserved.