ShapeRenderer
Vue de l’ensemble
‘ShapeRenderer’ est une classe dans Aspose.Words FOSS pour Python.
Renders des formes, des images et des éléments positionnés.
Cette classe fournit 10 méthodes pour travailler avec les objets ShapeRenderer dans les programmes Python. Les méthodologies disponibles comprennent: __init__, compress_image_bytes , estimate_text_box_height ، render_anchored_wrapped_shapes‘, 'renders_floating_images,, rendres_ image_hape., render-positioned-shape ́, ‘‘rende_posed–shabes ́ , ’ rende-posé_formes_in` et ’l’ensemble des membres publics sont accessibles à toute application Pythone après l’installation de la version Aspose.Words FOSS pour le package PyThone.
méthodes
| Signature | Description |
|---|---|
__init__(writer: PDFWriterContext) | |
compress_image_bytes(image_bytes: bytes) → bytes | Apply image_compression and jpeg_quality options to raw image bytes. |
render_shape(pdf: FPDF, shape: ldm.ShapeNode) | Render a ShapeNode: image first (if any), then text-box paragraphs. |
render_image_shape(pdf: FPDF, shape: ldm.ShapeNode) | Embed an image from a ShapeNode into the PDF, scaling to fit page width. |
render_floating_images(pdf: FPDF, para: ldm.Paragraph) | Draw wrapNone images at their anchor coordinates. |
render_anchored_wrapped_shapes(pdf: FPDF, para: ldm.Paragraph) | Draw anchored (non-inline) shapes that wrap text around them. |
render_positioned_shapes(pdf: FPDF, doc: ldm.Document) | Draw every absolutely-positioned shape on the current (first) page. |
render_positioned_shapes_in(pdf: FPDF, paragraphs: list[ldm.Paragraph], line_y_override: Optional[float]) | Draw positioned shapes carried by paragraphs without moving cursor. |
render_positioned_shape(pdf: FPDF, shape: ldm.ShapeNode, line_y_override: Optional[float], y_override: Optional[float]) | Draw a positioned shape at its absolute page coordinates. |
estimate_text_box_height(paragraphs: list[ldm.Paragraph]) → float | Approximate the laid-out height of a list of paragraphs in mm. |
Voir aussi
- Aspose.Words pour Python — Enterprise API Reference