mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 19:29:31 +02:00
fixed clipping origin in stretchblt
git-svn-id: trunk@3916 -
This commit is contained in:
parent
bcfaae2bf9
commit
fa35718574
@ -36,10 +36,10 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TBitmap.Draw(ACanvas: TCanvas; const Rect: TRect);
|
||||
procedure TBitmap.Draw(ACanvas: TCanvas; const ARect: TRect);
|
||||
begin
|
||||
HandleNeeded;
|
||||
ACanvas.CopyRect(Rect, Self.Canvas, Classes.Rect(0, 0, Width, Height));
|
||||
ACanvas.CopyRect(ARect, Self.Canvas, Rect(0, 0, Width, Height));
|
||||
end;
|
||||
|
||||
constructor TBitmap.VirtualCreate;
|
||||
@ -528,6 +528,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.28 2003/03/12 14:39:29 mattias
|
||||
fixed clipping origin in stretchblt
|
||||
|
||||
Revision 1.27 2003/03/11 07:46:43 mattias
|
||||
more localization for gtk- and win32-interface and lcl
|
||||
|
||||
|
@ -40,6 +40,7 @@ end;
|
||||
|
||||
procedure TImage.SetPicture(const AValue: TPicture);
|
||||
begin
|
||||
if FPicture=AValue then exit;
|
||||
FPicture.Assign(AValue); //the onchange of the picture gets called and notifies that something changed.
|
||||
end;
|
||||
|
||||
@ -63,18 +64,21 @@ end;
|
||||
|
||||
procedure TImage.SetStretch(Value : Boolean);
|
||||
begin
|
||||
if FStretch=Value then exit;
|
||||
FStretch := Value;
|
||||
PictureChanged(Self);
|
||||
end;
|
||||
|
||||
procedure TImage.SetTransparent(Value : Boolean);
|
||||
begin
|
||||
if FTransparent=Value then exit;
|
||||
FTransparent := Value;
|
||||
PictureChanged(Self);
|
||||
end;
|
||||
|
||||
procedure TImage.SetCenter(Value : Boolean);
|
||||
begin
|
||||
if FCenter=Value then exit;
|
||||
FCenter := Value;
|
||||
PictureChanged(Self);
|
||||
end;
|
||||
@ -118,12 +122,13 @@ begin
|
||||
exit;
|
||||
If Stretch then
|
||||
iRect := Rect(0, 0, Width + 1, Height + 1)
|
||||
else
|
||||
else begin
|
||||
iRect := Rect(0,0, Picture.Width, Picture.Height);
|
||||
If Center then
|
||||
OffsetRect(iRect,
|
||||
(Width + 1) div 2 - (iRect.Right - iRect.Left) div 2,
|
||||
(Height + 1) div 2 - (iRect.Bottom -iRect.Top) div 2);
|
||||
If Center then
|
||||
OffsetRect(iRect,
|
||||
(Width + 1) div 2 - (iRect.Right - iRect.Left) div 2,
|
||||
(Height + 1) div 2 - (iRect.Bottom -iRect.Top) div 2);
|
||||
end;
|
||||
If Picture.Graphic.Transparent and not Transparent then
|
||||
begin
|
||||
If Picture.Graphic is TBitmap then
|
||||
|
Loading…
Reference in New Issue
Block a user