mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 22:59:27 +02:00
customdrawnws: Improves SelectObject to really return the old brush by using new capabilities from LazCanvas
git-svn-id: trunk@33715 -
This commit is contained in:
parent
a885d9908b
commit
fb6e9cb2b6
@ -5285,6 +5285,7 @@ function TCDWidgetSet.SelectObject(DC: HDC; GDIObj: HGDIOBJ): HGDIOBJ;
|
||||
var
|
||||
aObject: TObject;
|
||||
lBrush: TFPCustomBrush absolute AObject;
|
||||
lOrigBrush: TFPCustomBrush;
|
||||
{$ifdef VerboseWinAPI}
|
||||
ObjType: string;
|
||||
{$endif}
|
||||
@ -5339,9 +5340,9 @@ begin
|
||||
begin
|
||||
{$ifdef VerboseWinAPI}ObjType := 'Brush';{$endif}
|
||||
|
||||
//Result := HGDIOBJ(TQtDeviceContext(DC).brush);
|
||||
|
||||
TLazCanvas(DC).Brush.FPColor := lBrush.FPColor;
|
||||
Result := HGDIOBJ(TLazCanvas(DC).AssignedBrush);
|
||||
TLazCanvas(DC).AssignBrushData(lBrush); // := doesn't work
|
||||
TLazCanvas(DC).AssignedBrush := lBrush;
|
||||
end(*
|
||||
else if aObject is TQtImage then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user