Packages

 

com.aspose.psd.shapes

Class TextShape

    • Constructor Detail

      • TextShape

        public TextShape()

        Initializes a new instance of the TextShape class.

      • TextShape

        public TextShape(String text,
                         RectangleF rectangle,
                         Font font,
                         StringFormat stringFormat)

        Initializes a new instance of the TextShape class.

        Parameters:
        text - The text to draw.
        rectangle - The text rectangle.
        font - The font to use.
        stringFormat - The string format.
    • Method Detail

      • getText

        public String getText()

        Gets or sets the drawn text.

        Value: The drawn text.
      • setText

        public void setText(String value)

        Gets or sets the drawn text.

        Value: The drawn text.
      • getFont

        public Font getFont()

        Gets or sets the font used to draw the text.

        Value: The font used to draw the text.
      • setFont

        public void setFont(Font value)

        Gets or sets the font used to draw the text.

        Value: The font used to draw the text.
      • getTextFormat

        public StringFormat getTextFormat()

        Gets or sets the text format.

        Value: The text format.
      • setTextFormat

        public void setTextFormat(StringFormat value)

        Gets or sets the text format.

        Value: The text format.
      • 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.
        Overrides:
        hasSegments in class RectangleProjectedShape
        Returns:
        True if shape has segments; otherwise, false.
      • getBounds

        public RectangleF getBounds(Matrix matrix)

        Gets the object's bounds.

        Overrides:
        getBounds in class RectangleProjectedShape
        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.

        Overrides:
        getBounds in class RectangleProjectedShape
        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.

        Overrides:
        transform in class RectangleProjectedShape
        Parameters:
        transform - The transformation to apply.