TextureData
Contenu
[
Cacher
]TextureData class
Cette classe contient les données brutes et la définition du format d’une texture.
Méthodes
constructor
| Nom | Description |
|---|---|
| constructeur(width, height, stride, bytesPerPixel, pixelFormat, data) | Constructeur de TextureData |
Parameters:
| Nom | Type | Description |
|---|---|---|
| widt | Nombre | null |
| heigh | Nombre | null |
| strid | Nombre | null |
| bytesPerPixe | Nombre | null |
| pixelFormat | PixelFormat | PixelFormat |
| dat | byte[] | null |
Result:
constructor_overload
| Nom | Description |
|---|---|
| constructeur_surcharge(width, height, pixelFormat) | Construit un nouveau TextureData et alloue les données de pixels. |
Parameters:
| Nom | Type | Description |
|---|---|---|
| widt | Nombre | null |
| heigh | Nombre | null |
| pixelFormat | PixelFormat | PixelFormat |
Result:
constructor_overload2
| Nom | Description |
|---|---|
| constructeur_surcharge2() | Constructeur de TextureData |
Result:
getData
| Nom | Description |
|---|---|
| getData() | Octets bruts des données de pixels |
Result:
getWidth
| Nom | Description |
|---|---|
| getWidth() | Nombre de pixels horizontaux |
Result:
getHeight
| Nom | Description |
|---|---|
| getHeight() | Nombre de pixels verticaux |
Result:
getStride
| Nom | Description |
|---|---|
| getStride() | Nombre d’octets d’une ligne de balayage. |
Result:
getBytesPerPixel
| Nom | Description |
|---|---|
| getBytesPerPixel() | Nombre d’octets d’un pixel |
Result:
getPixelFormat
| Nom | Description |
|---|---|
| getPixelFormat() | Le format du pixel. La valeur de la propriété est la constante entière PixelFormat. |
Result:
fromFile
| Nom | Description |
|---|---|
| depuisFichier(fileName) | Charge une texture depuis un fichier |
Parameters:
| Nom | Type | Description |
|---|---|---|
| fileNam | String | null |
Result: TextureData
save
| Nom | Description |
|---|---|
| save(fileName) | Enregistrer les données de texture dans un fichier image |
Parameters:
| Nom | Type | Description |
|---|---|---|
| fileName | String | Le nom du fichier où l’image sera enregistrée. |
Result: TextureData
save
| Nom | Description |
|---|---|
| save(fileName, format) | Enregistrer les données de texture dans un fichier image |
Parameters:
| Nom | Type | Description |
|---|---|---|
| fileName | String | Le nom du fichier où l’image sera enregistrée. |
| format | String | Format d’image du fichier de sortie. |
Result: TextureData
mapPixels
| Nom | Description |
|---|---|
| mapPixels(mapMode) | Mapper tous les pixels pour la lecture/écriture |
Parameters:
| Nom | Type | Description |
|---|---|---|
| mapMode | PixelMapMode | PixelMapMode |
Result: PixelMapping
mapPixels
| Nom | Description |
|---|---|
| mapPixels(mapMode, format) | Mapper tous les pixels pour la lecture/écriture dans le format de pixel donné |
Parameters:
| Nom | Type | Description |
|---|---|---|
| mapMode | PixelMapMode | PixelMapMode |
| format | PixelFormat | PixelFormat |
Result: PixelMapping
mapPixels
| Nom | Description |
|---|---|
| mapPixels(rect, mapMode, format) | Mapper les pixels délimités par rect pour la lecture/écriture dans le format de pixel donné |
Parameters:
| Nom | Type | Description |
|---|---|---|
| rect | Rect | La zone de pixels à accéder |
| mapMode | PixelMapMode | PixelMapMode |
| format | PixelFormat | PixelFormat |
Result: PixelMapping
transformPixelFormat
| Nom | Description |
|---|---|
| transformPixelFormat(pixelFormat) | Transformer la disposition du pixel vers un nouveau format de pixel. |
Parameters:
| Nom | Type | Description |
|---|---|---|
| pixelFormat | PixelFormat | PixelFormat |
Result: PixelMapping