From Appmethod Libraries
Jump to: navigation, search

Object Pascal

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


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


Type Visibility Source Unit Parent
FMX.Graphics TCanvas


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