mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 09:29:27 +02:00
customdrawnws: Minor adjustments and improvements, adds a temporary work around to see something in the screen on Rectangle drawing while there isnt yet a proper Pen and Brush
git-svn-id: trunk@33672 -
This commit is contained in:
parent
ca8736cbb4
commit
2488c66a69
@ -30,6 +30,7 @@ interface
|
||||
uses
|
||||
// RTL
|
||||
Types, Classes, SysUtils, Math,
|
||||
fpimage, fpcanvas,
|
||||
{$ifdef CD_Windows}Windows, WinProc,{$endif}
|
||||
{$ifdef CD_Cocoa}MacOSAll, CocoaAll,{$endif}
|
||||
{$ifdef CD_X11}X, XLib, XUtil, {unitxft, Xft font support}{$endif}
|
||||
|
@ -4948,6 +4948,7 @@ begin
|
||||
{$endif}
|
||||
|
||||
//if not IsValidDC(DC) then Exit(False);
|
||||
LazDC.Brush.FPColor := colWhite;
|
||||
LazDC.Rectangle(X1, Y1, X2, Y2);
|
||||
{ R := NormalizeRect(Rect(X1, Y1, X2, Y2));
|
||||
if IsRectEmpty(R) then Exit(True);
|
||||
|
@ -292,7 +292,7 @@ Var
|
||||
end;
|
||||
if (ControlDC = 0) or not needParentPaint then
|
||||
begin
|
||||
DCIndex := Windows.SaveDC(DC);
|
||||
//DCIndex := Windows.SaveDC(DC);
|
||||
|
||||
{$ifdef DEBUG_WINDOW_ORG}
|
||||
LCLIntf.GetWindowOrgEx(DC, @WindowOrg);
|
||||
@ -301,9 +301,9 @@ Var
|
||||
[lWinControl.Name, PaintMsg.DC, WindowOrg.X, WindowOrg.Y, -parLeft, -parTop]));
|
||||
{$endif}
|
||||
|
||||
MoveWindowOrgEx(DC, ORect.Left, ORect.Top);
|
||||
//MoveWindowOrgEx(DC, ORect.Left, ORect.Top); <- substitute with a non-native window org change
|
||||
DeliverMessage(lWinControl, PaintMsg);
|
||||
Windows.RestoreDC(DC, DCIndex);
|
||||
//Windows.RestoreDC(DC, DCIndex);
|
||||
|
||||
{$ifdef DEBUG_WINDOW_ORG}
|
||||
LCLIntf.GetWindowOrgEx(DC, @WindowOrg);
|
||||
@ -313,6 +313,7 @@ Var
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
// Now convert the rawimage to a HBITMAP and draw it to the screen
|
||||
WindowInfo^.Image.GetRawImage(lRawImage);
|
||||
WinProc_RawImage_CreateBitmaps(lRawImage, lBitmap, lMask, True);
|
||||
Windows.SelectObject(WindowInfo^.BitmapDC, lBitmap);
|
||||
|
Loading…
Reference in New Issue
Block a user