Class TBGLRenderedFont

Unit

Declaration

type TBGLRenderedFont = class(TBGLCustomFont, IBGLRenderedFont)

Description

Implementation of font rendering by using a bitmap cache

Hierarchy

Overview

Fields

Protected FRenderer: TBGRACustomFontRenderer;
Protected FRendererOwned: boolean;

Methods

Public constructor Create(ARenderer: TBGRACustomFontRenderer; ARendererOwned: boolean = true);
Public function TextHeight(const Text: UTF8String; AWidth: single): single; override;
Public function TextHeight(const Text: UTF8String): single; override;
Public function TextWidth(const Text: UTF8String): single; override;
Protected function CreateGlyph(AIdentifier: string): TRenderedGlyph; virtual;
Protected function GetClipped: boolean; override;
Protected function GetUseGradientColors: boolean; override;
Protected function GetWrappedLines(ATextUTF8: string; AWidth: single): TStringList;
Protected function LoadFromFile(AFilename: UTF8String): boolean; override;
Public procedure FreeMemory; override;
Public procedure SetGradientColors(ATopLeft, ATopRight, ABottomRight, ABottomLeft: TBGRAPixel); override;
Protected procedure CopyFontToRenderer; virtual;
Protected procedure DefaultWordBreakHandler(var ABefore, AAfter: string);
Protected procedure DiscardGlyphs; virtual;
Protected procedure DoTextOut(X, Y: Single; const Text : UTF8String; AColor: TBGRAPixel); overload; override;
Protected procedure DoTextOut(X, Y: Single; const Text : UTF8String; AColor: TBGRAPixel; AHorizontalAlign: TAlignment; AVerticalAlign: TTextLayout); overload; virtual;
Protected procedure DoTextRect(X, Y, Width, Height: Single; const Text : UTF8String; AColor: TBGRAPixel); override;
Protected procedure FreeMemoryOnDestroy; override;
Protected procedure SetClipped(AValue: boolean); override;
Protected procedure SetUseGradientColors(AValue: boolean); override;
Protected procedure SplitText(var ATextUTF8: string; AMaxWidth: single; out ARemainsUTF8: string);

Properties

Public property BackgroundColor: TBGRAPixel read GetBackgroundColor write SetBackgroundColor;
Public property Color: TBGRAPixel read GetColor write SetColor;
Public property EmHeight: integer read GetFontEmHeight write SetFontEmHeight;
Public property FullHeight: integer read GetFontFullHeight write SetFontFullHeight;
Public property Glyph[AIdentifier: string]: TRenderedGlyph read GetGlyph;
Public property HorizontalOverflow: single read GetHorizontalOverflow write SetHorizontalOverflow;
Public property Name: string read GetName write SetName;
Public property Quality: TBGRAFontQuality read GetQuality write SetQuality;
Public property Style: TFontStyles read GetStyle write SetStyle;
Public property VerticalOverflow: single read GetVerticalOverflow write SetVerticalOverflow;
Public property WordBreakHandler: TWordBreakHandler read FWordBreakHandler write FWordBreakHandler;

Description

Fields

Protected FRenderer: TBGRACustomFontRenderer;

This item has no description.

Protected FRendererOwned: boolean;

This item has no description.

Methods

Public constructor Create(ARenderer: TBGRACustomFontRenderer; ARendererOwned: boolean = true);

This item has no description.

Public function TextHeight(const Text: UTF8String; AWidth: single): single; override;

This item has no description.

Public function TextHeight(const Text: UTF8String): single; override;

This item has no description.

Public function TextWidth(const Text: UTF8String): single; override;

This item has no description.

Protected function CreateGlyph(AIdentifier: string): TRenderedGlyph; virtual;

This item has no description.

Protected function GetClipped: boolean; override;

This item has no description.

Protected function GetUseGradientColors: boolean; override;

This item has no description.

Protected function GetWrappedLines(ATextUTF8: string; AWidth: single): TStringList;

This item has no description.

Protected function LoadFromFile(AFilename: UTF8String): boolean; override;

This item has no description.

Public procedure FreeMemory; override;

This item has no description.

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

This item has no description.

Protected procedure CopyFontToRenderer; virtual;

This item has no description.

Protected procedure DefaultWordBreakHandler(var ABefore, AAfter: string);

This item has no description.

Protected procedure DiscardGlyphs; virtual;

This item has no description.

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

This item has no description.

Protected procedure DoTextOut(X, Y: Single; const Text : UTF8String; AColor: TBGRAPixel; AHorizontalAlign: TAlignment; AVerticalAlign: TTextLayout); overload; virtual;

This item has no description.

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

This item has no description.

Protected procedure FreeMemoryOnDestroy; override;

This item has no description.

Protected procedure SetClipped(AValue: boolean); override;

This item has no description.

Protected procedure SetUseGradientColors(AValue: boolean); override;

This item has no description.

Protected procedure SplitText(var ATextUTF8: string; AMaxWidth: single; out ARemainsUTF8: string);

This item has no description.

Properties

Public property BackgroundColor: TBGRAPixel read GetBackgroundColor write SetBackgroundColor;

This item has no description.

Public property Color: TBGRAPixel read GetColor write SetColor;

This item has no description.

Public property EmHeight: integer read GetFontEmHeight write SetFontEmHeight;

This item has no description.

Public property FullHeight: integer read GetFontFullHeight write SetFontFullHeight;

This item has no description.

Public property Glyph[AIdentifier: string]: TRenderedGlyph read GetGlyph;

This item has no description.

Public property HorizontalOverflow: single read GetHorizontalOverflow write SetHorizontalOverflow;

This item has no description.

Public property Name: string read GetName write SetName;

This item has no description.

Public property Quality: TBGRAFontQuality read GetQuality write SetQuality;

This item has no description.

Public property Style: TFontStyles read GetStyle write SetStyle;

This item has no description.

Public property VerticalOverflow: single read GetVerticalOverflow write SetVerticalOverflow;

This item has no description.

Public property WordBreakHandler: TWordBreakHandler read FWordBreakHandler write FWordBreakHandler;

This item has no description.