TextShape
Inheritance: java.lang.Object, com.aspose.psd.ObjectWithBounds, com.aspose.psd.Shape, com.aspose.psd.shapes.RectangleProjectedShape
public final class TextShape extends RectangleProjectedShape
Represents a text shape.
Constructors
| Constructor | Description |
|---|---|
| TextShape() | Initializes a new instance of the TextShape class. |
| TextShape(String text, RectangleF rectangle, Font font, StringFormat stringFormat) | Initializes a new instance of the TextShape class. |
Methods
| Method | Description |
|---|---|
| equals(Object arg0) | |
| getBounds() | Gets the object’s bounds. |
| getBounds(Matrix matrix) | Gets the object’s bounds. |
| getBounds(Matrix matrix, Pen pen) | Gets the object’s bounds. |
| getCenter() | Gets the shape’s center. |
| getClass() | |
| getFont() | Gets or sets the font used to draw the text. |
| getLeftBottom() | Gets the left bottom rectangle point. |
| getLeftTop() | Gets the left top rectangle point. |
| getRectangleHeight() | Gets the rectangle height. |
| getRectangleWidth() | Gets the rectangle width. |
| getRightBottom() | Gets the right bottom rectangle point. |
| getRightTop() | Gets the right top rectangle point. |
| getSegments() | Gets the shape segments. |
| getText() | Gets or sets the drawn text. |
| getTextFormat() | Gets or sets the text format. |
| hasSegments() | Gets a value indicating whether shape has segments. |
| hashCode() | |
| notify() | |
| notifyAll() | |
| setFont(Font value) | Gets or sets the font used to draw the text. |
| setText(String value) | Gets or sets the drawn text. |
| setTextFormat(StringFormat value) | Gets or sets the text format. |
| toString() | |
| transform(Matrix transform) | Applies the specified transformation to the shape. |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
TextShape()
public TextShape()
Initializes a new instance of the TextShape class.
TextShape(String text, RectangleF rectangle, Font font, StringFormat stringFormat)
public TextShape(String text, RectangleF rectangle, Font font, StringFormat stringFormat)
Initializes a new instance of the TextShape class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| text | java.lang.String | The text to draw. |
| rectangle | RectangleF | The text rectangle. |
| font | Font | The font to use. |
| stringFormat | StringFormat | The string format. |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getBounds()
public RectangleF getBounds()
Gets the object’s bounds.
Value: The object’s bounds.
Returns: RectangleF
getBounds(Matrix matrix)
public RectangleF getBounds(Matrix matrix)
Gets the object’s bounds.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| matrix | Matrix | The matrix to apply before bounds will be calculated. |
Returns: RectangleF - The estimated object’s bounds.
getBounds(Matrix matrix, Pen pen)
public RectangleF getBounds(Matrix matrix, Pen pen)
Gets the object’s bounds.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| matrix | Matrix | The matrix to apply before bounds will be calculated. |
| pen | Pen | The pen to use for object. This can influence the object’s bounds size. |
Returns: RectangleF - The estimated object’s bounds.
getCenter()
public PointF getCenter()
Gets the shape’s center.
Value: The shape’s center.
Returns: PointF
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getFont()
public Font getFont()
Gets or sets the font used to draw the text.
Value: The font used to draw the text.
Returns: Font
getLeftBottom()
public PointF getLeftBottom()
Gets the left bottom rectangle point.
Value: The left bottom rectangle point.
Returns: PointF
getLeftTop()
public PointF getLeftTop()
Gets the left top rectangle point.
Value: The left top rectangle point.
Returns: PointF
getRectangleHeight()
public double getRectangleHeight()
Gets the rectangle height.
Value: The rectangle height.
Returns: double
getRectangleWidth()
public double getRectangleWidth()
Gets the rectangle width.
Value: The rectangle width.
Returns: double
getRightBottom()
public PointF getRightBottom()
Gets the right bottom rectangle point.
Value: The right bottom rectangle point.
Returns: PointF
getRightTop()
public PointF getRightTop()
Gets the right top rectangle point.
Value: The right top rectangle point.
Returns: PointF
getSegments()
public ShapeSegment[] getSegments()
Gets the shape segments.
Value: The shape segments.
Returns: com.aspose.psd.ShapeSegment[]
getText()
public String getText()
Gets or sets the drawn text.
Value: The drawn text.
Returns: java.lang.String
getTextFormat()
public StringFormat getTextFormat()
Gets or sets the text format.
Value: The text format.
Returns: StringFormat
hasSegments()
public boolean hasSegments()
Gets a value indicating whether shape has segments.
Value: True if shape has segments; otherwise, false .
Returns: boolean
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setFont(Font value)
public void setFont(Font value)
Gets or sets the font used to draw the text.
Value: The font used to draw the text.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | Font |
setText(String value)
public void setText(String value)
Gets or sets the drawn text.
Value: The drawn text.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String |
setTextFormat(StringFormat value)
public void setTextFormat(StringFormat value)
Gets or sets the text format.
Value: The text format.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | StringFormat |
toString()
public String toString()
Returns: java.lang.String
transform(Matrix transform)
public void transform(Matrix transform)
Applies the specified transformation to the shape.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| transform | Matrix | The transformation to apply. |
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long | |
| arg1 | int |