FMX.Graphics.TBitmap.Map
Delphi
function Map(const Access: TMapAccess; var Data: TBitmapData): Boolean;
C++
bool __fastcall Map(const TMapAccess Access, TBitmapData &Data);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | FMX.Graphics.pas FMX.Graphics.hpp |
FMX.Graphics | TBitmap |
Description
Gets direct access to the bitmap data of the current TBitmap.
Access
specifies the type of access.
Data
specifies the TBitmapData to which the data of the current bitmap is mapped.
Use Map to get access to the data of the current bitmap. Map returns True if the access succeeded, and False otherwise. To manipulate the current bitmap data, use the Data and Pitch attributes of Data
, and the routines in the FMX.Types.TPixelFormat unit. The routines in FMX.Types.TPixelFormat allow manipulating Data
as pixels or as TAlphaColor. To end the customizing session of the current bitmap, call Unmap. Any session opened with a Map call must be closed with an Unmap call.
The access to the bitmap data can be:
- Read-only: the current bitmap does not change if the
Data
is changed. - Write-only: the current
Data
cannot be read but it can be changed. - Read and write: the
Data
can be read and, if modified, the current bitmap is also modified.
See Also
- FMX.Graphics.TBitmap.PixelFormat
- FMX.Graphics.TBitmapData
- FMX.Graphics.TMapAccess
- FMX.Graphics.TBitmap.Unmap
- FMX.Types.TPixelFormat