mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 20:39:15 +02:00
LCL Win: Call Windows FillRgn and SetStretchBltMode from cross-platform code. Patch from Bernd Gabriel
git-svn-id: trunk@31277 -
This commit is contained in:
parent
e2081bb160
commit
b3dbb6e552
@ -1435,6 +1435,24 @@ begin
|
||||
Result := Boolean(Windows.FillRect(DC, Windows.RECT(R), Brush));
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: FillRgn
|
||||
Params: DC - handle to device context
|
||||
RegionHnd - handle to region
|
||||
Brush - handle to brush
|
||||
Returns: If the function succeeds
|
||||
|
||||
The FillRgn function fills a region by using the specified brush.
|
||||
------------------------------------------------------------------------------}
|
||||
function TWin32WidgetSet.FillRgn(DC: HDC; RegionHnd: HRGN; hbr: HBRUSH): BOOL;
|
||||
var
|
||||
OldBrush: HGDIOBJ;
|
||||
begin
|
||||
OldBrush := Windows.SelectObject(DC, hbr);
|
||||
Result := {Boolean}(Windows.FillRgn(DC, RegionHnd, hbr));
|
||||
Windows.SelectObject(DC, OldBrush);
|
||||
end;
|
||||
|
||||
function TWin32WidgetSet.FloodFill(DC: HDC; X, Y: Integer;
|
||||
Color: TGraphicsColor; FillStyle: TGraphicsFillStyle; Brush: HBRUSH): Boolean;
|
||||
const
|
||||
@ -3126,6 +3144,19 @@ begin
|
||||
Result := Windows.SetScrollInfo(Handle, SBStyle, @ScrollInfo, BRedraw);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: SetStretchBltMode
|
||||
Params: DC - handle of device context
|
||||
StretchMode - strech mode
|
||||
Returns: 0 if unsuccesful
|
||||
|
||||
The SetStretchBltMode function sets the StrechBlt mode.
|
||||
------------------------------------------------------------------------------}
|
||||
function TWin32WidgetSet.SetStretchBltMode(DC: HDC; StretchMode: Integer): Integer;
|
||||
begin
|
||||
Result := Windows.SetStretchBltMode(DC, StretchMode);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: SetSysColors
|
||||
Params: CElements - the number of elements
|
||||
|
@ -86,6 +86,7 @@ function ExtTextOut(DC: HDC; X, Y: Integer; Options: LongInt; Rect: PRect; Str:
|
||||
function ExtSelectClipRGN(dc: hdc; rgn : hrgn; Mode : Longint) : Integer; override;
|
||||
|
||||
function FillRect(DC: HDC; Const Rect: TRect; Brush: HBRUSH): Boolean; override;
|
||||
function FillRgn(DC: HDC; RegionHnd: HRGN; hbr: HBRUSH): BOOL; override;
|
||||
function FloodFill(DC: HDC; X, Y: Integer; Color: TGraphicsColor; FillStyle: TGraphicsFillStyle; Brush: HBRUSH): Boolean; override;
|
||||
{ Draws a 3D border in GTK native style. }
|
||||
function Frame3D(DC: HDC; var ARect: TRect; Const FrameWidth: Integer; Const Style: TBevelCut): Boolean; override;
|
||||
@ -210,6 +211,7 @@ function SetParent(hWndChild: HWND; hWndParent: HWND): HWND; override;
|
||||
function SetProp(Handle: hwnd; Str: PChar; Data: Pointer): Boolean; override;
|
||||
function SetROP2(DC: HDC; Mode: Integer): Integer; override;
|
||||
function SetScrollInfo(Handle: HWND; SBStyle: Integer; ScrollInfo: TScrollInfo; BRedraw: Boolean): Integer; override;
|
||||
function SetStretchBltMode(DC: HDC; StretchMode: Integer): Integer; override;
|
||||
function SetSysColors(CElements: Integer; Const LPAElements; Const LPARgbValues): Boolean; override;
|
||||
function SetTextCharacterExtra(_HDC: HDC; NCharExtra: Integer): Integer; override;
|
||||
function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; override;
|
||||
|
Loading…
Reference in New Issue
Block a user