From: Michael H. <mh...@us...> - 2000-11-18 19:45:01
|
Update of /cvsroot/pythianproject/Prototypes/GLCanvas In directory slayer.i.sourceforge.net:/tmp/cvs-serv2112 Modified Files: MyDraw.pas glCanvas.pas glfD.pas Log Message: now supports bitmapped text! Index: MyDraw.pas =================================================================== RCS file: /cvsroot/pythianproject/Prototypes/GLCanvas/MyDraw.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** MyDraw.pas 2000/11/11 17:57:01 1.3 --- MyDraw.pas 2000/11/18 19:44:20 1.4 *************** *** 31,34 **** --- 31,35 ---- InspectorGadget :TGLBitmap; SampleText :TGLText; + QuadTextSample :TGLText; // You need to implement these three procedures *************** *** 48,56 **** InspectorGadget := TGLBitmap.Create; InspectorGadget.LoadFromBitmap('gadgetcollage.bmp'); ! SampleText := TGLText.Create('Hello World', 'arial1.glf', GLCANVAS_TEXT_GLF); Sampletext.Lines.Add('Long live the Project'); ! SampleText.Lines.Add('These are lines of text drawn by GLF'); ! SampleText.Lines.Add('----------------------------'); SampleText.Lines.Add('ABCDEFGHIJKLMNOPQRSTUVWXYZ'); SampleText.Lines.Add('1234567890'); --- 49,63 ---- InspectorGadget := TGLBitmap.Create; InspectorGadget.LoadFromBitmap('gadgetcollage.bmp'); ! SampleText := TGLText.Create('Hello World', 'Arial', GLCANVAS_TEXT_GLF, GLC_DEFAULT_FONT_DATA); ! SampleText.Precache := true; Sampletext.Lines.Add('Long live the Project'); ! SampleText.Lines.Add('These are lines of text drawn by the GLCanvas in GLF mode'); ! ! QuadTextSample := TGLText.Create('This is a sample of QuadText drawing.','Arial',GLCANVAS_TEXT_QUADTEXT,GLC_DEFAULT_FONT_DATA); ! QuadTextSample.Lines.Add('Compare to the GLF drawing and see which is better at small sizes.'); ! QuadTextSample.SetColor(clGreen); ! ! {SampleText.Lines.Add('----------------------------'); SampleText.Lines.Add('ABCDEFGHIJKLMNOPQRSTUVWXYZ'); SampleText.Lines.Add('1234567890'); *************** *** 76,80 **** SampleText.Lines.Add('i just want lots of text dwtasdgfdhfdhadfhfdafhfdh'); SampleText.Lines.Add('ajjjjjjfdkajskdfjdkjalksertujireooeiaudklfakjgdkas'); ! SampleText.Lines.Add('kfldqpptioreptQUITRJAKSjkdlsakjdbtathylayklt=-29'); SampleText.SetColor(clYellow); --- 83,87 ---- SampleText.Lines.Add('i just want lots of text dwtasdgfdhfdhadfhfdafhfdh'); SampleText.Lines.Add('ajjjjjjfdkajskdfjdkjalksertujireooeiaudklfakjgdkas'); ! SampleText.Lines.Add('kfldqpptioreptQUITRJAKSjkdlsakjdbtathylayklt=-29');} SampleText.SetColor(clYellow); *************** *** 87,90 **** --- 94,98 ---- InspectorGadget.Free; SampleText.Free; + QuadTextSample.Free; GLC.Free; end; *************** *** 102,113 **** GLC.CanvasSetup; ! glClearColor(0.2,0.2,1.0,1.0); glClear(GL_DEPTH_BUFFER_BIT or GL_COLOR_BUFFER_BIT); // this draws the GL bitmap object at these coordinates ! GLC.DrawBitmap(0,0,InspectorGadget); // this draws the text object ! GLC.DrawText(1,1,SampleText); end; --- 110,123 ---- GLC.CanvasSetup; ! glClearColor(0.0,0.0,0.0,1.0); glClear(GL_DEPTH_BUFFER_BIT or GL_COLOR_BUFFER_BIT); // this draws the GL bitmap object at these coordinates ! GLC.DrawBitmap(20,30,InspectorGadget); // this draws the text object ! GLC.DrawText(25,400,QuadTextSample); ! GLC.DrawText(25,200,SampleText); ! end; Index: glCanvas.pas =================================================================== RCS file: /cvsroot/pythianproject/Prototypes/GLCanvas/glCanvas.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** glCanvas.pas 2000/11/11 17:57:01 1.3 --- glCanvas.pas 2000/11/18 19:44:20 1.4 *************** *** 34,56 **** To do- - FIX WIERD BUG: if y is <= 10 when drawing text total freezeup occurs Fix text caching (display lists) - appears to have no effect on speed :( ! Fix GL text color bug ! Add GLF bitmap fonts code ! Support textured fonts? (mike's code) Add shapes code Fixed: ! Color bug all better } interface ! uses OpenGL, SysUtils, Graphics, glfD, Classes; const GLCANVAS_TEXT_GLF = 1; type // we use this to store the pixel data from a bitmap TPixelData = TByteArray; --- 34,97 ---- To do- Fix text caching (display lists) - appears to have no effect on speed :( ! Add GLF bitmap fonts code - later Add shapes code + QuadText fonts - cell widths are specified in a different part of the + program to the rest of the data. messy. fix it. + Fixed: ! Color bug all better (darryl) ! ! Notes: ! To add a new QuadText font ! ! 1) Create the bitmap grid ! 2) Add the widths array to the QuadTextUnit.pas file ! 3) Add definition data to the array below ! 4) Add a link in the MatchFontWidths function. } interface ! uses OpenGL, SysUtils, Graphics, glfD, Classes, QuadTextUnit, Textures; const GLCANVAS_TEXT_GLF = 1; + GLCANVAS_TEXT_QUADTEXT = 2; + GLC_MAXFONTS = 4; + type + EGLCanvasException = class(Exception) end; + + TGLCanvasFontData = record + Name, FileName:string; + FontType :integer; + end; + + TArrayOfGLCanvasFontData = array[1..GLC_MAXFONTS] of TGLCanvasFontData; + const + GLC_DEFAULT_FONT_DATA :TArrayOfGLCanvasFontData = ( + (Name: 'Arial'; + FileName: 'arial1.glf'; + FontType: GLCANVAS_TEXT_GLF; + ), + (Name: 'Courier New'; + FileName: 'courier1.glf'; + FontType: GLCANVAS_TEXT_GLF; + ), + (Name: 'Courier New'; + FileName: 'CourierNew Grid.bmp'; + FontType: GLCANVAS_TEXT_QUADTEXT; + ), + (Name: 'Arial'; + FileName: 'Arial Grid.bmp'; + FontType: GLCANVAS_TEXT_QUADTEXT; + ) + ); + + type + // we use this to store the pixel data from a bitmap TPixelData = TByteArray; *************** *** 75,81 **** --- 116,126 ---- end; + + TGLText = class private // wraps up the GLF library and possibly other text systems + FFonts :TArrayOfGLCanvasFontData; + FLines :TStringList; FFontName :string; *************** *** 85,88 **** --- 130,136 ---- FDisplayList :integer; // this is used to speed up text drawing FPrecache: boolean; + + FTexture :TTexture; // stores the texture for QuadText + function GetText: string; procedure SetFontName(const Value: string); *************** *** 98,105 **** --- 146,158 ---- procedure UpdateDisplayList; virtual ; procedure DrawInternal; virtual; + + function MatchFontName(name:string; tt:Integer):TGLCanvasFontData; + function MatchFontWidths(f:TGLCanvasFontData):TQuadTextWidthsArray; + public TextType :integer; // GLF or something else? GLFFontHandle :integer; // glf font id + QT:TQuadText; //quadtext record for this text object // the fontname property holds a filename for GLF *************** *** 119,123 **** property DisplayList :integer read FDisplayList; ! constructor Create(aText, aFontName:string; aTextType:integer); destructor Destroy; override ; procedure Draw; virtual ; --- 172,176 ---- property DisplayList :integer read FDisplayList; ! constructor Create(aText, aFontName:string; aPreferredTextType:integer; FontData:TArrayOfGLCanvasFontData); destructor Destroy; override ; procedure Draw; virtual ; *************** *** 270,274 **** var t:TGLText; begin ! t := TGLText.Create(str,FontName,aFontType); DrawText(X,Y,t); t.Free; --- 323,327 ---- var t:TGLText; begin ! t := TGLText.Create(str,FontName,aFontType,GLC_DEFAULT_FONT_DATA); DrawText(X,Y,t); t.Free; *************** *** 277,286 **** procedure TGLCanvas.DrawText(X, Y: Integer; text: TGLText); begin ! glLoadIdentity; ! // change co-ordinate system to 1:1 pixel mapping ! glScalef(2.0 / Width, 2.0 / Height, 1.0); ! glTranslatef(-(Width / 2), (Height / 2), 0); ! glTranslatef(X,-Y,0); text.Draw; --- 330,351 ---- procedure TGLCanvas.DrawText(X, Y: Integer; text: TGLText); begin ! if text.TextType = GLCANVAS_TEXT_GLF then ! begin ! glMatrixMode(GL_MODELVIEW); ! glLoadIdentity; ! // change co-ordinate system to 1:1 pixel mapping ! glScalef(2.0 / Width, 2.0 / Height, 1.0); ! glTranslatef(-(Width / 2), (Height / 2), 0); ! glTranslatef(X,-Y,0); ! end else if text.TextType = GLCANVAS_TEXT_QUADTEXT then ! begin ! glMatrixMode(GL_MODELVIEW); ! glLoadIdentity; ! // change co-ordinate system to 1:1 pixel mapping ! glScalef(2.0 / Width, -2.0 / Height, 1.0); ! glTranslatef(-(Width / 2), -(Height / 2), 0); ! glTranslatef(X,Y,0); ! end; text.Draw; *************** *** 289,302 **** { TGLText } ! constructor TGLText.Create(aText, aFontName: string; aTextType:integer); begin inherited Create; ! FPrecache := true; FLines := TStringList.Create; FSize := 10.0; FLines.Text := aText; FDisplayList := -1; ! TextType := aTextType; FFontName := aFontName; LoadFont; if Precache then --- 354,369 ---- { TGLText } ! constructor TGLText.Create(aText, aFontName: string; aPreferredTextType:integer; FontData:TArrayOfGLCanvasFontData); begin inherited Create; ! FPrecache := false; FLines := TStringList.Create; FSize := 10.0; FLines.Text := aText; FDisplayList := -1; ! TextType := aPreferredTextType; FFontName := aFontName; + FFonts := FontData; + FTexture := nil; LoadFont; if Precache then *************** *** 336,342 **** glfDrawSolidStringF(GLFFontHandle,FLines[a]); glPopMatrix; ! glTranslatef(0,maxy/2,0); // move down a line end; glPopMatrix; end; // add more text types here end; --- 403,417 ---- glfDrawSolidStringF(GLFFontHandle,FLines[a]); glPopMatrix; ! glTranslatef(0,-2,0); // move down a line end; glPopMatrix; + end else if TextType = GLCANVAS_TEXT_QUADTEXT then + begin + glColor3f(FRed, FGreen, FBlue); + qtStart; + glPushMatrix; + qtDrawGridString(QT,FLines.Text); + glPopMatrix; + qtStop; end; // add more text types here end; *************** *** 348,361 **** procedure TGLText.LoadFont; begin if TextType = GLCANVAS_TEXT_GLF then begin ! if ExtractFileExt(FontName) = '.glf' then begin ! GLFFontHandle := glfLoadFont(FontName); if GLFFontHandle = GLF_ERROR then raise Exception.Create('Could not load font'); ! end else if ExtractFileExt(FontName) = '.bmf' then ! glfLoadBMFFont(FontName); end; // add more text types here end; --- 423,475 ---- procedure TGLText.LoadFont; + var f:TGLCanvasFontData; begin + f := MatchFontName(FontName,TextType); if TextType = GLCANVAS_TEXT_GLF then begin ! if ExtractFileExt(f.FileName) = '.glf' then begin ! GLFFontHandle := glfLoadFont(f.FileName); if GLFFontHandle = GLF_ERROR then raise Exception.Create('Could not load font'); ! end else if ExtractFileExt(f.FileName) = '.bmf' then ! glfLoadBMFFont(f.FileName); ! end else if TextType = GLCANVAS_TEXT_QUADTEXT then ! begin ! if assigned(FTexture) then FTexture.Free; ! FTexture := TTexture.Create; ! FTexture.LoadFromFile(f.FileName); ! QT.TextureID := FTexture.TexID; ! QT.GridSquareWidth := 20; ! QT.GridSquareHeight := 20; ! QT.GridCells := 12; ! QT.GridCharSpacing := 2; ! QT.SpaceWidth := 5; ! QT.TexWidths := MatchFontWidths(f); end; // add more text types here + end; + + function TGLText.MatchFontName(name: string; tt: Integer): TGLCanvasFontData; + var a:integer; + begin + // returns first match + for a := 1 to GLC_MAXFONTS do + if (UpperCase(FFonts[a].Name) = UpperCase(name)) and (FFonts[a].FontType = tt) then + begin + Result := FFonts[a]; + exit; + end; + raise EGLCanvasException.Create('No match found for font "'+name+'"'); + end; + + function TGLText.MatchFontWidths( + f: TGLCanvasFontData): TQuadTextWidthsArray; + begin + // fudge, delphi won't let me specify this in the + // defaults array for some reason. + + if UpperCase(f.Name) = 'ARIAL' then + result := ARIAL_WIDTHS + else if UpperCase(f.Name) = 'COURIER NEW' then + Result := COURIERNEW_WIDTHS; end; Index: glfD.pas =================================================================== RCS file: /cvsroot/pythianproject/Prototypes/GLCanvas/glfD.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** glfD.pas 2000/11/11 17:13:12 1.1 --- glfD.pas 2000/11/18 19:44:20 1.2 *************** *** 6,15 **** ============================================================================== | GLF Library ! | Version 1.1 (Beta) | | Author: Roman Podobedov | Email: ro...@ut... | WEB: http://romka.demonews.com ! | Date: 25 October 2000 | | Copyright (C) 2000, Romka Graphics --- 6,15 ---- ============================================================================== | GLF Library ! | Version 1.11 | | Author: Roman Podobedov | Email: ro...@ut... | WEB: http://romka.demonews.com ! | Date: 12 November 2000 | | Copyright (C) 2000, Romka Graphics *************** *** 22,33 **** Translation to Delphi: - Kamil Krauspe (main guy) ! - Michael Hearn (minor changes), added console commands + console bug fixes - Darryl Long (teeny little changes) ! - Ilkka Tuomioja (updated to v1.1) For the Pythian Project } - {.$DEFINE debugging} uses Windows, SysUtils, OpenGL; --- 22,32 ---- Translation to Delphi: - Kamil Krauspe (main guy) ! - Michael Hearn (minor changes), added some console commands + console bug fixes - Darryl Long (teeny little changes) ! - Ilkka Tuomioja (updated to v1.1beta and v1.11) For the Pythian Project } uses Windows, SysUtils, OpenGL; *************** *** 114,118 **** procedure glfSetContourColor(r, g, b, a: Integer); //* Contour color */ ! //* Enable/Disable GLF features */ procedure glfEnable(what: Integer); //* Enable GLF feature 'what' */ procedure glfDisable(what: Integer); //* Disable GLF feature 'what' */ --- 113,117 ---- procedure glfSetContourColor(r, g, b, a: Integer); //* Contour color */ ! //* Enable or Disable GLF features */ procedure glfEnable(what: Integer); //* Enable GLF feature 'what' */ procedure glfDisable(what: Integer); //* Disable GLF feature 'what' */ *************** *** 1104,1109 **** procedure glfPrint(const s: string; lenght: Integer); var ! i,c{, e}: Integer; ! str2:string; begin for i := 1 to lenght do --- 1103,1108 ---- procedure glfPrint(const s: string; lenght: Integer); var ! i{,c, e}: Integer; ! {str2:string;} begin for i := 1 to lenght do *************** *** 1206,1217 **** { --------------------------------------------------------------------------------- ! ------------------------ Work with bitmapped fonts ------------------------------ ! --------------------------------------------------------------------------------- ! } ! { ! !!!THIS PIECE OF CODE IS UNDER DEVELOPMENT!!! ! !!!NO COMMENTS AT THIS TIME!!! } procedure bwtorgba(b: PByteArray; l: PByteArray; n: Integer); var --- 1205,1213 ---- { --------------------------------------------------------------------------------- ! ------------------------ Work with bitmapped fonts ------------------------------ ! --------------------------------------------------------------------------------- } + //* Some color conversions */ procedure bwtorgba(b: PByteArray; l: PByteArray; n: Integer); var *************** *** 1298,1301 **** --- 1294,1298 ---- end; + //* Open RGB Image */ function ImageOpen(f: Integer): PImageRec; var *************** *** 1306,1312 **** x: Integer; begin - {$IFDEF DEBUGGING} - WriteLn('ImageOpen startpoint.'); - {$ENDIF} Result := nil; --- 1303,1306 ---- *************** *** 1317,1326 **** else swapFlag := 0; - {$IFDEF DEBUGGING} - if SwapFlag = 1 then - WriteLn('Swapping bytes') - else - WriteLn('No swapping reguired'); - {$ENDIF} GetMem(image, sizeof(TImageRec)); --- 1311,1314 ---- *************** *** 1345,1362 **** exit; end; - {$IFDEF DEBUGGING} - WriteLn('iMagic: ' + IntToHex(image.imagic, 4)); - WriteLn('Type: ' + IntToHex(image.type_, 4)); - WriteLn('Dimensions: ' + IntToStr(image.dim)); - WriteLn('x-size: ' + IntToStr(image.xsize)); - WriteLn('y-size: ' + IntToStr(image.ysize)); - WriteLn('z-size: ' + IntToStr(image.zsize)); - {$ENDIF} if (image.type_ and $ff00) = $0100 then begin - {$IFDEF DEBUGGING} - WriteLn('Packed'); - {$ENDIF} x := image.ysize * image.zsize * SizeOf(Pointer); GetMem(image.rowStart, x); --- 1333,1339 ---- *************** *** 1365,1374 **** begin WriteLn('Out of memory, rows nil!'); - {$IFDEF DEBUGGING} - if image.rowStart = nil then - WriteLn('rowStart = nil'); - if image.rowSize = nil then - WriteLn('rowSize = nil'); - {$ENDIF} exit; end; --- 1342,1345 ---- *************** *** 1386,1402 **** image.rowStart := nil; image.rowSize := nil; - {$IFDEF DEBUGGING} - WriteLn('Not packed'); - {$ENDIF} end; Result := image; - {$IFDEF DEBUGGING} - WriteLn('ImageOpen endpoint'); - {$ENDIF} end; procedure ImageClose(image: PImageRec); begin - // FileClose(image.file_); FreeMem(image.tmp); FreeMem(image.tmpR); --- 1357,1367 ---- image.rowStart := nil; image.rowSize := nil; end; Result := image; end; + //* Close Image and free data */ procedure ImageClose(image: PImageRec); begin FreeMem(image.tmp); FreeMem(image.tmpR); *************** *** 1406,1414 **** FreeMem(image.rowStart); FreeMem(image); - {$IFDEF DEBUGGING} - WriteLn('ImageClose'); - {$ENDIF} end; procedure ImageGetRow(image: PImageRec; buf: PByteArray; y: Integer; z: Integer); var --- 1371,1377 ---- FreeMem(image.rowStart); FreeMem(image); end; + //* Pixels row decoding (if used RLE encoding) */ procedure ImageGetRow(image: PImageRec; buf: PByteArray; y: Integer; z: Integer); var *************** *** 1434,1440 **** if count = 0 then begin - {$IFDEF DEBUGGING} - WriteLn('ImageGetRow: exit as count = 0'); - {$ENDIF} exit; end; --- 1397,1400 ---- *************** *** 1465,1468 **** --- 1425,1429 ---- end; + //* Read SGI (RGB) Image from file */ function read_texture(f: Integer; width: PInteger; height: PInteger; components: PInteger): Pointer; var *************** *** 1472,1478 **** y: Integer; begin - {$IFDEF DEBUGGING} - WriteLn('Read_texture startpoint'); - {$ENDIF} Result := nil; image := ImageOpen(f); --- 1433,1436 ---- *************** *** 1493,1499 **** end; lptr := base; - {$IFDEF DEBUGGING} - WriteLn('Getting rows'); - {$ENDIF} for y:= 0 to image.ysize-1 do begin --- 1451,1454 ---- *************** *** 1525,1531 **** end; end; - {$IFDEF DEBUGGING} - WriteLn('Getting rows done'); - {$ENDIF} ImageClose(image); FreeMem(rbuf); --- 1480,1483 ---- *************** *** 1535,1543 **** result := base; - {$IFDEF DEBUGGING} - WriteLn('Read_texture endpoint'); - {$ENDIF} end; function glfLoadBMFFont(const FName: string): Integer; var --- 1487,1493 ---- result := base; end; + //* Load BMF file format */ function glfLoadBMFFont(const FName: string): Integer; var *************** *** 1547,1564 **** i: Integer; begin f := FileOpen(FName, fmOpenRead); FileRead(f, Header, 3); Header[3] := #0; if strcomp(Header, 'BMF') <> 0 then - begin - result := -1; Exit; - end; FileRead(f, FontName, 96); FontName[96] := #0; - // WriteLn('Font name: ' + FontName); for i := 0 to 255 do begin --- 1497,1517 ---- i: Integer; begin + Result := -1; + f := FileOpen(FName, fmOpenRead); + if (f < 0) then //* Error opening file */ + Exit; + //* Get header */ FileRead(f, Header, 3); Header[3] := #0; if strcomp(Header, 'BMF') <> 0 then Exit; + //* Get font name */ FileRead(f, FontName, 96); FontName[96] := #0; + // Read all 256 symbols information */ for i := 0 to 255 do begin *************** *** 1568,1571 **** --- 1521,1526 ---- FileRead(f, Symbols[i].height, 4); end; + + //* Read texture image from file and build texture */ texture := read_texture(f, @twidth, @theight, @tcomp); glBindTexture(GL_TEXTURE_2D, bmf_texture); *************** *** 1574,1577 **** --- 1529,1533 ---- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, twidth, theight, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture); + //* Linear filtering for better quality */ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); *************** *** 1580,1583 **** --- 1536,1540 ---- FileClose(f); + //* Now build list for each symbol */ list_base := glGenLists(256); for i := 0 to 255 do *************** *** 1585,1589 **** glNewList(list_base+i, GL_COMPILE); glBegin(GL_QUADS); ! glTexCoord2f(Symbols[i].x, Symbols[i].y); glVertex2f(0, 0); glTexCoord2f(Symbols[i].x + Symbols[i].width, Symbols[i].y); glVertex2f(Symbols[i].width, 0); --- 1542,1547 ---- glNewList(list_base+i, GL_COMPILE); glBegin(GL_QUADS); ! glTexCoord2f(Symbols[i].x, Symbols[i].y); ! glVertex2f(0, 0); glTexCoord2f(Symbols[i].x + Symbols[i].width, Symbols[i].y); glVertex2f(Symbols[i].width, 0); *************** *** 1602,1607 **** --- 1560,1567 ---- end; + //* Start bitmap drawing function */ procedure glfStartBitmapDrawing; begin + //* Enable 2D Texturing */ glGetBooleanv(GL_TEXTURE_2D, @bmf_texturing); glEnable(GL_TEXTURE_2D); *************** *** 1609,1618 **** --- 1569,1581 ---- end; + //* Stop bitmap drawing function */ procedure glfStopBitmapDrawing; begin + //* Return previuos state of texturing */ if bmf_texturing = GL_TRUE then glEnable(GL_TEXTURE_2D) else glDisable(GL_TEXTURE_2D); end; + //* Draw one bitmapped symbol */ procedure glfDrawBSymbol(s: Char); begin *************** *** 1620,1623 **** --- 1583,1587 ---- end; + //* Draw bitmapped string */ procedure glfDrawBString(s: string); begin *************** *** 1626,1635 **** end; - initialization - // init glf - glfInit; - glfSetAnchorPoint(GLF_LEFT_UP); - - finalization - glfClose; end. --- 1590,1592 ---- |