FloatingBox

FloatingBox

概要

FloatingBox は Aspose.PDF の FOSS における TypeScript 用のクラスです。

段落や画像(またはその両方)をパディング/ボーダー/塗りつぶししたボックスで、flow.AddFloatBox によって {@link Flow} カラムにフロートさせたもの。

このクラスは TypeScript プログラム内の FloatingBox オブジェクト向けに 7 つのメソッドを宣言しています。利用可能なメソッドは AddImage, AddParagraph, constructor, contentWidth, layoutItems, measure, paintAt です。すべてのパブリックメンバーは、Aspose.PDF の TypeScript 用 FOSS パッケージをインストールした後、任意の TypeScript アプリケーションからアクセス可能です。プロパティ: alt, background, border, borderWidth, color, heights、およびその他 5 件。

プロパティ

名前型アクセス説明
width: number読み取り幅を取得します。
spacing: number読み取りスペーシングを取得します。
padding: Padding読み取り@internal
borderWidth: number読み取り@internal
border: { width: number; color: [number, number, number]; sides?: BorderSides }読み取り@internal
width: number読み取り幅を取得します。
color: [number, number, number]読み取り色を取得します。
sides: BorderSides読み取り側面を取得します。
background: [number, number, number]読み取り@internal
alt: string読み取り@internal
heights: number[]読み取り高さを取得します。
total: number読み取り合計を取得します。

メソッド

シグネチャ説明
constructor(doc: Document, options: FloatBoxOptions)この FloatingBox インスタンスで constructor(doc, options) を呼び出します。
contentWidth() → numberコンテンツ幅: 外側の幅から水平パディングと両方のボーダーを差し引いたもの。
AddParagraph(text: string, options: FlowParagraphOptions) → thisボックス内に単語折り返しされた段落を追加する。
AddImage(data: Uint8Array, options: FloatBoxImageOptions) → thisボックス内に画像を追加する。
layoutItems() → { heights: number[]; total: number }各項目の高さとそれらの合計(コンテンツのみ、パディング/ボーダーは含まない)。
measure() → numberボックス全体の高さ: コンテンツ + 要素間の間隔 + パディング + ボーダー。
paintAt(page: Page, x: number, topY: number, structParent: StructElement) → number左上隅を (x, topY) に置いてボックスを描画する (PDF ユーザースペース、y 上方向)。
 日本語