JCL Help:TJclBitmap32.Draw@Integer@Integer@TJclBitmap32

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Renders the bitmap.


Pascal

 public procedure Draw(DstX: Integer; DstY: Integer; Src: TJclBitmap32); overload;
public procedure Draw(DstRect: TRect; SrcRect: TRect; Src: TJclBitmap32); overload;
public procedure Draw(DstRect: TRect; SrcRect: TRect; hSrc: HDC); overload;


Description

Renders the image specified by Src/hSrc parameter at the location given by the coordinates (DstX, DstY) or the DstRect rectangle.
The method provides both: block transfer (versions with DstX, DstY Parameters) and stretching (versions with DstRect parameter).
When the source is another TJclBitmap32 object (Src parameter), the method uses Src.DrawMode do determine how it should be blended with the background, and if stretching, Src.StretchFilter specifies how the image should be stretched.
The version with hSrc parameter, is introduced mainly for compatibility reasons. You may use it to transfer data from bitmaps with other formats, or any other windows objects that have device handle (DC). It is based on StretchDIBits GDI call, it does not support transparency and always uses nearest neighbor interpolation when stretching.
The Dst parameter must not be necessarily some other bitmap. In fact, it is possible to copy/stretch areas inside the same bitmap that calls the Draw method. However, in this case, if source and destination areas intersect, the result is not specified (this is a limitation of the current version).


See Also

BlockTransfer DrawMode DrawTo StretchFilter StretchTransfer TJclBitmap32 TRect


About

Donator

Alex Denissov


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page