Table of Contents

Class DocxImage

Namespace
PDiffy
Assembly
PDiffy.dll

An image or other graphic. Width and height are in points. For a picture, Hash is the first 16 hex digits of the image's SHA-256, which catches a swapped image, and Type its file type, such as "png". For an embedded object, Type is the program it belongs to, such as "Excel.Sheet.12", and Hash is of what it holds; for an ActiveX control, Type is the control's name.

public sealed record DocxImage : DocxInline, IEquatable<DocxInline>, IEquatable<DocxImage>
Inheritance
DocxImage
Implements
Inherited Members

Properties

AltText

The description a screen reader reads, or null when the image has none.

public string? AltText { get; init; }

Property Value

string

Decorative

Whether the image is marked as decoration, which a screen reader skips.

public bool Decorative { get; init; }

Property Value

bool

Floating

Whether text flows around the image rather than the image sitting in the line.

public bool Floating { get; init; }

Property Value

bool

Hash

The first 16 hex digits of the SHA-256 of a picture's, embedded object's or control's data, or null when there's no data, such as for a chart, a linked object or a picture whose file is missing.

public string? Hash { get; init; }

Property Value

string

Height

The height as placed in the document, or 0 when the file doesn't give one.

public double Height { get; init; }

Property Value

double

Kind

"image" for a picture, "object" for an embedded or linked object such as a spreadsheet, "control" for an ActiveX control; otherwise what the graphic is, such as "chart", "diagram" or "shape". DocxGraphicKinds lists them.

public string Kind { get; init; }

Property Value

string

Source

The file a linked object shows, which the document doesn't contain; null when it's embedded.

public string? Source { get; init; }

Property Value

string

TextBox

What a text box, or a shape with text in it, says.

public IReadOnlyList<DocxBlock> TextBox { get; init; }

Property Value

IReadOnlyList<DocxBlock>

Title

The image's title, or null when it has none.

public string? Title { get; init; }

Property Value

string

Type

A picture's file type, an object's program or a control's name; null when there's none, as for a chart.

public string? Type { get; init; }

Property Value

string

Width

The width as placed in the document, or 0 when the file doesn't give one.

public double Width { get; init; }

Property Value

double