FMX.Graphics.TBitmapData

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

  TBitmapData = record
  private
    FPixelFormat: TPixelFormat;
    FWidth: Integer;
    FHeight: Integer;
    function GetBytesPerPixel: Integer;
    function GetBytesPerLine: Integer;
  public
    Data: Pointer;
    Pitch: Integer;
    constructor Create(const AWidth, AHeight: Integer; const APixelFormat: TPixelFormat);
    function GetPixel(const X, Y: Integer): TAlphaColor;
    procedure SetPixel(const X, Y: Integer; const AColor: TAlphaColor);
    procedure Copy(const Source: TBitmapData);
    function GetScanline(const I: Integer): Pointer;
    function GetPixelAddr(const I, J: Integer): Pointer;
    property PixelFormat: TPixelFormat read FPixelFormat;
    property BytesPerPixel: Integer read GetBytesPerPixel;
    property BytesPerLine: Integer read GetBytesPerLine;
    property Width: Integer read FWidth;
    property Height: Integer read FHeight;
  end;

C++

struct DECLSPEC_DRECORD TBitmapData
{
private:
    Fmx::Types::TPixelFormat FPixelFormat;
    int FWidth;
    int FHeight;
    int __fastcall GetBytesPerPixel();
    int __fastcall GetBytesPerLine();
public:
    void *Data;
    int Pitch;
    __fastcall TBitmapData(const int AWidth, const int AHeight, const Fmx::Types::TPixelFormat APixelFormat);
    System::Uitypes::TAlphaColor __fastcall GetPixel(const int X, const int Y);
    void __fastcall SetPixel(const int X, const int Y, const System::Uitypes::TAlphaColor AColor);
    void __fastcall Copy(const TBitmapData &Source);
    void * __fastcall GetScanline(const int I);
    void * __fastcall GetPixelAddr(const int I, const int J);
    __property Fmx::Types::TPixelFormat PixelFormat = {read=FPixelFormat};
    __property int BytesPerPixel = {read=GetBytesPerPixel};
    __property int BytesPerLine = {read=GetBytesPerLine};
    __property int Width = {read=FWidth};
    __property int Height = {read=FHeight};
    TBitmapData() {}
};

Propriétés

Type Visibilité  Source Unité  Parent
record
struct
public
FMX.Graphics.pas
FMX.Graphics.hpp
FMX.Graphics FMX.Graphics

Description

Décrit une donnée bitmap.

TBitmapData est un enregistrement qui contient les attributs et les méthodes utiles pour les données bitmap.

Membre Description

Data

Est un pointeur sur la donnée bitmap.

Pitch

Spécifie le pas de lecture pour Data.

PixelFormat

Spécifie le format interne des pixels du bitmap en cours.

GetPixel

Renvoie la couleur d'un pixel spécifié.

SetPixel

Définit la couleur d'un pixel spécifié.

Voir aussi