Shape
Gambaran Umum
Shape adalah sebuah kelas dalam Aspose.Words FOSS untuk Python. Mewarisi dari: BaseModel, NodeCastMixin.
Objek Shape mengekspos properti geometri dan konten seperti lebar, tinggi, image_data dan text_box, dan dapat di-cast ke tipe node lain melalui as_body(), as_paragraph(), dll.
Kelas ini menyediakan 8 metode untuk bekerja dengan objek Shape dalam program Python. Metode yang tersedia meliputi: as_body, as_cell, as_paragraph, as_row, as_run, as_section, as_shape, as_table. Semua anggota publik dapat diakses oleh aplikasi Python mana pun setelah menginstal paket Aspose.Words FOSS untuk Python. Properti: allow_overlap, alternative_text, anchor_locked, behind_text, fill_color, has_image, dan 18 lainnya.
Properti
| Nama | Jenis | Akses | Deskripsi |
|---|---|---|---|
type | str | Baca | Mendapatkan tipe. |
shape_type | `int | None` | Baca |
name | str | Baca | Mendapatkan nama. |
alternative_text | str | Baca | Mendapatkan teks alternatif. |
width | `float | None` | Baca |
height | `float | None` | Baca |
is_inline | `bool | None` | Baca |
has_image | `bool | None` | Baca |
image_data | Optional[ImageData] | Baca | Mendapatkan data gambar. |
text_box | `dict[str, Any] | None` | Baca |
fill_color | str | Baca | Mendapatkan warna isi. |
stroke | Optional[Border] | Baca | Mendapatkan stroke. |
text_box_anchor | int | Baca | Mendapatkan jangkar kotak teks. |
wrap_type | int | Baca | Mendapatkan tipe pembungkus. |
relative_horizontal_position | int | Baca | Mendapatkan posisi horizontal relatif. |
relative_vertical_position | int | Baca | Mendapatkan posisi vertikal relatif. |
left | float | Baca | Mendapatkan left. |
top | float | Baca | Mendapatkan bagian atas. |
horizontal_alignment | int | Baca | Mendapatkan perataan horizontal. |
vertical_alignment | int | Baca | Mendapatkan perataan vertikal. |
behind_text | bool | Baca | Mendapatkan teks di belakang. |
allow_overlap | bool | Baca | Mendapatkan allow overlap. |
is_layout_in_cell | bool | Baca | Mendapatkan is layout dalam sel. |
anchor_locked | bool | Baca | Mendapatkan anchor terkunci. |
Metode
| Tanda Tangan | Deskripsi |
|---|---|
as_body() | Memanggil as_body pada instance Shape ini. |
as_cell() | Memanggil as_cell pada instance Shape ini. |
as_paragraph() | Memanggil as_paragraph pada instance Shape ini. |
as_row() | Memanggil as_row pada instance Shape ini. |
as_run() | Memanggil as_run pada instance Shape ini. |
as_section() | Memanggil as_section pada instance Shape ini. |
as_shape() | Memanggil as_shape pada instance Shape ini. |
as_table() | Memanggil as_table pada instance Shape ini. |