|
@@ -92,7 +92,8 @@ type
|
|
|
procedure TextOut(const aLeft, aTop: TFresnelLength;
|
|
|
const aFont: IFresnelFont; const aColor: TFPColor;
|
|
|
const aText: string); override;
|
|
|
- procedure DrawImage(const aLeft, aTop, aWidth, aHeight: TFresnelLength; const aImage: TFPCustomImage); override;
|
|
|
+ procedure DrawImage(const aLeft, aTop, aWidth, aHeight: TFresnelLength;
|
|
|
+ const aImage: TFPCustomImage); override;
|
|
|
|
|
|
property Canvas: TCanvas read FCanvas write FCanvas;
|
|
|
end;
|
|
@@ -355,22 +356,25 @@ begin
|
|
|
Canvas.TextOut(round(Origin.X+aLeft),round(Origin.Y+aTop),aText);
|
|
|
end;
|
|
|
|
|
|
-procedure TFresnelLCLRenderer.DrawImage(const aLeft, aTop, aWidth, aHeight: TFresnelLength; const aImage: TFPCustomImage);
|
|
|
-
|
|
|
+procedure TFresnelLCLRenderer.DrawImage(const aLeft, aTop, aWidth, aHeight: TFresnelLength;
|
|
|
+ const aImage: TFPCustomImage);
|
|
|
var
|
|
|
- Img : TRasterImage;
|
|
|
+ Img : TBitmap;
|
|
|
R : TRect;
|
|
|
-
|
|
|
begin
|
|
|
R.Left:=Round(Origin.X+aLeft);
|
|
|
R.Top:=Round(Origin.Y+aTop);
|
|
|
- R.Width:=Round(aWidth);
|
|
|
- R.Height:=Round(aHeight);
|
|
|
+ R.Right:=Round(Origin.X+aLeft+aWidth);
|
|
|
+ R.Bottom:=Round(Origin.Y+aTop+aHeight);
|
|
|
if R.IsEmpty then exit;
|
|
|
|
|
|
Img:=TBitmap.Create;
|
|
|
try
|
|
|
- Img.Assign(aImage);
|
|
|
+ Img.PixelFormat:=pf32bit;
|
|
|
+ if aImage is TLazIntfImage then
|
|
|
+ Img.LoadFromIntfImage(TLazIntfImage(aImage))
|
|
|
+ else
|
|
|
+ Img.Assign(aImage);
|
|
|
Canvas.StretchDraw(R,Img);
|
|
|
finally
|
|
|
Img.Free;
|