Packages

 

com.aspose.psd

Interfaces

Classes

Exceptions

com.aspose.psd

Class Figure



  • public class Figure
    extends ObjectWithBounds

    The figure. A container for shapes.

    • Constructor Detail

      • Figure

        public Figure()
    • Method Detail

      • getShapes

        public Shape[] getShapes()

        Gets the figure shapes.

        Returns:
        The figure shapes.
      • isClosed

        public boolean isClosed()

        Gets a value indicating whether this figure is closed. A closed figure will make a difference only in case where the first and the last figure's shapes are continuous shapes. In such case the first point of the first shape will be connected by a straight line from the last point of the last shape.

        Returns:
        True if this figure is closed; otherwise, false.
      • setClosed

        public void setClosed(boolean value)

        Sets a value indicating whether this figure is closed. A closed figure will make a difference only in case where the first and the last figure's shapes are continuous shapes. In such case the first point of the first shape will be connected by a straight line from the last point of the last shape.

        Parameters:
        value - True if this figure is closed; otherwise, false.
      • getSegments

        public ShapeSegment[] getSegments()

        Gets the whole figure segments.

        Returns:
        The figure segments.
      • addShape

        public void addShape(Shape shape)

        Adds a shape to the figure.

        Parameters:
        shape - The shape to add.
      • addShapes

        public void addShapes(Shape[] shapes)

        Adds a range of shapes to the figure.

        Parameters:
        shapes - The shapes to add.
      • removeShape

        public void removeShape(Shape shape)

        Removes a shape from the figure.

        Parameters:
        shape - The shape to remove.
      • removeShapes

        public void removeShapes(Shape[] shapes)

        Removes a range of shapes from the figure.

        Parameters:
        shapes - The shapes range to remove.
      • reverse

        public void reverse()

        Reverses this figure shapes order and shapes point order.

      • 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.