LineSegment

Inheritance: java.lang.Object, com.aspose.imaging.ShapeSegment

public class LineSegment extends ShapeSegment

Represents a segment leading directly from a specific point to the next point.

Constructors

ConstructorDescription
LineSegment(PointF startPoint, PointF endPoint)Initializes a new instance of the LineSegment class.

Methods

MethodDescription
getStartPoint()Gets the starting point.
getEndPoint()Gets the ending point.
equals(Object o)Check if objects are equal.
hashCode()Get hash code of the current object.

LineSegment(PointF startPoint, PointF endPoint)

public LineSegment(PointF startPoint, PointF endPoint)

Initializes a new instance of the LineSegment class.

Parameters:

ParameterTypeDescription
startPointPointFThe start point.
endPointPointFThe end point.

getStartPoint()

public PointF getStartPoint()

Gets the starting point.

Value: The starting point.

Returns: PointF

getEndPoint()

public PointF getEndPoint()

Gets the ending point.

Value: The ending point.

Returns: PointF

equals(Object o)

public boolean equals(Object o)

Check if objects are equal.

Parameters:

ParameterTypeDescription
ojava.lang.ObjectThe other object.

Returns: boolean - The equality comparison result.

hashCode()

public int hashCode()

Get hash code of the current object.

Returns: int - The hash code.