-
Notifications
You must be signed in to change notification settings - Fork 0
AtlasTexture
Namespace: Electron2D
Provides an Electron2D texture that draws a region of another Electron2D.Texture2D.
public sealed class Electron2D.AtlasTexture : Electron2D.Texture2DMultiple atlas textures can reference the same atlas resource. This is useful for packing many small sprites into one larger texture while preserving a separate resource object for each region.
Read-only queries are safe to call from any thread when the referenced atlas texture is immutable and no thread is mutating this resource.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.Texture2D
| Member | Kind | Summary |
|---|---|---|
Atlas |
Property | Gets or sets the texture that contains this atlas region. |
FilterClip |
Property | Gets or sets whether sampling outside the region is clipped to reduce bleeding. |
Margin |
Property | Gets or sets the margin around the atlas region. |
Region |
Property | Gets or sets the rectangle in the atlas texture that this resource draws. |
Electron2D.AtlasTexture() |
Constructor | Initializes a new instance of the AtlasTexture type. |
GetHeight() |
Method | Gets the height value. |
GetMipmapCount() |
Method | Gets the mipmap count value. |
GetWidth() |
Method | Gets the width value. |
HasAlpha() |
Method | Checks whether alpha is available. |
HasMipmaps() |
Method | Checks whether mipmaps is available. |
IsPixelOpaque(System.Int32, System.Int32) |
Method | Checks whether pixel opaque is true. |
Kind: Property
public Electron2D.Texture2D Atlas { get; set; }Gets or sets the texture that contains this atlas region.
The atlas can be any Electron2D.Texture2D, including another
Electron2D.AtlasTexture. When this property is null, this
resource reports an empty texture.
The current atlas value.
This property is not synchronized. Mutate it during loading or on the main thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.AtlasTexture
Kind: Property
public System.Boolean FilterClip { get; set; }Gets or sets whether sampling outside the region is clipped to reduce bleeding.
This property follows the validation and lifetime rules of its declaring type.
The current filter clip value.
This property is not synchronized. Mutate it during loading or on the main thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.AtlasTexture
Kind: Property
public Electron2D.Rect2 Margin { get; set; }Gets or sets the margin around the atlas region.
A non-zero margin can be used by future drawing code to adjust the placement of the region without changing the sampled atlas rectangle.
The current margin value.
This property is not synchronized. Mutate it during loading or on the main thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.AtlasTexture
Kind: Property
public Electron2D.Rect2 Region { get; set; }Gets or sets the rectangle in the atlas texture that this resource draws.
If a region width or height is 0, the corresponding size from the
atlas texture is used for that axis.
The current region value.
This property is not synchronized. Mutate it during loading or on the main thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.AtlasTexture
Kind: Constructor
public Electron2D.AtlasTexture()Initializes a new instance of the AtlasTexture 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.AtlasTexture
Kind: Method
public System.Int32 GetHeight()()Gets the height value.
This method follows the validation and lifetime rules of its declaring type.
The current height value.
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.AtlasTexture
Kind: Method
public System.Int32 GetMipmapCount()()Gets the mipmap count value.
This method follows the validation and lifetime rules of its declaring type.
The current mipmap count value.
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.AtlasTexture
Kind: Method
public System.Int32 GetWidth()()Gets the width value.
This method follows the validation and lifetime rules of its declaring type.
The current width value.
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.AtlasTexture
Kind: Method
public System.Boolean HasAlpha()()Checks whether alpha is available.
This method follows the validation and lifetime rules of its declaring type.
true when the condition is met; otherwise, false.
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.AtlasTexture
Kind: Method
public System.Boolean HasMipmaps()()Checks whether mipmaps is available.
This method follows the validation and lifetime rules of its declaring type.
true when the condition is met; otherwise, false.
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.AtlasTexture
Kind: Method
public System.Boolean IsPixelOpaque(System.Int32, System.Int32)(System.Int32 x, System.Int32 y)Checks whether pixel opaque is true.
This method follows the validation and lifetime rules of its declaring type.
-
x: The X coordinate or component. -
y: The Y coordinate or component.
true when the condition is met; otherwise, false.
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.AtlasTexture
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.