fixed postcript printer TextOut/TextEntend from Olivier

git-svn-id: trunk@6258 -
This commit is contained in:
mattias 2004-11-17 07:46:32 +00:00
parent 06bc52d1cb
commit fec5cb234b
2 changed files with 12 additions and 5 deletions

View File

@ -7289,22 +7289,23 @@ begin
//debugln('UpdateWidgetStyleOfControl New Font Color=',dbgs(NewColor.Pixel),' ',dbgs(NewColor.Red),' ',dbgs(NewColor.Green),' ',dbgs(NewColor.Blue));
CreateRCStyle;
RCStyle^.text[GTK_STATE_NORMAL]:=NewColor;
for i:=0 to 4 do begin
{for i:=0 to 4 do begin
RCStyle^.text[i]:=NewColor;
RCStyle^.fg[i]:=NewColor;
RCStyle^.bg[i]:=NewColor;
RCStyle^.base[i]:=NewColor;
RCStyle^.color_flags[i]:=
RCStyle^.color_flags[i] or 15;
end;
end;}
RCStyle^.text[GTK_STATE_NORMAL]:=NewColor;
// Indicate which colors the GtkRcStyle will affect;
// unflagged colors will follow the theme
RCStyle^.color_flags[GTK_STATE_NORMAL]:=
RCStyle^.color_flags[GTK_STATE_NORMAL] or GTK_RC_TEXT;
DebugLn('UpdateWidgetStyleOfControl Font Color ',DbgSName(AWinControl),' Color=',HexStr(Cardinal(AWinControl.Font.Color),8));
//DebugLn('UpdateWidgetStyleOfControl Font Color ',DbgSName(AWinControl),' Color=',HexStr(Cardinal(AWinControl.Font.Color),8));
end;
// set font (currently only TCustomLabel)
@ -7878,6 +7879,9 @@ end;
{ =============================================================================
$Log$
Revision 1.320 2004/11/17 07:46:32 mattias
fixed postcript printer TextOut/TextEntend from Olivier
Revision 1.319 2004/11/10 18:23:56 mattias
impementing changing a TLabel.Font properties Size, Height, Name, Style - set only at Handle creation time

View File

@ -1698,6 +1698,9 @@ begin
TranslateCoord(X,Y);
UpdateFont;
//The Y origine for ps text it's Left bottom corner
Dec(Y,Abs(Round(Font.Size)));
if fsUnderline in Font.Style then
begin
PenUnder:=0.5;
@ -1727,7 +1730,7 @@ begin
Result.cY := 0;
if Text='' then Exit;
RequiredState([csHandleValid, csFontValid]);
Result.cX:=Font.Size*72;
Result.cY:=Font.Size;
FontName:=MappedFontName;
IndexFont:=0; //By default, use CourierISO metrics