Class TBGLCustomFont

Unit

Declaration

type TBGLCustomFont = class(TInterfacedObject, IBGLFont)

Description

Abstract class for a font drawn on OpenGL canvas

Hierarchy

Overview

Fields

Protected FFlags: LongWord;
Protected FHorizontalAlign: TAlignment;
Protected FJustify: boolean;
Protected FPadding: TRectF;
Protected FScale: single;
Protected FStepX: single;
Protected FVerticalAlign: TTextLayout;

Methods

Public constructor Create(AFilename: UTF8String);
Public destructor Destroy; override;
Public function TextHeight(const Text: UTF8String; AWidth: single): single; overload; virtual; abstract;
Public function TextHeight(const Text: UTF8String): single; overload; virtual; abstract;
Public function TextWidth(const Text: UTF8String): single; virtual; abstract;
Protected function GetClipped: boolean; virtual; abstract;
Protected function GetDefaultColor: TBGRAPixel; virtual;
Protected function GetHorizontalAlign: TAlignment; virtual;
Protected function GetJustify: boolean; virtual;
Protected function GetPadding: TRectF;
Protected function GetScale: single; virtual;
Protected function GetStepX: single; virtual;
Protected function GetUseGradientColors: boolean; virtual; abstract;
Protected function GetVerticalAlign: TTextLayout; virtual;
Protected function LoadFromFile(AFilename: UTF8String): boolean; virtual; abstract;
Public procedure FreeMemory; virtual;
Public procedure SetGradientColors(ATopLeft, ATopRight, ABottomRight, ABottomLeft: TBGRAPixel); virtual; abstract;
Public procedure TextOut(X, Y: Single; const Text : UTF8String); overload;
Public procedure TextOut(X, Y: Single; const Text : UTF8String; AColor: TBGRAPixel); overload;
Public procedure TextOut(X, Y: Single; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;
Public procedure TextOut(X, Y: Single; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout = tlTop); overload;
Public procedure TextRect(ARect: TRect; const Text : UTF8String; AVertAlign: TTextLayout); overload;
Public procedure TextRect(ARect: TRect; const Text : UTF8String; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;
Public procedure TextRect(ARect: TRect; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout = tlTop); overload;
Public procedure TextRect(ARect: TRect; const Text : UTF8String; AColor: TBGRAPixel); overload;
Public procedure TextRect(X, Y, Width, Height: Single; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout = tlTop); overload;
Public procedure TextRect(X, Y, Width, Height: Single; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;
Public procedure TextRect(ARect: TRect; const Text : UTF8String); overload;
Public procedure TextRect(ARect: TRectF; const Text : UTF8String; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;
Public procedure TextRect(ARect: TRectF; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout = tlTop); overload;
Public procedure TextRect(ARect: TRectF; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;
Public procedure TextRect(ARect: TRectF; const Text : UTF8String; AVertAlign: TTextLayout); overload;
Public procedure TextRect(ARect: TRect; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;
Public procedure TextRect(ARect: TRectF; const Text : UTF8String); overload;
Public procedure TextRect(ARect: TRectF; const Text : UTF8String; AColor: TBGRAPixel); overload;
Public procedure TextRect(X, Y, Width, Height: Single; const Text : UTF8String; AColor: TBGRAPixel); overload;
Public procedure TextRect(X, Y, Width, Height: Single; const Text : UTF8String); overload;
Public procedure TextRect(X, Y, Width, Height: Single; const Text : UTF8String; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;
Public procedure TextRect(X, Y, Width, Height: Single; const Text : UTF8String; AVertAlign: TTextLayout); overload;
Protected procedure DoTextOut(X, Y: Single; const Text : UTF8String; AColor: TBGRAPixel); virtual; abstract;
Protected procedure DoTextRect(X, Y, Width, Height: Single; const Text : UTF8String; AColor: TBGRAPixel); virtual; abstract;
Protected procedure FreeMemoryOnDestroy; virtual;
Protected procedure Init; virtual;
Protected procedure SetClipped(AValue: boolean); virtual; abstract;
Protected procedure SetHorizontalAlign(AValue: TAlignment); virtual;
Protected procedure SetJustify(AValue: boolean); virtual;
Protected procedure SetPadding(AValue: TRectF); virtual;
Protected procedure SetScale(AValue: single); virtual;
Protected procedure SetStepX(AValue: single); virtual;
Protected procedure SetUseGradientColors(AValue: boolean); virtual; abstract;
Protected procedure SetVerticalAlign(AValue: TTextLayout); virtual;
Protected procedure SwapRectIfNeeded(var ARect: TRect); overload;
Protected procedure SwapRectIfNeeded(var ARect: TRectF); overload;

Properties

Public property Clipped: boolean read GetClipped write SetClipped;
Public property GradientColors: boolean read GetUseGradientColors write SetUseGradientColors;
Public property HorizontalAlign: TAlignment read GetHorizontalAlign write SetHorizontalAlign;
Public property Justify: boolean read GetJustify write SetJustify;
Public property Padding: TRectF read GetPadding write SetPadding;
Public property Scale: single read GetScale write SetScale;
Public property StepX: single read GetStepX write SetStepX;
Public property VerticalAlign: TTextLayout read GetVerticalAlign write SetVerticalAlign;

Description

Fields

Protected FFlags: LongWord;

This item has no description.

Protected FHorizontalAlign: TAlignment;

This item has no description.

Protected FJustify: boolean;

This item has no description.

Protected FPadding: TRectF;

This item has no description.

Protected FScale: single;

This item has no description.

Protected FStepX: single;

This item has no description.

Protected FVerticalAlign: TTextLayout;

This item has no description.

Methods

Public constructor Create(AFilename: UTF8String);

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function TextHeight(const Text: UTF8String; AWidth: single): single; overload; virtual; abstract;

This item has no description.

Public function TextHeight(const Text: UTF8String): single; overload; virtual; abstract;

This item has no description.

Public function TextWidth(const Text: UTF8String): single; virtual; abstract;

This item has no description.

Protected function GetClipped: boolean; virtual; abstract;

This item has no description.

Protected function GetDefaultColor: TBGRAPixel; virtual;

This item has no description.

Protected function GetHorizontalAlign: TAlignment; virtual;

This item has no description.

Protected function GetJustify: boolean; virtual;

This item has no description.

Protected function GetPadding: TRectF;

This item has no description.

Protected function GetScale: single; virtual;

This item has no description.

Protected function GetStepX: single; virtual;

This item has no description.

Protected function GetUseGradientColors: boolean; virtual; abstract;

This item has no description.

Protected function GetVerticalAlign: TTextLayout; virtual;

This item has no description.

Protected function LoadFromFile(AFilename: UTF8String): boolean; virtual; abstract;

This item has no description.

Public procedure FreeMemory; virtual;

This item has no description.

Public procedure SetGradientColors(ATopLeft, ATopRight, ABottomRight, ABottomLeft: TBGRAPixel); virtual; abstract;

This item has no description.

Public procedure TextOut(X, Y: Single; const Text : UTF8String); overload;

This item has no description.

Public procedure TextOut(X, Y: Single; const Text : UTF8String; AColor: TBGRAPixel); overload;

This item has no description.

Public procedure TextOut(X, Y: Single; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;

This item has no description.

Public procedure TextOut(X, Y: Single; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout = tlTop); overload;

This item has no description.

Public procedure TextRect(ARect: TRect; const Text : UTF8String; AVertAlign: TTextLayout); overload;

This item has no description.

Public procedure TextRect(ARect: TRect; const Text : UTF8String; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;

This item has no description.

Public procedure TextRect(ARect: TRect; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout = tlTop); overload;

This item has no description.

Public procedure TextRect(ARect: TRect; const Text : UTF8String; AColor: TBGRAPixel); overload;

This item has no description.

Public procedure TextRect(X, Y, Width, Height: Single; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout = tlTop); overload;

This item has no description.

Public procedure TextRect(X, Y, Width, Height: Single; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;

This item has no description.

Public procedure TextRect(ARect: TRect; const Text : UTF8String); overload;

This item has no description.

Public procedure TextRect(ARect: TRectF; const Text : UTF8String; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;

This item has no description.

Public procedure TextRect(ARect: TRectF; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout = tlTop); overload;

This item has no description.

Public procedure TextRect(ARect: TRectF; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;

This item has no description.

Public procedure TextRect(ARect: TRectF; const Text : UTF8String; AVertAlign: TTextLayout); overload;

This item has no description.

Public procedure TextRect(ARect: TRect; const Text : UTF8String; AHorizAlign: TAlignment; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;

This item has no description.

Public procedure TextRect(ARect: TRectF; const Text : UTF8String); overload;

This item has no description.

Public procedure TextRect(ARect: TRectF; const Text : UTF8String; AColor: TBGRAPixel); overload;

This item has no description.

Public procedure TextRect(X, Y, Width, Height: Single; const Text : UTF8String; AColor: TBGRAPixel); overload;

This item has no description.

Public procedure TextRect(X, Y, Width, Height: Single; const Text : UTF8String); overload;

This item has no description.

Public procedure TextRect(X, Y, Width, Height: Single; const Text : UTF8String; AVertAlign: TTextLayout; AColor: TBGRAPixel); overload;

This item has no description.

Public procedure TextRect(X, Y, Width, Height: Single; const Text : UTF8String; AVertAlign: TTextLayout); overload;

This item has no description.

Protected procedure DoTextOut(X, Y: Single; const Text : UTF8String; AColor: TBGRAPixel); virtual; abstract;

This item has no description.

Protected procedure DoTextRect(X, Y, Width, Height: Single; const Text : UTF8String; AColor: TBGRAPixel); virtual; abstract;

This item has no description.

Protected procedure FreeMemoryOnDestroy; virtual;

This item has no description.

Protected procedure Init; virtual;

This item has no description.

Protected procedure SetClipped(AValue: boolean); virtual; abstract;

This item has no description.

Protected procedure SetHorizontalAlign(AValue: TAlignment); virtual;

This item has no description.

Protected procedure SetJustify(AValue: boolean); virtual;

This item has no description.

Protected procedure SetPadding(AValue: TRectF); virtual;

This item has no description.

Protected procedure SetScale(AValue: single); virtual;

This item has no description.

Protected procedure SetStepX(AValue: single); virtual;

This item has no description.

Protected procedure SetUseGradientColors(AValue: boolean); virtual; abstract;

This item has no description.

Protected procedure SetVerticalAlign(AValue: TTextLayout); virtual;

This item has no description.

Protected procedure SwapRectIfNeeded(var ARect: TRect); overload;

This item has no description.

Protected procedure SwapRectIfNeeded(var ARect: TRectF); overload;

This item has no description.

Properties

Public property Clipped: boolean read GetClipped write SetClipped;

This item has no description.

Public property GradientColors: boolean read GetUseGradientColors write SetUseGradientColors;

This item has no description.

Public property HorizontalAlign: TAlignment read GetHorizontalAlign write SetHorizontalAlign;

This item has no description.

Public property Justify: boolean read GetJustify write SetJustify;

This item has no description.

Public property Padding: TRectF read GetPadding write SetPadding;

This item has no description.

Public property Scale: single read GetScale write SetScale;

This item has no description.

Public property StepX: single read GetStepX write SetStepX;

This item has no description.

Public property VerticalAlign: TTextLayout read GetVerticalAlign write SetVerticalAlign;

This item has no description.