mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-17 02:36:07 +02:00
LazFreeType: Move OnRenderText event to TFreeTypeRenderableFont. Patch by "circular".
git-svn-id: trunk@40134 -
This commit is contained in:
parent
f62e7a3b8d
commit
4694ce68f5
@ -139,11 +139,14 @@ type
|
|||||||
|
|
||||||
{***************************** Rendering classes *********************************}
|
{***************************** Rendering classes *********************************}
|
||||||
|
|
||||||
|
TOnRenderTextHandler = procedure(AText: string; x,y: single) of object;
|
||||||
|
|
||||||
{ TFreeTypeRenderableFont }
|
{ TFreeTypeRenderableFont }
|
||||||
|
|
||||||
TFreeTypeRenderableFont = class
|
TFreeTypeRenderableFont = class
|
||||||
protected
|
protected
|
||||||
FWordBreakHandler: TFreeTypeWordBreakHandler;
|
FWordBreakHandler: TFreeTypeWordBreakHandler;
|
||||||
|
FOnRenderText: TOnRenderTextHandler;
|
||||||
function GetClearType: boolean; virtual; abstract;
|
function GetClearType: boolean; virtual; abstract;
|
||||||
procedure SetClearType(const AValue: boolean); virtual; abstract;
|
procedure SetClearType(const AValue: boolean); virtual; abstract;
|
||||||
function GetLineFullHeight: single; virtual; abstract;
|
function GetLineFullHeight: single; virtual; abstract;
|
||||||
@ -167,6 +170,7 @@ type
|
|||||||
property LineFullHeight: single read GetLineFullHeight;
|
property LineFullHeight: single read GetLineFullHeight;
|
||||||
property Hinted: boolean read GetHinted write SetHinted;
|
property Hinted: boolean read GetHinted write SetHinted;
|
||||||
property OnWordBreak: TFreeTypeWordBreakHandler read FWordBreakHandler write FWordBreakHandler;
|
property OnWordBreak: TFreeTypeWordBreakHandler read FWordBreakHandler write FWordBreakHandler;
|
||||||
|
property OnRenderText: TOnRenderTextHandler read FOnRenderText write FOnRenderText;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TFreeTypeDrawer }
|
{ TFreeTypeDrawer }
|
||||||
@ -182,8 +186,6 @@ type
|
|||||||
|
|
||||||
{********************************* Font implementation **********************************}
|
{********************************* Font implementation **********************************}
|
||||||
|
|
||||||
TOnRenderTextHandler = procedure(AText: string; x,y: single) of object;
|
|
||||||
|
|
||||||
{ TFreeTypeFont }
|
{ TFreeTypeFont }
|
||||||
|
|
||||||
TFreeTypeFont = class(TFreeTypeRenderableFont)
|
TFreeTypeFont = class(TFreeTypeRenderableFont)
|
||||||
@ -196,7 +198,6 @@ type
|
|||||||
FClearType: boolean;
|
FClearType: boolean;
|
||||||
FNamesArray: array of string;
|
FNamesArray: array of string;
|
||||||
FCollection: TCustomFreeTypeFontCollection;
|
FCollection: TCustomFreeTypeFontCollection;
|
||||||
FOnRenderText: TOnRenderTextHandler;
|
|
||||||
function FindGlyphNode(Index: Integer): TAvgLvlTreeNode;
|
function FindGlyphNode(Index: Integer): TAvgLvlTreeNode;
|
||||||
function GetCharIndex(AChar: integer): integer;
|
function GetCharIndex(AChar: integer): integer;
|
||||||
function GetDPI: integer;
|
function GetDPI: integer;
|
||||||
@ -275,7 +276,6 @@ type
|
|||||||
property Collection: TCustomFreeTypeFontCollection read GetCollection write FCollection;
|
property Collection: TCustomFreeTypeFontCollection read GetCollection write FCollection;
|
||||||
property StyleAsString: string read FStyleStr write SetStyleAsString;
|
property StyleAsString: string read FStyleStr write SetStyleAsString;
|
||||||
property Style: TFreeTypeStyles read GetFreeTypeStyles write SetFreeTypeStyles;
|
property Style: TFreeTypeStyles read GetFreeTypeStyles write SetFreeTypeStyles;
|
||||||
property OnRenderText: TOnRenderTextHandler read FOnRenderText write FOnRenderText;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TFreeTypeGlyph }
|
{ TFreeTypeGlyph }
|
||||||
|
Loading…
Reference in New Issue
Block a user