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
Crop
Gets crop amounts in points.
public RichTextImageCrop Crop { get; init; }
Property Value
Data
Gets the immutable encoded image payload.
public ImmutableArray<byte> Data { get; init; }
Property Value
Height
Gets the requested height in points.
public double Height { get; init; }
Property Value
MediaType
Gets the image media type.
public string MediaType { get; init; }
Property Value
Position
Gets the U+FFFC position occupied by the image.
public int Position { get; init; }
Property Value
Rotation
Gets clockwise rotation in degrees.
public double Rotation { get; init; }
Property Value
Source
Gets an optional source identifier or URI.
public string? Source { get; init; }
Property Value
VerticalAlignment
Gets vertical inline alignment.
public RichTextImageVerticalAlignment VerticalAlignment { get; init; }
Property Value
Width
Gets the requested width in points.
public double Width { get; init; }
Property Value
Methods
Equals(RichTextImage?)
public bool Equals(RichTextImage? other)
Parameters
otherRichTextImage
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
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
positionintThe U+FFFC document position.
mediaTypestringThe image media type.
dataReadOnlySpan<byte>The encoded image payload.
widthdoubleThe requested width in points.
heightdoubleThe requested height in points.
verticalAlignmentRichTextImageVerticalAlignmentVertical inline alignment.
alternativeTextstringOptional alternative text.
Returns
- RichTextImage
An immutable inline-image value.
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(RichTextImage?, RichTextImage?)
public static bool operator ==(RichTextImage? left, RichTextImage? right)
Parameters
leftRichTextImagerightRichTextImage
Returns
operator !=(RichTextImage?, RichTextImage?)
public static bool operator !=(RichTextImage? left, RichTextImage? right)
Parameters
leftRichTextImagerightRichTextImage