mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 15:59:14 +02:00
win32: override DrawGrid, use old way since it works 2-4 times faster on slow machines (win98) or through terminal server on xp. Although it works indeed slower on direct session on fast machine.
git-svn-id: trunk@16188 -
This commit is contained in:
parent
438148c17d
commit
8c1f0ed08d
@ -364,6 +364,25 @@ begin
|
|||||||
DefaultDockImage(ANewRect);
|
DefaultDockImage(ANewRect);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TWin32WidgetSet.DrawGrid(DC: HDC; const R: TRect; DX, DY: Integer);
|
||||||
|
var
|
||||||
|
x, y: integer;
|
||||||
|
ALogPen: TLogPen;
|
||||||
|
begin
|
||||||
|
GetObject(GetCurrentObject(DC, OBJ_PEN), SizeOf(ALogPen), @ALogPen);
|
||||||
|
x := R.Left;
|
||||||
|
while x <= R.Right do
|
||||||
|
begin
|
||||||
|
y := R.Top;
|
||||||
|
while y <= R.Bottom do
|
||||||
|
begin
|
||||||
|
SetPixel(DC, X, Y, ALogPen.lopnColor);
|
||||||
|
Inc(y, DY);
|
||||||
|
end;
|
||||||
|
Inc(x, DX);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Function: GetAcceleratorString
|
Function: GetAcceleratorString
|
||||||
Params: AVKey:
|
Params: AVKey:
|
||||||
|
@ -42,6 +42,7 @@ function CreateStandardCursor(ACursor: SmallInt): hCursor; override;
|
|||||||
procedure DeallocateHWnd(Wnd: HWND); override;
|
procedure DeallocateHWnd(Wnd: HWND); override;
|
||||||
procedure DrawArrow(Arrow: TComponent; Canvas: TPersistent); override;
|
procedure DrawArrow(Arrow: TComponent; Canvas: TPersistent); override;
|
||||||
procedure DrawDefaultDockImage(AOldRect, ANewRect: TRect; AOperation: TDockImageOperation); override;
|
procedure DrawDefaultDockImage(AOldRect, ANewRect: TRect; AOperation: TDockImageOperation); override;
|
||||||
|
procedure DrawGrid(DC: HDC; const R: TRect; DX, DY: Integer); override;
|
||||||
|
|
||||||
function ExtUTF8Out(DC: HDC; X, Y: Integer; Options: Longint; Rect: PRect;
|
function ExtUTF8Out(DC: HDC; X, Y: Integer; Options: Longint; Rect: PRect;
|
||||||
Str: PChar; Count: Longint; Dx: PInteger): Boolean; override;
|
Str: PChar; Count: Longint; Dx: PInteger): Boolean; override;
|
||||||
|
Loading…
Reference in New Issue
Block a user