Class ShapeSegment
Class ShapeSegment
Namespace: Aspose.Imaging
Assembly: Aspose.Imaging.dll (25.7.0)
Represents a shape segment. A segment is a line or curve connecting two points.
public abstract class ShapeSegment
{
protected double _x;
protected double _y;
public double X
{
get => _x;
set => _x = value;
}
public double Y
{
get => _y;
set => _y = value;
}
}
Inheritance
Derived
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
ShapeSegment()
protected ShapeSegment()
{
}
Properties
EndPoint
Gets the ending point.
public abstract PointF EndPoint
{
get;
}
Property Value
StartPoint
Gets the starting point.
public abstract PointF StartPoint
{
get;
}
Property Value
Methods
Equals(object)
Check if objects are equal.
public override bool Equals(object obj)
{
}
In this case, no changes were needed as the provided code is already correctly formatted according to C# conventions.
Parameters
obj
object
The other object.
Returns
The equality comparison result.
Equals(ShapeSegment)
Check if objects are equal.
protected bool Equals(ShapeSegment other)
{
if (other == null) return false;
if (ReferenceEquals(this, other)) return true;
return this.Type == other.Type &&
this.StartPoint.X == other.StartPoint.X &&
this.StartPoint.Y == other.StartPoint.Y &&
this.EndPoint.X == other.EndPoint.X &&
this.EndPoint.Y == other.EndPoint.Y;
}
Parameters
other
ShapeSegment
The other object.
Returns
The equality comparison result.
GetHashCode()
Get hash code of the current object.
public override int GetHashCode()
{
}
Returns
The hash code.