| Description | Hierarchy | Fields | Methods | Properties |
type TGLBitmapFont_Abstract = class(TObject)
![]() |
fRowHeight: Integer; |
![]() |
procedure PrintAndMove(const s: string); virtual; abstract; |
![]() |
procedure PrintAndMoveFmt(const s: string; const args: array of const); |
![]() |
procedure Print(const s: string); |
![]() |
procedure PrintFmt(const s: string; const args: array of const); |
![]() |
function TextWidth(const s: string): integer; virtual; abstract; |
![]() |
function TextHeight(const s: string): integer; virtual; abstract; |
![]() |
function Descend: integer; virtual; |
![]() |
procedure BreakLines(const unbroken: string; broken: TStrings; maxLineWidth: integer); overload; |
![]() |
procedure BreakLines(unbroken, broken: TStrings; maxLineWidth: integer); overload; |
![]() |
procedure BreakLines(broken: TStrings; maxLineWidth: integer; firstToBreak: integer); overload; |
![]() |
function MaxTextWidth(slist: TStringList): integer; |
![]() |
procedure PrintStrings(strs: TStrings; BonusVerticalSpace: TGLint); overload; |
![]() |
procedure PrintStrings(const strs: array of string; BonusVerticalSpace: TGLint); overload; |
![]() |
procedure PrintStrings(strs: TStrings; BonusVerticalSpace: TGLint; RasterX0, RasterY0: integer); overload; |
![]() |
procedure PrintStrings(const strs: array of string; BonusVerticalSpace: TGLint; RasterX0, RasterY0: integer); overload; |
![]() |
function PrintBrokenString(const s: string; MaxLineWidth, RasterX0, RasterY0: Integer; RasterPositionsFirst: boolean; BonusVerticalSpace: Integer): Integer; |
![]() |
procedure PrintStringsBorderedRect(const strs: array of string; BonusVerticalSpace: TGLint; const InsideCol, BorderCol, TextCol: TVector4f; Stipple: PPolygonStipple; BoxPixelMargin: integer; const XPixelsRes, YPixelsRes: TGLfloat); overload; |
![]() |
procedure PrintStringsBorderedRect(strs: TStringList; BonusVerticalSpace: TGLint; const InsideCol, BorderCol, TextCol: TVector4f; Stipple: PPolygonStipple; BoxPixelMargin: integer; const XPixelsRes, YPixelsRes: TGLfloat); overload; |
![]() |
procedure Projection2DPrintStrings(X, Y: Integer; S: TStrings); overload; |
![]() |
procedure Projection2DPrintStrings(X, Y: Integer; S: string); overload; |
![]() |
property RowHeight: integer read fRowHeight; |
![]() |
fRowHeight: Integer; |
![]() |
procedure PrintAndMoveFmt(const s: string; const args: array of const); |
![]() |
procedure Print(const s: string); |
|
| |
![]() |
procedure PrintFmt(const s: string; const args: array of const); |
![]() |
function TextWidth(const s: string): integer; virtual; abstract; |
![]() |
function TextHeight(const s: string): integer; virtual; abstract; |
![]() |
function Descend: integer; virtual; |
|
| |
![]() |
procedure BreakLines(const unbroken: string; broken: TStrings; maxLineWidth: integer); overload; |
|
procedury BreakLines lamia string (w ktorym moga byc juz zlamane miejsca nl, zostana one poprawnie zauwazone) lub TStrings w taki sposob aby zadna linia nie miala TextWidth wiekszego niz maxLineWidth. Zawartosc unbroken nie jest w zaden sposob modyfikowana. Dotychczasowa zawartosc broken zostaje zachowana, nowe stringi zostana dopisane na koniec broken. firstToBreak mowi od ktorej linii zaczac lamanie. Stara sie polamac PRAWIE za wszelka cene. To znaczy np. stara sie lamac na bialych znakach, ale jezeli w stringu jest za dlugi wyraz bez bialych znakow to tez go zlamie. Jedyna sytuacja w ktorej wynikowy MaxLineWidth() dla tak polamanej listy nie bedzie spelniac ograniczenia to gdy jeden ze znakow uzytych w tekscie jest SAM wiekszy od narzuconego maxLineWidth. Wtedy po prostu nie da sie zlamac stringa zadowalajaco - ponizsze procedury zezwola wtedy na to aby ten jeden znak byl sam w linii i naruszal ograniczenie maxLineWidth. | |
![]() |
procedure BreakLines(unbroken, broken: TStrings; maxLineWidth: integer); overload; |
![]() |
procedure BreakLines(broken: TStrings; maxLineWidth: integer; firstToBreak: integer); overload; |
![]() |
function MaxTextWidth(slist: TStringList): integer; |
|
| |
![]() |
procedure PrintStrings(strs: TStrings; BonusVerticalSpace: TGLint); overload; |
|
Print strings from 0 to strs.count-1 using this font. glRasterPosi(RasterX0, RasterY0) is the position of the last string, each previous string will be RowHeight + BonusVerticalSpace higher, and so on (BonusVerticalSpace CAN be <0, only (RowHeight + BonusVerticalSpace) must be > 0). Wersje 2-arg uznaja RasterX0 = RasterY0 = 0. glRasterPos value will be ignored and then modified by this method. | |
![]() |
procedure PrintStrings(const strs: array of string; BonusVerticalSpace: TGLint); overload; |
![]() |
procedure PrintStrings(strs: TStrings; BonusVerticalSpace: TGLint; RasterX0, RasterY0: integer); overload; |
![]() |
procedure PrintStrings(const strs: array of string; BonusVerticalSpace: TGLint; RasterX0, RasterY0: integer); overload; |
![]() |
function PrintBrokenString(const s: string; MaxLineWidth, RasterX0, RasterY0: Integer; RasterPositionsFirst: boolean; BonusVerticalSpace: Integer): Integer; |
|
Lamie string s (uzywajac BreakLines, wiec oryginalne #13 i #10 w stringu sa uwzglednione i string jest dzielony tak zeby zadna jego linia nie miala wiecej niz MaxLineWidth). Potem wypisuje string. Jezeli RasterPositionsFirst to RasterX0, RasterY0 okresla pozycje pierwszego stringu na liscie, wpp. okresla pozycje ostatniego. Kolejne linie sa wypisywane kazda o RowHeight + BonusVerticalSpace nizej niz poprzednia (tak jak w PrintStrings, wymagane jest tylko zeby (RowHeight + BonusVerticalSpace) > 0). Funkcja zwraca liczbe linii jakie uzyskano po zlamaniu stringu s. W ten sposob mozesz np. obliczyc pozycje jaka miala na ekranie pierwsza / ostatnia ze zlamanych linii (to ktora z tych wartosci bylaby dla ciebie nieznana zalezy od tego ktora z tych wartosci podales, czyli od RasterPositionsFirst). | |
![]() |
procedure PrintStringsBorderedRect(const strs: array of string; BonusVerticalSpace: TGLint; const InsideCol, BorderCol, TextCol: TVector4f; Stipple: PPolygonStipple; BoxPixelMargin: integer; const XPixelsRes, YPixelsRes: TGLfloat); overload; |
|
rysuje strs kolorem StringCol i otacza je prostokatem ktory w srodku ma kolor InsideCol i stipple Stipple (lub nie ma stipple jesli Stipple = nil) a krawedz ma kolorem BorderCol. BoxPixelMargin to min odleglosc miedzy tekstem a krawedzia prostokata w pixelach. Robi to wszystko poprawnie zaczynajac od pozycji glRasterPos(0, 0), wzgledem aktualnej matrix (aktualne matrix to musi byc naturalnie MODELVIEW) i przy zalozeniu ze 1 jednostka OpenGL'a xowa to XPixelsRes piksli, a ykowa to YPixelsRes piksli. BonusVerticalSpace - jak w PrintStrings. RasterPos and curent color will be ignored and then modified by this proc, no other state is affected. Current matrix value is used and not modified. Requires one attrib stack and one matrix stack place. | |
![]() |
procedure PrintStringsBorderedRect(strs: TStringList; BonusVerticalSpace: TGLint; const InsideCol, BorderCol, TextCol: TVector4f; Stipple: PPolygonStipple; BoxPixelMargin: integer; const XPixelsRes, YPixelsRes: TGLfloat); overload; |
![]() |
procedure Projection2DPrintStrings(X, Y: Integer; S: TStrings); overload; |
|
Temporarily switch to 2d projection and print given string. This is a comfortable routine in demo programs that generally have 3d projection, and need to switch to 2d projection only to set raster position to print some text. This uses glProjectionPushPop2D, in 2d is sets modelview matrix to identity and raster pos to X, Y, and then prints text like PrintStrings(S). | |
![]() |
procedure Projection2DPrintStrings(X, Y: Integer; S: string); overload; |
![]() |
property RowHeight: integer read fRowHeight; |
|
co do | |