TextureData
Inheritance: java.lang.Object, com.aspose.threed.A3DObject
public class TextureData extends A3DObject
Cette classe contient les données brutes et la définition du format d’une texture.
Constructeurs
| Constructeur | Description |
|---|---|
| TextureData(int width, int height, int stride, int bytesPerPixel, PixelFormat pixelFormat, byte[] data) | Constructeur de TextureData |
| TextureData(int width, int height, PixelFormat pixelFormat) | Construit un nouveau TextureData et alloue les données de pixel. |
| TextureData() | Constructeur de TextureData |
Méthodes
| Méthode | Description |
|---|---|
| equals(Object arg0) | |
| findProperty(String propertyName) | Trouve la propriété. |
| fromFile(String fileName) | Charger une texture depuis un fichier |
| fromStream(Stream stream) | Charger une texture depuis un flux |
| getBytesPerPixel() | Nombre d’octets d’un pixel |
| getClass() | |
| getData() | Octets bruts des données de pixel |
| getHeight() | Nombre de pixels verticaux |
| getName() | Obtient le nom. |
| getPixelFormat() | Le format du pixel |
| getProperties() | Obtient la collection de toutes les propriétés. |
| getProperty(String property) | Obtenir la valeur de la propriété spécifiée |
| getStride() | Nombre d’octets d’une ligne de balayage. |
| getWidth() | Nombre de pixels horizontaux |
| hashCode() | |
| mapPixels(PixelMapMode mapMode) | Mapper tous les pixels en lecture/écriture |
| mapPixels(PixelMapMode mapMode, PixelFormat format) | Mapper tous les pixels en lecture/écriture dans le format de pixel donné |
| mapPixels(Rect rect, PixelMapMode mapMode, PixelFormat format) | Mapper les pixels adressés par le rectangle pour la lecture/écriture dans le format de pixel donné |
| notify() | |
| notifyAll() | |
| removeProperty(Property property) | Supprime une propriété dynamique. |
| removeProperty(String property) | Supprime la propriété spécifiée identifiée par son nom |
| save(Stream stream, String format) | Enregistrer les données de texture dans le format d’image spécifié |
| save(String fileName) | Enregistrer les données de texture dans un fichier image |
| save(String fileName, String format) | Enregistrer les données de texture dans un fichier image |
| setName(String value) | Définit le nom. |
| setProperty(String property, Object value) | Définit la valeur de la propriété spécifiée |
| toString() | |
| transformPixelFormat(PixelFormat pixelFormat) | Transformer la disposition du pixel vers un nouveau format de pixel. |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
TextureData(int width, int height, int stride, int bytesPerPixel, PixelFormat pixelFormat, byte[] data)
public TextureData(int width, int height, int stride, int bytesPerPixel, PixelFormat pixelFormat, byte[] data)
Constructeur de TextureData
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| largeur | int | |
| hauteur | int | |
| stride | int | |
| bytesPerPixel | int | |
| pixelFormat | PixelFormat | |
| données | byte[] |
TextureData(int width, int height, PixelFormat pixelFormat)
public TextureData(int width, int height, PixelFormat pixelFormat)
Construit un nouveau TextureData et alloue les données de pixel.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| largeur | int | |
| hauteur | int | |
| pixelFormat | PixelFormat |
TextureData()
public TextureData()
Constructeur de TextureData
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
findProperty(String propertyName)
public Property findProperty(String propertyName)
Trouve la propriété. Elle peut être une propriété dynamique (Créée par CreateDynamicProperty/SetProperty) ou une propriété native (Identifiée par son nom)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| propertyName | java.lang.String | Nom de la propriété. |
Returns: Property - The property.
fromFile(String fileName)
public static TextureData fromFile(String fileName)
Charger une texture depuis un fichier
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| fileName | java.lang.String |
Returns: TextureData
fromStream(Stream stream)
public static TextureData fromStream(Stream stream)
Charger une texture depuis un flux
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| stream | Stream |
Returns: TextureData
getBytesPerPixel()
public int getBytesPerPixel()
Nombre d’octets d’un pixel
Returns: int - Nombre d’octets d’un pixel
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getData()
public byte[] getData()
Octets bruts des données de pixel
Returns: byte[] - Octets bruts des données du pixel
getHeight()
public int getHeight()
Nombre de pixels verticaux
Returns: int - Nombre de pixels verticaux
getName()
public String getName()
Obtient le nom.
Returns: java.lang.String - le nom.
getPixelFormat()
public PixelFormat getPixelFormat()
Le format du pixel
Returns: PixelFormat - The pixel’s format
getProperties()
public PropertyCollection getProperties()
Obtient la collection de toutes les propriétés.
Returns: PropertyCollection - the collection of all properties.
getProperty(String property)
public Object getProperty(String property)
Obtenir la valeur de la propriété spécifiée
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| propriété | java.lang.String | Nom de la propriété |
Returns: java.lang.Object - La valeur de la propriété trouvée
getStride()
public int getStride()
Nombre d’octets d’une ligne de balayage.
Returns: int - Nombre d’octets d’une ligne de balayage.
getWidth()
public int getWidth()
Nombre de pixels horizontaux
Returns: int - Nombre de pixels horizontaux
hashCode()
public native int hashCode()
Returns: int
mapPixels(PixelMapMode mapMode)
public PixelMapping mapPixels(PixelMapMode mapMode)
Mapper tous les pixels en lecture/écriture
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| mapMode | PixelMapMode | Mode de mappage |
Returns: PixelMapping
mapPixels(PixelMapMode mapMode, PixelFormat format)
public PixelMapping mapPixels(PixelMapMode mapMode, PixelFormat format)
Mapper tous les pixels en lecture/écriture dans le format de pixel donné
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| mapMode | PixelMapMode | Mode de mappage |
| format | PixelFormat | Format de pixel |
Returns: PixelMapping
mapPixels(Rect rect, PixelMapMode mapMode, PixelFormat format)
public PixelMapping mapPixels(Rect rect, PixelMapMode mapMode, PixelFormat format)
Mapper les pixels adressés par le rectangle pour la lecture/écriture dans le format de pixel donné
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| rect | Rect | La zone de pixels à accéder |
| mapMode | PixelMapMode | Mode de mappage |
| format | PixelFormat | Format de pixel |
Returns: PixelMapping - Returns a mapping object, it should be disposed when no longer needed.
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
removeProperty(Property property)
public boolean removeProperty(Property property)
Supprime une propriété dynamique.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| property | Property | Quelle propriété supprimer |
Returns: boolean - vrai si la propriété est supprimée avec succès
removeProperty(String property)
public boolean removeProperty(String property)
Supprime la propriété spécifiée identifiée par son nom
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| propriété | java.lang.String | Quelle propriété supprimer |
Returns: boolean - vrai si la propriété est supprimée avec succès
save(Stream stream, String format)
public void save(Stream stream, String format)
Enregistrer les données de texture dans le format d’image spécifié
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| stream | Stream | Le flux qui contient l’image enregistrée |
| format | java.lang.String | Format d’image, généralement l’extension du fichier |
save(String fileName)
public void save(String fileName)
Enregistrer les données de texture dans un fichier image
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| fileName | java.lang.String | Le nom de fichier où l’image sera enregistrée. |
save(String fileName, String format)
public void save(String fileName, String format)
Enregistrer les données de texture dans un fichier image
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| fileName | java.lang.String | Le nom de fichier où l’image sera enregistrée. |
| format | java.lang.String | Format d’image du fichier de sortie. |
setName(String value)
public void setName(String value)
Définit le nom.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| valeur | java.lang.String | Nouvelle valeur |
setProperty(String property, Object value)
public void setProperty(String property, Object value)
Définit la valeur de la propriété spécifiée
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| propriété | java.lang.String | Nom de la propriété |
| valeur | java.lang.Object | La valeur de la propriété |
toString()
public String toString()
Returns: java.lang.String
transformPixelFormat(PixelFormat pixelFormat)
public void transformPixelFormat(PixelFormat pixelFormat)
Transformer la disposition du pixel vers un nouveau format de pixel.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| pixelFormat | PixelFormat | Format de pixel de destination |
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| arg0 | long | |
| arg1 | int |