Table of Contents

Class RichTextImage

Namespace
RichEdit.Maui
Assembly
RichEdit.Maui.dll

Represents an owned inline image and its presentation metadata.

public sealed record RichTextImage : IEquatable<RichTextImage>
Inheritance
RichTextImage
Implements
Inherited Members

Constructors

RichTextImage()

public RichTextImage()

Properties

AlternativeText

Gets alternative text.

public string? AlternativeText { get; init; }

Property Value

string

Crop

Gets crop amounts in points.

public RichTextImageCrop Crop { get; init; }

Property Value

RichTextImageCrop

Data

Gets the immutable encoded image payload.

public ImmutableArray<byte> Data { get; init; }

Property Value

ImmutableArray<byte>

Height

Gets the requested height in points.

public double Height { get; init; }

Property Value

double

MediaType

Gets the image media type.

public string MediaType { get; init; }

Property Value

string

Position

Gets the U+FFFC position occupied by the image.

public int Position { get; init; }

Property Value

int

Rotation

Gets clockwise rotation in degrees.

public double Rotation { get; init; }

Property Value

double

Source

Gets an optional source identifier or URI.

public string? Source { get; init; }

Property Value

string

VerticalAlignment

Gets vertical inline alignment.

public RichTextImageVerticalAlignment VerticalAlignment { get; init; }

Property Value

RichTextImageVerticalAlignment

Width

Gets the requested width in points.

public double Width { get; init; }

Property Value

double

Methods

Equals(RichTextImage?)

public bool Equals(RichTextImage? other)

Parameters

other RichTextImage

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

FromBytes(int, string, ReadOnlySpan<byte>, double, double, RichTextImageVerticalAlignment, string?)

Creates an inline image by copying encoded bytes.

public static RichTextImage FromBytes(int position, string mediaType, ReadOnlySpan<byte> data, double width, double height, RichTextImageVerticalAlignment verticalAlignment = RichTextImageVerticalAlignment.Baseline, string? alternativeText = null)

Parameters

position int

The U+FFFC document position.

mediaType string

The image media type.

data ReadOnlySpan<byte>

The encoded image payload.

width double

The requested width in points.

height double

The requested height in points.

verticalAlignment RichTextImageVerticalAlignment

Vertical inline alignment.

alternativeText string

Optional alternative text.

Returns

RichTextImage

An immutable inline-image value.

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(RichTextImage?, RichTextImage?)

public static bool operator ==(RichTextImage? left, RichTextImage? right)

Parameters

left RichTextImage
right RichTextImage

Returns

bool

operator !=(RichTextImage?, RichTextImage?)

public static bool operator !=(RichTextImage? left, RichTextImage? right)

Parameters

left RichTextImage
right RichTextImage

Returns

bool