mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 19:30:25 +02:00
Small improvement on TCustomControl support for qt interface
git-svn-id: trunk@10517 -
This commit is contained in:
parent
fbf6e4f232
commit
879c6ecde9
@ -299,7 +299,9 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
constructor TQtImage.Create(Adata: PByte; width: Integer; height: Integer; format: QImageFormat);
|
||||
begin
|
||||
Handle := QImage_create(AData, width, height, format);
|
||||
if Adata = nil then
|
||||
Handle := QImage_create(width, height, format)
|
||||
else Handle := QImage_create(AData, width, height, format);
|
||||
|
||||
{$ifdef VerboseQt}
|
||||
WriteLn('TQtImage.Create Result:', PtrInt(Handle));
|
||||
|
@ -158,6 +158,34 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TQtWidgetSet.CreateBitmap
|
||||
Params:
|
||||
Returns:
|
||||
|
||||
This functions is for TBitmap support.
|
||||
Specifically it´s utilized on when a handle for a bitmap is needed
|
||||
------------------------------------------------------------------------------}
|
||||
function TQtWidgetSet.CreateBitmap(Width, Height: Integer;
|
||||
Planes, BitCount: Longint; BitmapBits: Pointer): HBITMAP;
|
||||
begin
|
||||
{$ifdef VerboseQtWinAPI}
|
||||
WriteLn('Trace:> [WinAPI CreateBitmap]',
|
||||
' Width:', dbgs(Width),
|
||||
' Height:', dbgs(Height),
|
||||
' Planes:', dbgs(Planes),
|
||||
' BitCount:', dbgs(BitCount),
|
||||
' BitmapBits: ', dbgs(BitmapBits));
|
||||
{$endif}
|
||||
|
||||
Result := HBitmap(TQtImage.Create(BitmapBits, Width,
|
||||
Height, QImageFormat_RGB32));
|
||||
|
||||
{$ifdef VerboseQtWinAPI}
|
||||
WriteLn('Trace:< [WinAPI CreateBitmap] Bitmap:', dbgs(Integer(Result)));
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TQtWidgetSet.CreateBitmapFromRawImage
|
||||
Params:
|
||||
|
@ -30,6 +30,7 @@
|
||||
function BeginPaint(Handle: hWnd; Var PS : TPaintStruct) : hdc; override;
|
||||
|
||||
Function CombineRgn(Dest, Src1, Src2: HRGN; fnCombineMode: Longint): Longint; override;
|
||||
function CreateBitmap(Width, Height: Integer; Planes, BitCount: Longint; BitmapBits: Pointer): HBITMAP; override;
|
||||
function CreateBitmapFromRawImage(const RawImage: TRawImage; var Bitmap, MaskBitmap: HBitmap; AlwaysCreateMask: boolean): boolean; override;
|
||||
function CreateBrushIndirect(const LogBrush: TLogBrush): HBRUSH; override;
|
||||
function CreateCompatibleDC(DC: HDC): HDC; override;
|
||||
|
Loading…
Reference in New Issue
Block a user