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

SignaturBeschreibung
AddParagraph(text: string, style: TextStyle) → *FloatingBoxAddParagraph fügt der Box einen Absatz hinzu.
AddHeading(level: int, text: string, style: TextStyle) → *FloatingBoxAddHeading fügt der Box eine Überschrift (Ebene 1–6) hinzu.
AddImage(path: string, width: float64) → *FloatingBoxAddImage fügt der Box ein Bild (Höhe ≤ 0 erhält das Seitenverhältnis) hinzu.
AddImageAlt(path: string, width: float64, alt: string) → *FloatingBoxAddImageAlt fügt der Box ein Bild mit Alternativtext hinzu.
AddList(items: []string, ordered: bool, style: TextStyle) → *FloatingBoxAddList fügt der Box eine Aufzählungs-/Nummerierungsliste hinzu.
AddSpacer(height: float64) → *FloatingBoxAddSpacer fügt der Box vertikalen Abstand hinzu.
SetBorder(border: BorderInfo) → *FloatingBoxSetBorder setzt den Rand der Box.
SetBackground(c: *Color) → *FloatingBoxSetBackground setzt die Füllfarbe der Box (nil = keine).
SetPadding(m: MarginInfo) → *FloatingBoxSetPadding legt das innere Padding zwischen dem Rand und dem Inhalt fest.
SetSpacing(gap: float64) → *FloatingBoxSetSpacing legt den vertikalen Abstand zwischen den Elementen der Box fest (Standard 6pt).

Siehe auch

 Deutsch