mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 14:19:13 +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
|
var
|
||||||
aObject: TObject;
|
aObject: TObject;
|
||||||
lBrush: TFPCustomBrush absolute AObject;
|
lBrush: TFPCustomBrush absolute AObject;
|
||||||
|
lOrigBrush: TFPCustomBrush;
|
||||||
{$ifdef VerboseWinAPI}
|
{$ifdef VerboseWinAPI}
|
||||||
ObjType: string;
|
ObjType: string;
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -5339,9 +5340,9 @@ begin
|
|||||||
begin
|
begin
|
||||||
{$ifdef VerboseWinAPI}ObjType := 'Brush';{$endif}
|
{$ifdef VerboseWinAPI}ObjType := 'Brush';{$endif}
|
||||||
|
|
||||||
//Result := HGDIOBJ(TQtDeviceContext(DC).brush);
|
Result := HGDIOBJ(TLazCanvas(DC).AssignedBrush);
|
||||||
|
TLazCanvas(DC).AssignBrushData(lBrush); // := doesn't work
|
||||||
TLazCanvas(DC).Brush.FPColor := lBrush.FPColor;
|
TLazCanvas(DC).AssignedBrush := lBrush;
|
||||||
end(*
|
end(*
|
||||||
else if aObject is TQtImage then
|
else if aObject is TQtImage then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user