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:
paul 2008-08-22 16:55:05 +00:00
parent 438148c17d
commit 8c1f0ed08d
2 changed files with 20 additions and 0 deletions

View File

@ -364,6 +364,25 @@ begin
DefaultDockImage(ANewRect);
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
Params: AVKey:

View File

@ -42,6 +42,7 @@ function CreateStandardCursor(ACursor: SmallInt): hCursor; override;
procedure DeallocateHWnd(Wnd: HWND); override;
procedure DrawArrow(Arrow: TComponent; Canvas: TPersistent); 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;
Str: PChar; Count: Longint; Dx: PInteger): Boolean; override;