mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-24 16:59:12 +02:00
git-svn-id: trunk@23730 -
This commit is contained in:
parent
f02277ba95
commit
bcd8ed3042
@ -2818,6 +2818,7 @@ procedure TQtDeviceContext.drawImage(targetRect: PRect;
|
|||||||
mask: QImageH; maskRect: PRect; flags: QtImageConversionFlags = QtAutoColor);
|
mask: QImageH; maskRect: PRect; flags: QtImageConversionFlags = QtAutoColor);
|
||||||
var
|
var
|
||||||
LocalRect: TRect;
|
LocalRect: TRect;
|
||||||
|
R: TRect;
|
||||||
APixmap, ATemp: QPixmapH;
|
APixmap, ATemp: QPixmapH;
|
||||||
AMask: QBitmapH;
|
AMask: QBitmapH;
|
||||||
ScaledImage: QImageH;
|
ScaledImage: QImageH;
|
||||||
@ -2826,6 +2827,17 @@ begin
|
|||||||
Write('TQtDeviceContext.drawImage() ');
|
Write('TQtDeviceContext.drawImage() ');
|
||||||
{$endif}
|
{$endif}
|
||||||
LocalRect := targetRect^;
|
LocalRect := targetRect^;
|
||||||
|
R := getClipRegion.getBoundingRect;
|
||||||
|
{cannot draw on empty rect - no bounding rect}
|
||||||
|
if IsRectEmpty(R) then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
{if clip region is smaller than target rect then
|
||||||
|
target rect should be clip rect}
|
||||||
|
if ((R.Right - R.Left) < (LocalRect.Right - LocalRect.Left)) and
|
||||||
|
((R.Bottom - R.Top) < (LocalRect.Bottom - LocalRect.Top)) then
|
||||||
|
LocalRect := R;
|
||||||
|
|
||||||
if mask <> nil then
|
if mask <> nil then
|
||||||
begin
|
begin
|
||||||
// TODO: check maskRect
|
// TODO: check maskRect
|
||||||
@ -2856,7 +2868,6 @@ begin
|
|||||||
results with RGB32 images on Linux and Win32 if DstRect <> sourceRect.
|
results with RGB32 images on Linux and Win32 if DstRect <> sourceRect.
|
||||||
Explanation: Look at #11713 linux & win screenshoots.
|
Explanation: Look at #11713 linux & win screenshoots.
|
||||||
Note: This is slower operation than QImage_scaled() we used before.}
|
Note: This is slower operation than QImage_scaled() we used before.}
|
||||||
|
|
||||||
if not EqualRect(LocalRect, sourceRect^) and
|
if not EqualRect(LocalRect, sourceRect^) and
|
||||||
(QImage_format(Image) = QImageFormat_RGB32) then
|
(QImage_format(Image) = QImageFormat_RGB32) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user