Classe TextShape
Contenuti
[
Nascondere
]Summary: Represents a text shape.
Module: aspose.imaging.shapes
Full Name: aspose.imaging.shapes.TextShape
Inheritance: RectangleProjectedShape
Constructors
| Name | Descrizione |
|---|---|
| TextShape() | Inizializza una nuova istanza della classe TextShape. |
| TextShape(text, rectangle, font, string_format) | Inizializza una nuova istanza della classe TextShape. |
Properties
| Name | Type | Access | Descrizione |
|---|---|---|---|
| bounds | RectangleF | r | Ottiene i limiti dell’oggetto. |
| center | PointF | r | Restituisce il centro della forma. |
| font | Font | r/w | Ottiene o imposta il font usato per disegnare il testo. |
| has_segments | bool | r | Restituisce un valore che indica se la forma ha segmenti. |
| left_bottom | PointF | r | Restituisce il punto in basso a sinistra del rettangolo. |
| left_top | PointF | r | Restituisce il punto in alto a sinistra del rettangolo. |
| rectangle_height | float | r | Restituisce l’altezza del rettangolo. |
| rectangle_width | float | r | Restituisce la larghezza del rettangolo. |
| right_bottom | PointF | r | Restituisce il punto in basso a destra del rettangolo. |
| right_top | PointF | r | Restituisce il punto in alto a destra del rettangolo. |
| segments | ShapeSegment[] | r | Restituisce i segmenti della forma. |
| text | string | r/w | Ottiene o imposta il testo disegnato. |
| text_format | StringFormat | r/w | Ottiene o imposta il formato del testo. |
Methods
| Name | Descrizione |
|---|---|
| get_bounds(matrix) | Ottiene i limiti dell’oggetto. |
| get_bounds(matrix, pen) | Ottiene i limiti dell’oggetto. |
| transform(transform) | Applica la trasformazione specificata alla forma. |
Constructor: TextShape()
TextShape()
Inizializza una nuova istanza della classe TextShape.
Constructor: TextShape(text, rectangle, font, string_format)
TextShape(text, rectangle, font, string_format)
Inizializza una nuova istanza della classe TextShape.
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| text | string | Il testo da disegnare. |
| rectangle | RectangleF | Il rettangolo del testo. |
| font | Font | Il font da usare. |
| string_format | StringFormat | Il formato stringa. |
Method: get_bounds(matrix)
get_bounds(matrix)
Ottiene i limiti dell’oggetto.
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| matrix | Matrix | La matrice da applicare prima che i limiti vengano calcolati. |
Returns
| Tipo | Descrizione |
|---|---|
| RectangleF | I limiti stimati dell’oggetto. |
Method: get_bounds(matrix, pen)
get_bounds(matrix, pen)
Ottiene i limiti dell’oggetto.
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| matrix | Matrix | La matrice da applicare prima che i limiti vengano calcolati. |
| pen | Pen | La penna da usare per l’oggetto. Questo può influenzare la dimensione dei limiti dell’oggetto. |
Returns
| Tipo | Descrizione |
|---|---|
| RectangleF | I limiti stimati dell’oggetto. |
Method: transform(transform)
transform(transform)
Applica la trasformazione specificata alla forma.
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| transform | Matrix | La trasformazione da applicare. |