Table of Contents

Class OdfImage

Namespace
OdfKit.Text
Assembly
OdfKit.dll

Represents an image in a text document. 表示文字文件中的圖片。

public class OdfImage
Inheritance
OdfImage
Inherited Members

Constructors

OdfImage(OdfNode, OdfNode)

Initializes a new instance of the OdfImage class. 初始化 OdfImage 類別的新執行個體。

public OdfImage(OdfNode frameNode, OdfNode imageNode)

Parameters

frameNode OdfNode
imageNode OdfNode

OdfImage(OdfNode, OdfNode, OdfDocument?)

Initializes a new instance of the OdfImage class with the specified nodes and document. 使用指定的節點與文件初始化 OdfImage 類別的新執行個體。

public OdfImage(OdfNode frameNode, OdfNode imageNode, OdfDocument? document)

Parameters

frameNode OdfNode
imageNode OdfNode
document OdfDocument

Properties

AccessibilityTitle

Gets or sets the image's accessibility title (maps to <svg:title>). 取得或設定圖片的無障礙標題(對應 <svg:title>)。

public string? AccessibilityTitle { get; set; }

Property Value

string

AltText

Gets or sets the image's accessible alternative text (maps to <svg:desc>). 取得或設定圖片的無障礙替代文字(對應 <svg:desc>)。

public string? AltText { get; set; }

Property Value

string

AnchorType

Gets or sets the image's anchor type. 取得或設定圖片的錨定類型。

public string? AnchorType { get; set; }

Property Value

string

CropTop

Gets or sets the image's crop boundary. 取得或設定圖片的裁剪邊界。

public string? CropTop { get; set; }

Property Value

string

FrameNode

Gets the image's frame node. 取得圖片的外框節點。

public OdfNode FrameNode { get; }

Property Value

OdfNode

Height

Gets or sets the image's height. 取得或設定圖片的高度。

public string? Height { get; set; }

Property Value

string

ImageHref

Gets the image's reference path within the ODF package. 取得圖片在 ODF 封裝中的參照路徑。

public string? ImageHref { get; }

Property Value

string

ImageNode

Gets the image's picture node. 取得圖片的影像節點。

public OdfNode ImageNode { get; }

Property Value

OdfNode

IsDecorative

Gets whether this image is marked as decorative (with LibreOffice loext:decorative compatibility reading). 取得此圖片是否標記為裝飾性(含 LibreOffice loext:decorative 相容讀取)。

public bool IsDecorative { get; }

Property Value

bool

Layout

Gets the image's layout settings (e.g. border, margin, wrap, crop, and opacity). 取得影像的版面配置設定(如框線、邊距、環繞、裁剪與透明度)。

public OdfImageLayout Layout { get; }

Property Value

OdfImageLayout

Name

Gets or sets the image's name. 取得或設定圖片的名稱。

public string? Name { get; set; }

Property Value

string

Width

Gets or sets the image's width. 取得或設定圖片的寬度。

public string? Width { get; set; }

Property Value

string

WrapStyle

Gets or sets the image's text-wrap style. 取得或設定圖片的文繞圖樣式。

public string? WrapStyle { get; set; }

Property Value

string

Methods

MarkAsDecorative()

Short overload of MarkAsDecorative that uses default values for all optional parameters and forwards to the full overload. 便利多載:MarkAsDecorative 的所有可選參數使用預設值並轉呼叫最長多載。

public OdfImage MarkAsDecorative()

Returns

OdfImage

MarkAsDecorative(bool)

Marks this image as decorative so assistive technologies skip over it. 將此圖片標記為裝飾性,輔助技術應略過此物件。

public OdfImage MarkAsDecorative(bool decorative)

Parameters

decorative bool

Whether to mark it as decorative. / 是否標記為裝飾性。

Returns

OdfImage

The current image instance. / 目前圖片執行個體。