Skip to main content

ShapedBuffer Class

Definition​

Assembly:Avalonia.Base
Package:Avalonia
public class ShapedBuffer

Inheritance: object -> ShapedBuffer

Implements: IEnumerable<GlyphInfo>, IReadOnlyCollection<GlyphInfo>, IReadOnlyList<GlyphInfo>, IEnumerable, IDisposable

Constructors​

NameDescription
ShapedBufferNo summary available.

ShapedBuffer Constructor​

public ShapedBuffer(ReadOnlyMemory<char> text, int bufferLength, Avalonia.Media.GlyphTypeface glyphTypeface, double fontRenderingEmSize, sbyte bidiLevel)

Parameters​

text ReadOnlyMemory<char>

bufferLength int

glyphTypeface Avalonia.Media.GlyphTypeface

fontRenderingEmSize double

bidiLevel sbyte

Methods​

NameDescription
DisposeNo summary available.
GetEnumeratorNo summary available.
SplitSplits the Avalonia.Media.TextFormatting.TextRun at specified length.

Dispose Method​

public void Dispose()

GetEnumerator Method​

public System.Collections.Generic.IEnumerator<Avalonia.Media.TextFormatting.GlyphInfo> GetEnumerator()

Returns​

System.Collections.Generic.IEnumerator<Avalonia.Media.TextFormatting.GlyphInfo>

Split Method​

Splits the Avalonia.Media.TextFormatting.TextRun at specified length.

public Avalonia.Media.TextFormatting.SplitResult<T><Avalonia.Media.TextFormatting.ShapedBuffer> Split(int textLength)

Parameters​

textLength int

The text length.

Returns​

Avalonia.Media.TextFormatting.SplitResult<T><Avalonia.Media.TextFormatting.ShapedBuffer>

The split result.

Properties​

NameDescription
BidiLevelThe buffer's bidi level.
FontRenderingEmSizeThe buffers font rendering em size.
GlyphIndicesContiguous view of the glyph indices for this buffer, kept in sync with Avalonia.Media.TextFormatting.ShapedBuffer.GlyphInfos by the indexer setter. Consumers needing a ReadOnlySpan<T> of glyph IDs (e.g. for GlyphTypeface.TryGetGlyphBounds or SKFont.GetGlyphWidths) can use this directly without allocating a parallel array.
GlyphTypefaceThe buffer's glyph typeface.
IsLeftToRightThe buffer's reading direction.
ItemNo summary available.
LengthThe buffer's length.
TextThe text that is represended by this buffer.

BidiLevel Property​

The buffer's bidi level.

public sbyte BidiLevel { get; set; }

FontRenderingEmSize Property​

The buffers font rendering em size.

public double FontRenderingEmSize { get; set; }

GlyphIndices Property​

Contiguous view of the glyph indices for this buffer, kept in sync with Avalonia.Media.TextFormatting.ShapedBuffer.GlyphInfos by the indexer setter. Consumers needing a ReadOnlySpan<T> of glyph IDs (e.g. for GlyphTypeface.TryGetGlyphBounds or SKFont.GetGlyphWidths) can use this directly without allocating a parallel array.

public ReadOnlySpan<ushort> GlyphIndices { get; set; }

GlyphTypeface Property​

The buffer's glyph typeface.

public Avalonia.Media.GlyphTypeface GlyphTypeface { get; set; }

IsLeftToRight Property​

The buffer's reading direction.

public bool IsLeftToRight { get; set; }

Item Property​

public Avalonia.Media.TextFormatting.GlyphInfo Item { get; set; }

Length Property​

The buffer's length.

public int Length { get; set; }

Text Property​

The text that is represended by this buffer.

public ReadOnlyMemory<char> Text { get; set; }