From e064a6b187f5386714a3511dbd21b1b32d154de7 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Sat, 12 Feb 2011 21:02:44 +0000 Subject: [PATCH] Implements DXF text rendering git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1499 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../fpvviewer/fpvectorialsrc/dxfvectorialreader.pas | 3 ++- applications/fpvviewer/fpvectorialsrc/fpvtocanvas.pas | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas b/applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas index 2aca7b0c0..e1964aeb3 100644 --- a/applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas +++ b/applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas @@ -384,7 +384,8 @@ begin else if CurToken.StrValue = 'DIMENSION' then ReadENTITIES_DIMENSION(CurToken.Childs, AData) else if CurToken.StrValue = 'ELLIPSE' then ReadENTITIES_ELLIPSE(CurToken.Childs, AData) else if CurToken.StrValue = 'LINE' then ReadENTITIES_LINE(CurToken.Childs, AData) - else if CurToken.StrValue = 'TEXT' then + else if CurToken.StrValue = 'TEXT' then ReadENTITIES_TEXT(CurToken.Childs, AData) + else begin // ... end; diff --git a/applications/fpvviewer/fpvectorialsrc/fpvtocanvas.pas b/applications/fpvviewer/fpvectorialsrc/fpvtocanvas.pas index 3ba85b686..321682ffb 100644 --- a/applications/fpvviewer/fpvectorialsrc/fpvtocanvas.pas +++ b/applications/fpvviewer/fpvectorialsrc/fpvtocanvas.pas @@ -332,10 +332,12 @@ begin for i := 0 to ASource.GetTextCount - 1 do begin CurText := ASource.GetText(i); - ADest.Font.Height := Round(AmulY * CurText.FontSize); + ADest.Font.Size := Round(AmulX * CurText.FontSize); ADest.Pen.Style := psSolid; ADest.Pen.Color := clBlack; - ADest.TextOut(Round(CurText.X), Round(CurText.Y), CurText.Value); + ADest.Brush.Style := bsClear; + LowerDim.Y := CurText.Y + CurText.FontSize; + ADest.TextOut(CoordToCanvasX(CurText.X), CoordToCanvasY(LowerDim.Y), CurText.Value); end; {$ifdef FPVECTORIALDEBUG}