FloatingBox
FloatingBox
Übersicht
FloatingBox ist ein Typ in Aspose.PDF FOSS für Go.
FloatingBox ist ein positionierter Inhaltsbehälter (Stufe 2 des Flussmodells): ein Kasten mit optionalem Rand, Hintergrund und Innenabstand, der seinen eigenen Inhalt (Absätze, Überschriften, Bilder, Listen) innerhalb seiner Breite anordnet.
Dieser Typ bietet 10 Methoden zur Arbeit mit FloatingBox-Objekten in Go-Programmen. Verfügbare Methoden sind: AddHeading, AddImage, AddImageAlt, AddList, AddParagraph, AddSpacer, SetBackground, SetBorder, SetPadding, SetSpacing. Alle öffentlichen Mitglieder sind für jede Go-Anwendung zugänglich, nachdem das Aspose.PDF FOSS-Paket für Go installiert wurde.
Methoden
| Signatur | Beschreibung |
|---|---|
AddParagraph(text: string, style: TextStyle) → *FloatingBox | AddParagraph fügt der Box einen Absatz hinzu. |
AddHeading(level: int, text: string, style: TextStyle) → *FloatingBox | AddHeading fügt der Box eine Überschrift (Ebene 1–6) hinzu. |
AddImage(path: string, width: float64) → *FloatingBox | AddImage fügt der Box ein Bild (Höhe ≤ 0 erhält das Seitenverhältnis) hinzu. |
AddImageAlt(path: string, width: float64, alt: string) → *FloatingBox | AddImageAlt fügt der Box ein Bild mit Alternativtext hinzu. |
AddList(items: []string, ordered: bool, style: TextStyle) → *FloatingBox | AddList fügt der Box eine Aufzählungs-/Nummerierungsliste hinzu. |
AddSpacer(height: float64) → *FloatingBox | AddSpacer fügt der Box vertikalen Abstand hinzu. |
SetBorder(border: BorderInfo) → *FloatingBox | SetBorder setzt den Rand der Box. |
SetBackground(c: *Color) → *FloatingBox | SetBackground setzt die Füllfarbe der Box (nil = keine). |
SetPadding(m: MarginInfo) → *FloatingBox | SetPadding legt das innere Padding zwischen dem Rand und dem Inhalt fest. |
SetSpacing(gap: float64) → *FloatingBox | SetSpacing legt den vertikalen Abstand zwischen den Elementen der Box fest (Standard 6pt). |