-
Notifications
You must be signed in to change notification settings - Fork 0
Texture2D
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.Texture2D |
| Namespace | Electron2D |
| Kind | class |
| Category | Rendering |
Provides the Electron2D base resource for 2D textures.
public abstract class Electron2D.Texture2D : Electron2D.ResourceTexture2D describes texture metadata and transparency queries. Concrete
texture loaders and image-backed texture classes are intentionally separate
from this base type.
Electron2D 0.1.0 Preview does not expose image import through this type. PNG/JPEG import and concrete image texture creation are handled by later resource pipeline tasks.
Read-only metadata queries are safe to call from any thread when the concrete texture implementation is immutable.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.AtlasTexture
| Member | Kind | Summary |
|---|---|---|
Electron2D.Texture2D() |
Constructor | Initializes a new instance of the Texture2D type. |
GetHeight() |
Method | Gets the texture height in pixels. |
GetMipmapCount() |
Method | Gets the number of mipmap levels available on this texture. |
GetSize() |
Method | Gets the texture size in pixels. |
GetWidth() |
Method | Gets the texture width in pixels. |
HasAlpha() |
Method | Checks whether the texture contains an alpha channel. |
HasMipmaps() |
Method | Checks whether the texture contains mipmaps. |
IsPixelOpaque(System.Int32, System.Int32) |
Method | Checks whether a texture pixel is fully opaque. |
Kind: Constructor
public Electron2D.Texture2D()Initializes a new instance of the Texture2D type.
The new instance follows the lifetime and validation rules of its declaring type.
This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.
This API is available since Electron2D 0.1.0 Preview.
Electron2D.Texture2D
Kind: Method
public System.Int32 GetHeight()()Gets the texture height in pixels.
This method follows the validation and lifetime rules of its declaring type.
The texture height in pixels, or 0 for an empty texture.
This method is safe to call from any thread when the concrete texture is immutable.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Texture2D
Kind: Method
public System.Int32 GetMipmapCount()()Gets the number of mipmap levels available on this texture.
This method follows the validation and lifetime rules of its declaring type.
The number of mipmap levels, or 0 when no mipmaps are available.
This method is safe to call from any thread when the concrete texture is immutable.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Texture2D.HasMipmaps
Kind: Method
public Electron2D.Vector2 GetSize()()Gets the texture size in pixels.
This method follows the validation and lifetime rules of its declaring type.
A vector whose X component is the width and Y component is the height.
This method is safe to call from any thread when the concrete texture is immutable.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Texture2D.GetHeightElectron2D.Texture2D.GetWidth
Kind: Method
public System.Int32 GetWidth()()Gets the texture width in pixels.
This method follows the validation and lifetime rules of its declaring type.
The texture width in pixels, or 0 for an empty texture.
This method is safe to call from any thread when the concrete texture is immutable.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Texture2D
Kind: Method
public System.Boolean HasAlpha()()Checks whether the texture contains an alpha channel.
This method follows the validation and lifetime rules of its declaring type.
true if the texture has an alpha channel; otherwise, false.
This method is safe to call from any thread when the concrete texture is immutable.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Texture2D
Kind: Method
public System.Boolean HasMipmaps()()Checks whether the texture contains mipmaps.
This method follows the validation and lifetime rules of its declaring type.
true if the texture has mipmaps; otherwise, false.
This method is safe to call from any thread when the concrete texture is immutable.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Texture2D.GetMipmapCount
Kind: Method
public System.Boolean IsPixelOpaque(System.Int32, System.Int32)(System.Int32 x, System.Int32 y)Checks whether a texture pixel is fully opaque.
The base implementation treats textures without alpha as opaque inside their bounds and treats alpha textures as not opaque unless a concrete implementation overrides the query.
-
x: The pixel X coordinate in texture space. -
y: The pixel Y coordinate in texture space.
true if the pixel is inside the texture and fully opaque; otherwise, false.
This method is safe to call from any thread when the concrete texture is immutable.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Texture2D.HasAlpha
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.