View Issue Details

IDProjectCategoryView StatusLast Update
0031155LazarusLazReportpublic2017-01-02 18:38
ReporterJulio Jiménez BorregueroAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionProduct Build 
Target Version1.6.4Fixed in Version1.7 (SVN) 
Summary0031155: Patch for lrcodereport.
DescriptionFix: procedure TextOutXY. Use scale values.

Apply to Lazarus trunk and Lazarus 1.6.x
TagsNo tags attached.
Fixed in Revision53835
LazTarget1.6.4
Widgetset
Attached Files
  • lrcodereport.diff (836 bytes)
    Index: components/lazreport/source/addons/lrcodereport/lr_codereport.pas
    ===================================================================
    --- components/lazreport/source/addons/lrcodereport/lr_codereport.pas	(revisión: 53755)
    +++ components/lazreport/source/addons/lrcodereport/lr_codereport.pas	(copia de trabajo)
    @@ -630,14 +630,14 @@
         taLeftJustify: Pos := X;
         taRightJustify:
         begin
    -      Pos := X - TextWidth(AText);
    +      Pos := X - TextWidth(AText) / XRatio;
         end;
         taCenter:
         begin
    -      Pos := X - (TextWidth(AText) / 2);
    +      Pos := X - (TextWidth(AText) / 2 / XRatio);
         end;
       end;
    -  DrawText(Pos, Y, TextWidth(AText), TextHeight, AText, Style);
    +  DrawText(Pos, Y, TextWidth(AText) / XRatio + 2, TextHeight / YRatio, AText, Style);
       Cursor.Left += TextWidth(AText) / XRatio;
     end;
     
    
    lrcodereport.diff (836 bytes)

Activities

Julio Jiménez Borreguero

2016-12-22 10:20

reporter  

lrcodereport.diff (836 bytes)
Index: components/lazreport/source/addons/lrcodereport/lr_codereport.pas
===================================================================
--- components/lazreport/source/addons/lrcodereport/lr_codereport.pas	(revisión: 53755)
+++ components/lazreport/source/addons/lrcodereport/lr_codereport.pas	(copia de trabajo)
@@ -630,14 +630,14 @@
     taLeftJustify: Pos := X;
     taRightJustify:
     begin
-      Pos := X - TextWidth(AText);
+      Pos := X - TextWidth(AText) / XRatio;
     end;
     taCenter:
     begin
-      Pos := X - (TextWidth(AText) / 2);
+      Pos := X - (TextWidth(AText) / 2 / XRatio);
     end;
   end;
-  DrawText(Pos, Y, TextWidth(AText), TextHeight, AText, Style);
+  DrawText(Pos, Y, TextWidth(AText) / XRatio + 2, TextHeight / YRatio, AText, Style);
   Cursor.Left += TextWidth(AText) / XRatio;
 end;
 
lrcodereport.diff (836 bytes)

Jesus Reyes

2017-01-02 18:38

developer   ~0097245

Applied, thanks.

Issue History

Date Modified Username Field Change
2016-12-22 10:20 Julio Jiménez Borreguero New Issue
2016-12-22 10:20 Julio Jiménez Borreguero File Added: lrcodereport.diff
2016-12-23 14:50 Juha Manninen Assigned To => Jesus Reyes
2016-12-23 14:50 Juha Manninen Status new => assigned
2017-01-02 18:38 Jesus Reyes Fixed in Revision => 53835
2017-01-02 18:38 Jesus Reyes LazTarget => 1.6.4
2017-01-02 18:38 Jesus Reyes Note Added: 0097245
2017-01-02 18:38 Jesus Reyes Status assigned => resolved
2017-01-02 18:38 Jesus Reyes Fixed in Version => 1.7 (SVN)
2017-01-02 18:38 Jesus Reyes Resolution open => fixed
2017-01-02 18:38 Jesus Reyes Target Version => 1.6.4