Update of /cvsroot/pythianproject/Prototypes/GLCanvas
In directory usw-pr-cvs1:/tmp/cvs-serv10022/GLCanvas
Modified Files:
QuadTextUnit.pas glCanvas.pas
Log Message:
antialiased text, resized SLE, added vglConversation.pas -mike
Index: QuadTextUnit.pas
===================================================================
RCS file: /cvsroot/pythianproject/Prototypes/GLCanvas/QuadTextUnit.pas,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** QuadTextUnit.pas 2000/12/13 22:34:11 1.7
--- QuadTextUnit.pas 2001/01/12 21:10:35 1.8
***************
*** 61,71 ****
15);
VINERHAND_WIDTHS :TQuadTextWidthsArray = (
! 14, 11, 10, 12, 10, 10, 8, 13, 7, 8, 14, 11,
! 20, 20, 20, 20, 20, 20, 20, 11, 10, 10, 16, 10,
! 10, 10, 8, 8, 8, 8, 8, 5, 8, 8, 2, 3,
! 8, 2, 12, 8, 8, 8, 8, 5, 8, 5, 8, 8,
! 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
! 8, 8, 4, 6, 7, 2, 2, 3, 3, 2, 13, 14,
! 12, 5, 7, 2, 8, 8, 2, 2, 4, 4, 12, 15,
15);
--- 61,71 ----
15);
VINERHAND_WIDTHS :TQuadTextWidthsArray = (
! 14, 11, 12, 12, 10, 10, 8, 13, 7, 8, 14, 11,
! 14, 14, 8, 10, 14, 11, 10, 8, 10, 10, 16, 10,
! 10, 10, 8, 8, 7, 8, 6, 5, 8, 8, 2, 3,
! 8, 2, 12, 8, 7, 8, 8, 5, 8, 5, 8, 8,
! 8, 8, 8, 8, 6, 8, 8, 8, 8, 8, 8, 8,
! 8, 8, 4, 6, 7, 2, 2, 3, 3, 2, 13, 14,
! 12, 5, 7, 2, 8, 8, 2, 2, 4, 4, 12, 15,
15);
***************
*** 202,206 ****
--- 202,217 ----
glTranslatef(QT.TexWidths[o]+QT.GridCharSpacing,0,0)
end else // translate for space character
+ begin
+ if underline then
+ begin
+ glDisable(GL_TEXTURE_2D);
+ glBegin(GL_LINES);
+ glVertex2i(0,QT.GridSquareHeight);
+ glVertex2i(QT.SpaceWidth,QT.GridSquareHeight);
+ glEnd;
+ glEnable(GL_TEXTURE_2D);
+ end;
glTranslatef(QT.SpaceWidth,0,0);
+ end;
end;
inc(a);
Index: glCanvas.pas
===================================================================
RCS file: /cvsroot/pythianproject/Prototypes/GLCanvas/glCanvas.pas,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** glCanvas.pas 2001/01/02 21:46:20 1.18
--- glCanvas.pas 2001/01/12 21:10:35 1.19
***************
*** 196,199 ****
--- 196,200 ----
function GetWidth(index: integer): integer;
class procedure FreeRegisteredFonts;
+ function GetHeight: integer;
public
***************
*** 207,210 ****
--- 208,212 ----
property Text:string read GetText write SetText;
property Width[index:integer]:integer read GetWidth;
+ property Height :integer read GetHeight;
property Red: byte read FRed write SetRed;
***************
*** 842,846 ****
--- 844,850 ----
if not assigned(f.Texture) then
begin
+ // WARNING: alpha mirroring is experimental! -mike
FTexture := TTexture.Create;
+ FTexture.MirrorAlpha := true;
FTexture.LoadFromFile(FontsDirectory + f.FileName);
f.Texture := FTexture;
***************
*** 1172,1175 ****
--- 1176,1184 ----
end;
+ function TGLText.GetHeight: integer;
+ begin
+ result := 20*Lines.Count;
+ end;
+
{ TGLTexturedFont }
***************
*** 1195,1199 ****
TGLText.RegisterFont('Arial','Arial Grid.bmp',ARIAL_WIDTHS);
TGLText.RegisterFont('Courier New','CourierNew Grid.bmp',COURIERNEW_WIDTHS);
! TGLText.RegisterFont('VinerHand ITC','VinerHand ITC Grid.bmp',VINERHAND_WIDTHS);
finalization
--- 1204,1208 ----
TGLText.RegisterFont('Arial','Arial Grid.bmp',ARIAL_WIDTHS);
TGLText.RegisterFont('Courier New','CourierNew Grid.bmp',COURIERNEW_WIDTHS);
! TGLText.RegisterFont('VinerHand ITC','VinerHand ITC Grid antialiased.bmp',VINERHAND_WIDTHS);
finalization
|