FloatingBox
Vue d’ensemble
FloatingBox est un type dans Aspose.PDF FOSS pour Go.
FloatingBox est un conteneur de contenu positionné (Niveau 2 du modèle de flux): une boîte avec une bordure, un arrière-plan et un remplissage optionnels qui place son propre contenu (paragraphes, titres, images, listes) à l’intérieur de sa largeur.
Ce type fournit 10 méthodes pour travailler avec les objets FloatingBox dans les programmes Go. Les méthodes disponibles incluent: AddHeading, AddImage, AddImageAlt, AddList, AddParagraph, AddSpacer, SetBackground, SetBorder, SetPadding, SetSpacing. Tous les membres publics sont accessibles à toute application Go après l’installation du package Aspose.PDF FOSS pour Go.
Méthodes
| Signature | Description |
|---|---|
AddParagraph(text: string, style: TextStyle) → *FloatingBox | AddParagraph ajoute un paragraphe à la boîte. |
AddHeading(level: int, text: string, style: TextStyle) → *FloatingBox | AddHeading ajoute un titre (niveau 1–6) à la boîte. |
AddImage(path: string, width: float64) → *FloatingBox | AddImage ajoute une image (hauteur ≤ 0 conserve les proportions) à la boîte. |
AddImageAlt(path: string, width: float64, alt: string) → *FloatingBox | AddImageAlt ajoute une image avec du texte alternatif à la boîte. |
AddList(items: []string, ordered: bool, style: TextStyle) → *FloatingBox | AddList ajoute une liste à puces/numérotée à la boîte. |
AddSpacer(height: float64) → *FloatingBox | AddSpacer ajoute un espace vertical à la boîte. |
SetBorder(border: BorderInfo) → *FloatingBox | SetBorder définit la bordure de la boîte. |
SetBackground(c: *Color) → *FloatingBox | SetBackground définit la couleur de remplissage de la boîte (nil = none). |
SetPadding(m: MarginInfo) → *FloatingBox | SetPadding définit le remplissage interne entre la bordure et le contenu. |
SetSpacing(gap: float64) → *FloatingBox | SetSpacing définit l’écart vertical entre les éléments de la boîte (par défaut 6pt). |