Packages

 

com.aspose.psd.shapes

Class PolygonShape

    • Constructor Detail

      • PolygonShape

        public PolygonShape()

        Initializes a new instance of the PolygonShape class.

      • PolygonShape

        public PolygonShape(PointF[] points)

        Initializes a new instance of the PolygonShape class.

        Parameters:
        points - The points array.
      • PolygonShape

        public PolygonShape(PointF[] points,
                            boolean isClosed)

        Initializes a new instance of the PolygonShape class.

        Parameters:
        points - The points array.
        isClosed - If set to true the polygon is closed.
    • Method Detail

      • getPoints

        public PointF[] getPoints()

        Gets or sets the curve points.

        Value: The curve points.
      • setPoints

        public void setPoints(PointF[] value)

        Gets or sets the curve points.

        Value: The curve points.
      • isClosed

        public boolean isClosed()

        Gets or sets a value indicating whether shape is closed.

        Value: true if shape is closed; otherwise, false.
        Specified by:
        isClosed in interface IOrderedShape
        Returns:
        true if this ordered shape is closed; otherwise, false.
      • setClosed

        public void setClosed(boolean value)

        Gets or sets a value indicating whether shape is closed.

        Value: true if shape is closed; otherwise, false.
        Specified by:
        setClosed in interface IOrderedShape
        Parameters:
        value - true if this ordered shape is closed; otherwise, false.
      • getBounds

        public RectangleF getBounds()

        Gets the object's bounds.

        Value: The object's bounds.
        Specified by:
        getBounds in class ObjectWithBounds
        Returns:
        The object's bounds.
      • getCenter

        public PointF getCenter()

        Gets the shape's center.

        Value: The shape's center.
        Specified by:
        getCenter in class Shape
        Returns:
        The shape's center.
      • getSegments

        public ShapeSegment[] getSegments()

        Gets the shape segments.

        Value: The shape segments.
        Specified by:
        getSegments in class Shape
        Returns:
        The shape segments.
      • hasSegments

        public boolean hasSegments()

        Gets a value indicating whether shape has segments.

        Value: True if shape has segments; otherwise, false.
        Specified by:
        hasSegments in class Shape
        Returns:
        True if shape has segments; otherwise, false.
      • getStartPoint

        public PointF getStartPoint()

        Gets the starting shape point.

        Value: The starting shape point.
        Specified by:
        getStartPoint in interface IOrderedShape
        Returns:
        The starting shape point.
      • getEndPoint

        public PointF getEndPoint()

        Gets the ending shape point.

        Value: The ending shape point.
        Specified by:
        getEndPoint in interface IOrderedShape
        Returns:
        The ending shape point.
      • reverse

        public void reverse()

        Reverses the order of points for this shape.

        Specified by:
        reverse in interface IOrderedShape
      • getBounds

        public RectangleF getBounds(Matrix matrix)

        Gets the object's bounds.

        Specified by:
        getBounds in class ObjectWithBounds
        Parameters:
        matrix - The matrix to apply before bounds will be calculated.
        Returns:
        The estimated object's bounds.
      • getBounds

        public RectangleF getBounds(Matrix matrix,
                                    Pen pen)

        Gets the object's bounds.

        Specified by:
        getBounds in class ObjectWithBounds
        Parameters:
        matrix - The matrix to apply before bounds will be calculated.
        pen - The pen to use for object. This can influence the object's bounds size.
        Returns:
        The estimated object's bounds.
      • transform

        public void transform(Matrix transform)

        Applies the specified transformation to the shape.

        Specified by:
        transform in class ObjectWithBounds
        Parameters:
        transform - The transformation to apply.