Class OdfTemplateImageValue
- Namespace
- OdfKit
- Assembly
- OdfKit.dll
Represents an image value used by {{Image:Name}} template placeholders.
表示供 {{Image:Name}} 模板圖片占位符使用的圖片值。
public sealed record OdfTemplateImageValue : IEquatable<OdfTemplateImageValue>
- Inheritance
-
OdfTemplateImageValue
- Implements
- Inherited Members
Constructors
OdfTemplateImageValue(byte[], string, string, OdfLength?, OdfLength?, string?)
Represents an image value used by {{Image:Name}} template placeholders.
表示供 {{Image:Name}} 模板圖片占位符使用的圖片值。
public OdfTemplateImageValue(byte[] Bytes, string FileName, string MediaType = "image/png", OdfLength? Width = null, OdfLength? Height = null, string? AltText = null)
Parameters
Bytesbyte[]The image bytes. / 圖片位元組。
FileNamestringThe preferred package file name. / 偏好的封裝檔名。
MediaTypestringThe image media type. / 圖片 MIME 類型。
WidthOdfLength?The optional display width. / 選用顯示寬度。
HeightOdfLength?The optional display height. / 選用顯示高度。
AltTextstringThe optional alternative text. / 選用替代文字。
Properties
AltText
The optional alternative text. / 選用替代文字。
public string? AltText { get; init; }
Property Value
Bytes
The image bytes. / 圖片位元組。
public byte[] Bytes { get; init; }
Property Value
- byte[]
FileName
The preferred package file name. / 偏好的封裝檔名。
public string FileName { get; init; }
Property Value
Height
The optional display height. / 選用顯示高度。
public OdfLength? Height { get; init; }
Property Value
MediaType
The image media type. / 圖片 MIME 類型。
public string MediaType { get; init; }
Property Value
Width
The optional display width. / 選用顯示寬度。
public OdfLength? Width { get; init; }
Property Value
Methods
Deconstruct(out byte[], out string, out string, out OdfLength?, out OdfLength?, out string?)
public void Deconstruct(out byte[] Bytes, out string FileName, out string MediaType, out OdfLength? Width, out OdfLength? Height, out string? AltText)
Parameters
Equals(OdfTemplateImageValue?)
public bool Equals(OdfTemplateImageValue? other)
Parameters
otherOdfTemplateImageValue
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(OdfTemplateImageValue?, OdfTemplateImageValue?)
public static bool operator ==(OdfTemplateImageValue? left, OdfTemplateImageValue? right)
Parameters
leftOdfTemplateImageValuerightOdfTemplateImageValue
Returns
operator !=(OdfTemplateImageValue?, OdfTemplateImageValue?)
public static bool operator !=(OdfTemplateImageValue? left, OdfTemplateImageValue? right)
Parameters
leftOdfTemplateImageValuerightOdfTemplateImageValue