public class SubPathContainer extends Object implements com.aspose.pdf.engine.utils.clustering.hierarchicalagglomerativeclustering.IDistanceMetric<SubPathContainer>, Comparable<SubPathContainer>
Represents a container class for graphic elements.
Constructor and Description |
---|
SubPathContainer()
Instantiates a container class for graphic elements.
|
SubPathContainer(GraphicElement graphicElement)
Instantiates a container class for graphic elements.
|
SubPathContainer(int id,
GraphicElement graphicElement)
Instantiates a container class for graphic elements.
|
SubPathContainer(int id,
GraphicElement graphicElement,
Rectangle rect)
Instantiates a container class for graphic elements.
|
SubPathContainer(Rectangle rect)
Instantiates a container class for graphic elements.
|
Modifier and Type | Method and Description |
---|---|
double |
calculateDistance(SubPathContainer instance1,
SubPathContainer instance2)
Calculates the distance between two containers.
|
int |
compareTo(SubPathContainer other)
Compares the current SubPathContainer object with another SubPathContainer object and returns an integer that indicates whether the current object is less than, equal to, or greater than the other object.
|
double |
distanceTo(SubPathContainer other)
Calculates the distance between this container and other container.
|
GraphicElement |
getGraphElement()
Gets contained graphic element.
|
int |
getId()
Gets the Id of the SubPathContainer.
|
Rectangle |
getRect()
Represents a rectangle of contained element.
|
String |
toString()
<inheritdoc cref="object.ToString"></inheritdoc> |
public SubPathContainer()
Instantiates a container class for graphic elements.
public SubPathContainer(Rectangle rect)
Instantiates a container class for graphic elements.
rect
- The bounding rectangle.public SubPathContainer(int id, GraphicElement graphicElement)
Instantiates a container class for graphic elements. The bounding rectangle is defined by element.
id
- The container id.graphicElement
- The GraphicElement to contain into container.public SubPathContainer(int id, GraphicElement graphicElement, Rectangle rect)
Instantiates a container class for graphic elements.
id
- The container id.graphicElement
- The GraphicElement to contain into container.rect
- The bounding rectangle.public SubPathContainer(GraphicElement graphicElement)
Instantiates a container class for graphic elements.
graphicElement
- The GraphicElement to contain into container.public final int getId()
Gets the Id of the SubPathContainer. Id is required for ease of debugging and sorting of elements during rendering.
public final GraphicElement getGraphElement()
Gets contained graphic element.
public final Rectangle getRect()
Represents a rectangle of contained element.
public final double calculateDistance(SubPathContainer instance1, SubPathContainer instance2)
Calculates the distance between two containers.
calculateDistance
in interface com.aspose.pdf.engine.utils.clustering.hierarchicalagglomerativeclustering.IDistanceMetric<SubPathContainer>
instance1
- The first container.instance2
- The second container.public String toString()
<inheritdoc cref="object.ToString"></inheritdoc>
public final double distanceTo(SubPathContainer other)
Calculates the distance between this container and other container.
other
- The other container.public final int compareTo(SubPathContainer other)
Compares the current SubPathContainer object with another SubPathContainer object and returns an integer that indicates whether the current object is less than, equal to, or greater than the other object. Objects are compared by their numeric ID.
compareTo
in interface Comparable<SubPathContainer>
other
- The SubPathContainer object to compare with the current object.Copyright © 2025 Aspose. All Rights Reserved.