fixed ExtTextOut getting TextHeight

git-svn-id: trunk@9111 -
This commit is contained in:
mattias 2006-04-10 08:45:13 +00:00
parent c2d94e53a0
commit 770fa8ffb2
3 changed files with 4 additions and 7 deletions

View File

@ -392,13 +392,9 @@ begin
end; end;
procedure TXMLObjectWriter.WriteWideString(const Value: WideString); procedure TXMLObjectWriter.WriteWideString(const Value: WideString);
var // save widestrings as utf8
s: string;
begin begin
SetLength(s,length(Value)*2); GetPropertyElement('widestring')['value'] := System.UTF8Encode(Value);
if s<>'' then
System.Move(Value[1],s[1],length(s));
GetPropertyElement('widestring')['value'] := s;
end; end;

View File

@ -29,6 +29,7 @@ type
property MyString: string read FMyString write FMyString; property MyString: string read FMyString write FMyString;
property MyEnum: TMyEnum read FMyEnum write FMyEnum; property MyEnum: TMyEnum read FMyEnum write FMyEnum;
property MySet: TMySet read FMySet write FMySet; property MySet: TMySet read FMySet write FMySet;
end; end;

View File

@ -3844,7 +3844,7 @@ begin
if UseFont<>nil then begin if UseFont<>nil then begin
LineLen := FindChar(#10,Str,Count); LineLen := FindChar(#10,Str,Count);
UpdateDCTextMetric(TDeviceContext(DC)); UpdateDCTextMetric(TDeviceContext(DC));
LineHeight:=DCTextMetric.TextMetric.tmHeight; LineHeight:=GetTextHeight(DCTextMetric);
if Buffered then begin if Buffered then begin
TxtPt.X := 0; TxtPt.X := 0;
TxtPt.Y := LineHeight; TxtPt.Y := LineHeight;