mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 20:19:24 +02:00
LCL: Undo r59715 #4ae9277231, 59722 #eb0a09cc7e (not working)
git-svn-id: trunk@59852 -
This commit is contained in:
parent
a984fbbfc5
commit
3797b36c48
@ -41,7 +41,6 @@ procedure DrawGradientWindow(Canvas: TCanvas; WindowRect: TRect; TitleHeight: In
|
|||||||
{ Stretch-draw a bitmap in an anti-aliased way }
|
{ Stretch-draw a bitmap in an anti-aliased way }
|
||||||
procedure AntiAliasedStretchDrawBitmap(SourceBitmap, DestBitmap: TCustomBitmap;
|
procedure AntiAliasedStretchDrawBitmap(SourceBitmap, DestBitmap: TCustomBitmap;
|
||||||
DestWidth, DestHeight: integer);
|
DestWidth, DestHeight: integer);
|
||||||
procedure AntiAliasedStretchBitmap(ABitmap: TCustomBitmap; AWidth, AHeight: Integer);
|
|
||||||
|
|
||||||
{ Draw arrows }
|
{ Draw arrows }
|
||||||
type TScrollDirection=(sdLeft,sdRight,sdUp,sdDown);
|
type TScrollDirection=(sdLeft,sdRight,sdUp,sdDown);
|
||||||
@ -445,38 +444,6 @@ begin
|
|||||||
DrawVerticalGradient(Canvas, WindowRect, GetHighLightColor(BaseColor), GetShadowColor(BaseColor));
|
DrawVerticalGradient(Canvas, WindowRect, GetHighLightColor(BaseColor), GetShadowColor(BaseColor));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure AntiAliasedStretchBitmap(ABitmap: TCustomBitmap;
|
|
||||||
AWidth, AHeight: Integer);
|
|
||||||
var
|
|
||||||
SrcImg, DestImg: TLazIntfImage;
|
|
||||||
DestCanvas: TLazCanvas;
|
|
||||||
begin
|
|
||||||
SrcImg := ABitmap.CreateIntfImage;
|
|
||||||
try
|
|
||||||
DestImg := TLazIntfImage.Create(0, 0);
|
|
||||||
DestImg.LoadFromBitmap(ABitmap.Handle, ABitmap.MaskHandle);
|
|
||||||
try
|
|
||||||
DestCanvas := TLazCanvas.Create(DestImg);
|
|
||||||
try
|
|
||||||
DestCanvas.Interpolation := TFPBaseInterpolation.Create;
|
|
||||||
try
|
|
||||||
DestCanvas.StretchDraw(0, 0, AWidth, AHeight, SrcImg);
|
|
||||||
ABitmap.LoadFromIntfImage(DestImg);
|
|
||||||
ABitmap.SetSize(AWidth, AHeight);
|
|
||||||
finally
|
|
||||||
DestCanvas.Interpolation.Free;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
DestCanvas.Free;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
DestImg.Free;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
SrcImg.Free;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure AntiAliasedStretchDrawBitmap(SourceBitmap, DestBitmap: TCustomBitmap;
|
procedure AntiAliasedStretchDrawBitmap(SourceBitmap, DestBitmap: TCustomBitmap;
|
||||||
DestWidth, DestHeight: integer);
|
DestWidth, DestHeight: integer);
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user