From: <cw...@us...> - 2013-11-11 09:38:33
|
Revision: 2155 http://sourceforge.net/p/graphics32/code/2155 Author: cwbudde Date: 2013-11-11 09:38:30 +0000 (Mon, 11 Nov 2013) Log Message: ----------- Fixed issue with drawing text without specifying a rectangle Modified Paths: -------------- trunk/Source/GR32_Text_VCL.pas Modified: trunk/Source/GR32_Text_VCL.pas =================================================================== --- trunk/Source/GR32_Text_VCL.pas 2013-11-10 11:43:18 UTC (rev 2154) +++ trunk/Source/GR32_Text_VCL.pas 2013-11-11 09:38:30 UTC (rev 2155) @@ -329,7 +329,7 @@ function NeedsNewLine(X: Single): Boolean; begin - Result := X > ARect.Right * HorzStretch; + Result := (ARect.Right > ARect.Left) and (X > ARect.Right * HorzStretch); end; procedure AddSpace; @@ -387,7 +387,7 @@ 0, nil, VertFlip_mat2); SpcX := GlyphMetrics.gmCellIncX; - if (Flags and DT_SINGLELINE <> 0) then + if (Flags and DT_SINGLELINE <> 0) or (ARect.Left = ARect.Right) then begin // ignore justify when forcing singleline ... if (Flags and DT_JUSTIFY = DT_JUSTIFY) then This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |