Skip to content

TBLGlyphRunIterator

A helper to iterate over a TBLGlyphRun.

Takes into consideration glyph-id advance and glyph-offset advance.

Example:

  procedure InspectGlyphRun(const AGlyphRun: TBLGlyphRun);
  begin
    var It := TBLGlyphRunIterator.Create(AGlyphRun);
    if (It.HasPlacement) then
    begin
      while (not It.AtEnd) do
      begin
        var GlyphId := It.GlyphId;
        var Offset := It.Placement<tblpoint>;

        // Do something with `GlyphId` and `Offset`.

        It.Advance;
      end;
    end
    else
    begin
      while (not It.AtEnd) do
      begin
        var GlyphId := It.GlyphId;

        // Do something with `GlyphId`.

        It.Advance;
      end;
    end;
  end;
```</tblpoint>

## Definition

Unit: [Blend2D](../index.md)

``` delphi
type TBLGlyphRunIterator = record ... end;

Properties

Name Description
GlyphId
HasPlacement
IsEmpty
PlacementAsGlyphPlacement
PlacementAsPoint

Constructors

Name Description
Create
Initialize

Methods

Name Description
Advance
AtEnd
Placement<T>
Reset(TBLGlyphRun)
Reset

Property Descriptions

GlyphId

property GlyphId: TBLGlyphId read GetGlyphId

Type: TBLGlyphId


HasPlacement

property HasPlacement: Boolean read GetHasPlacement

Type: Boolean


IsEmpty

property IsEmpty: Boolean read GetIsEmpty

Type: Boolean


PlacementAsGlyphPlacement

property PlacementAsGlyphPlacement: TBLGlyphPlacement read GetPlacementAsGlyphPlacement

Type: TBLGlyphPlacement


PlacementAsPoint

property PlacementAsPoint: TBLPoint read GetPlacementAsPoint

Type: TBLPoint


Constructor Descriptions

Create

constructor Create(const AGlyphRun: TBLGlyphRun)

Parameters

AGlyphRun: TBLGlyphRun


Initialize

constructor Initialize(out ADest: TBLGlyphRunIterator)

Parameters

ADest: TBLGlyphRunIterator


Method Descriptions

Advance

procedure Advance; inline


AtEnd

function AtEnd: Boolean; inline

Returns

Boolean


Placement<T>

function Placement<T>: T; inline

Type Parameters

T:

Returns

T


Reset(TBLGlyphRun)

procedure Reset(const AGlyphRun: TBLGlyphRun); overload; inline

Parameters

AGlyphRun: TBLGlyphRun


Reset

procedure Reset; overload; inline