FMX.Graphics.TCanvas.DrawBitmap

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DrawBitmap(const ABitmap: TBitmap; const SrcRect, DstRect: TRectF; const AOpacity: Single;  const HighSpeed: Boolean = False);

C++

void __fastcall DrawBitmap(TBitmap* const ABitmap, const System::Types::TRectF &SrcRect, const System::Types::TRectF &DstRect, const float AOpacity, const bool HighSpeed = false);

Properties

Type Visibility Source Unit Parent
procedure
function
public
FMX.Graphics.pas
FMX.Graphics.hpp
FMX.Graphics TCanvas

Description

Draws a specified area from a TBitmap image after scaling it to a specified area of the TCanvas.

DrawBitmap is implemented by the TCanvas descendants to draw a specified rectangle area from a TBitmap image. The drawing is made to a specified rectangle area of the TCanvas. Before drawing, it scales the source image to the size of destination area.

The ABitmap parameter specifies the TBitmap.

The SrcRect parameter specifies the rectangle area of ABitmap to be scaled and drawn.

The DstRect parameter specifies the destination rectangle area where to draw the selection from ABitmap.

The AOpacity parameter specifies the transparency to be applied to the selection of ABitmap.

The HighSpeed parameter specifies the interpolation mode to use if the selected area of ABitmap is scaled by the drawing operation.

DrawBitmap does nothing if ABitmap is empty. DrawBitmap does not raise any errors in this case.

See Also

Code Examples