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

SignatureDescription
AddParagraph(text: string, style: TextStyle) → *FloatingBoxAddParagraph ajoute un paragraphe à la boîte.
AddHeading(level: int, text: string, style: TextStyle) → *FloatingBoxAddHeading ajoute un titre (niveau 1–6) à la boîte.
AddImage(path: string, width: float64) → *FloatingBoxAddImage ajoute une image (hauteur ≤ 0 conserve les proportions) à la boîte.
AddImageAlt(path: string, width: float64, alt: string) → *FloatingBoxAddImageAlt ajoute une image avec du texte alternatif à la boîte.
AddList(items: []string, ordered: bool, style: TextStyle) → *FloatingBoxAddList ajoute une liste à puces/numérotée à la boîte.
AddSpacer(height: float64) → *FloatingBoxAddSpacer ajoute un espace vertical à la boîte.
SetBorder(border: BorderInfo) → *FloatingBoxSetBorder définit la bordure de la boîte.
SetBackground(c: *Color) → *FloatingBoxSetBackground définit la couleur de remplissage de la boîte (nil = none).
SetPadding(m: MarginInfo) → *FloatingBoxSetPadding définit le remplissage interne entre la bordure et le contenu.
SetSpacing(gap: float64) → *FloatingBoxSetSpacing définit l’écart vertical entre les éléments de la boîte (par défaut 6pt).

Voir aussi

 Français