Shape
Panoramica
Shape è una classe in Aspose.Words FOSS per Python. Eredita da: BaseModel, NodeCastMixin.
Gli oggetti Shape espongono proprietà di geometria e contenuto come larghezza, altezza, image_data e text_box, e possono essere convertiti in altri tipi di nodo tramite as_body(), as_paragraph(), ecc.
Questa classe fornisce 8 metodi per lavorare con oggetti Shape nei programmi Python. I metodi disponibili includono: as_body, as_cell, as_paragraph, as_row, as_run, as_section, as_shape, as_table. Tutti i membri pubblici sono accessibili a qualsiasi applicazione Python dopo aver installato il pacchetto Aspose.Words FOSS per Python. Proprietà: allow_overlap, alternative_text, anchor_locked, behind_text, fill_color, has_image, e altre 18.
Proprietà
| Nome | Tipo | Accesso | Descrizione |
|---|---|---|---|
type | str | Lettura | Ottiene il tipo. |
shape_type | `int | None` | Lettura |
name | str | Lettura | Ottiene il nome. |
alternative_text | str | Lettura | Restituisce il testo alternativo. |
width | `float | None` | Lettura |
height | `float | None` | Lettura |
is_inline | `bool | None` | Lettura |
has_image | `bool | None` | Lettura |
image_data | Optional[ImageData] | Lettura | Ottiene i dati dell’immagine. |
text_box | `dict[str, Any] | None` | Lettura |
fill_color | str | Lettura | Ottiene il colore di riempimento. |
stroke | Optional[Border] | Lettura | Ottiene il tratto. |
text_box_anchor | int | Lettura | Ottiene l’ancora della casella di testo. |
wrap_type | int | Lettura | Ottiene il tipo di avvolgimento. |
relative_horizontal_position | int | Lettura | Ottiene la posizione orizzontale relativa. |
relative_vertical_position | int | Lettura | Restituisce la posizione verticale relativa. |
left | float | Lettura | Restituisce il valore sinistro. |
top | float | Lettura | Ottiene il valore superiore. |
horizontal_alignment | int | Lettura | Ottiene l’allineamento orizzontale. |
vertical_alignment | int | Lettura | Ottiene l’allineamento verticale. |
behind_text | bool | Lettura | Ottiene il testo dietro. |
allow_overlap | bool | Lettura | Ottiene l’allow overlap. |
is_layout_in_cell | bool | Lettura | Ottiene l’is layout nella cella. |
anchor_locked | bool | Lettura | Restituisce l’ancora bloccata. |
Metodi
| Firma | Descrizione |
|---|---|
as_body() | Chiama as_body su questa istanza di Shape. |
as_cell() | Chiama as_cell su questa istanza di Shape. |
as_paragraph() | Chiama as_paragraph su questa istanza di Shape. |
as_row() | Chiama as_row su questa istanza di Shape. |
as_run() | Chiama as_run su questa istanza di Shape. |
as_section() | Chiama as_section su questa istanza di Shape. |
as_shape() | Chiama as_shape su questa istanza di Shape. |
as_table() | Chiama as_table su questa istanza di Shape. |