mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 04:29:27 +02:00
LCL: TCanvas.DrawText: changing and restoring BKMode when Style.Opaque=false
git-svn-id: trunk@10766 -
This commit is contained in:
parent
e730abc793
commit
91e8c58c50
@ -12,7 +12,6 @@
|
||||
</General>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
|
@ -2533,7 +2533,7 @@ begin
|
||||
ExpandTabs := True;
|
||||
SystemFont := False;
|
||||
end;
|
||||
ACanvas.TextRect(ARect,ARect.Left+2,ARect.Top,GetName, Style);
|
||||
ACanvas.TextRect(ARect,ARect.Left+2,ARect.Top,GetName,Style);
|
||||
end;
|
||||
|
||||
procedure TPropertyEditor.PropDrawValue(ACanvas:TCanvas; const ARect: TRect;
|
||||
|
@ -1048,17 +1048,25 @@ begin
|
||||
InterSectClipRect(Self.Handle, Left, Top, Right, Bottom);
|
||||
Options := Options or DT_NOCLIP; // no clipping as we are handling it here
|
||||
end;
|
||||
|
||||
If Style.Opaque then begin
|
||||
|
||||
if Style.Opaque then begin
|
||||
RequiredState([csHandleValid, csBrushValid]);
|
||||
FillRect(fRect);
|
||||
end else begin
|
||||
SetBkMode(FHandle, TRANSPARENT);
|
||||
end;
|
||||
|
||||
If Style.SystemFont then
|
||||
if Style.SystemFont then
|
||||
SetTextColor(Self.Handle, Font.Color);
|
||||
//debugln('TCanvas.TextRect DRAW Text="',Text,'" ',dbgs(fRect));
|
||||
DrawText(Self.Handle, pChar(Text), Length(Text), fRect, Options);
|
||||
|
||||
if Style.Opaque and (csBrushValid in FState) then begin
|
||||
if Brush.Style=bsSolid then
|
||||
// restore BKMode
|
||||
SetBkMode(FHandle, OPAQUE)
|
||||
end;
|
||||
|
||||
if Style.Clipping then begin
|
||||
if DCIndex <> -1 then
|
||||
RestoreDC(Self.Handle, DCIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user