Table of Contents

Class OdfImageCropInfo

Namespace
OdfKit.Image
Assembly
OdfKit.dll

Represents the crop bounds of an image (corresponding to the rect(...) syntax of the fo:clip attribute). 表示影像的裁切邊界(對應 fo:clip 屬性的 rect(...) 語法)。

public sealed class OdfImageCropInfo
Inheritance
OdfImageCropInfo
Inherited Members

Constructors

OdfImageCropInfo(string, string, string, string)

Represents the crop bounds of an image (corresponding to the rect(...) syntax of the fo:clip attribute). 表示影像的裁切邊界(對應 fo:clip 屬性的 rect(...) 語法)。

public OdfImageCropInfo(string top, string right, string bottom, string left)

Parameters

top string

The top crop bound. / 頂部裁切邊界。

right string

The right crop bound. / 右側裁切邊界。

bottom string

The bottom crop bound. / 底部裁切邊界。

left string

The left crop bound. / 左側裁切邊界。

Properties

Bottom

Gets the bottom crop bound. 取得底部裁切邊界。

public string Bottom { get; }

Property Value

string

Left

Gets the left crop bound. 取得左側裁切邊界。

public string Left { get; }

Property Value

string

Right

Gets the right crop bound. 取得右側裁切邊界。

public string Right { get; }

Property Value

string

Top

Gets the top crop bound. 取得頂部裁切邊界。

public string Top { get; }

Property Value

string

Methods

ToString()

Formats the current crop bounds as an fo:clip attribute value. 將目前的裁切邊界格式化為 fo:clip 屬性值。

public override string ToString()

Returns

string

The attribute string in rect(top, right, bottom, left) format. / rect(top, right, bottom, left) 格式的屬性字串。

TryParse(string?, out OdfImageCropInfo?)

Attempts to parse an fo:clip attribute value into an OdfImageCropInfo. 嘗試將 fo:clip 屬性值剖析為 OdfImageCropInfo

public static bool TryParse(string? clip, out OdfImageCropInfo? crop)

Parameters

clip string

The raw fo:clip attribute text, in the form rect(top, right, bottom, left). / fo:clip 屬性原文,格式為 rect(top, right, bottom, left)

crop OdfImageCropInfo

The crop bounds returned on successful parsing. / 剖析成功時傳回的裁切邊界。

Returns

bool

true if parsing succeeded. / 若剖析成功則為 true