Skip to content

AtlasTexture

Eduard Gushchin edited this page Jun 24, 2026 · 5 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.AtlasTexture
Namespace Electron2D
Kind class
Category Rendering

Overview

Provides an Electron2D texture that draws a region of another Electron2D.Texture2D.

Syntax

public sealed class Electron2D.AtlasTexture : Electron2D.Texture2D

Godot 4.7 C# profile compatibility

Profile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: AtlasTexture

Atlas region resource with atlas, region, margin, filter clip and transparency delegation.

Remarks

Multiple 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.

Thread Safety

Read-only queries are safe to call from any thread when the referenced atlas texture is immutable and no thread is mutating this resource.

Since

This type is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Texture2D

Members

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.

Member Details

Atlas

Kind: Property

public Electron2D.Texture2D Atlas { get; set; }

Summary

Gets or sets the texture that contains this atlas region.

Remarks

The atlas can be any Electron2D.Texture2D, including another Electron2D.AtlasTexture. When this property is null, this resource reports an empty texture.

Value

The current atlas value.

Thread Safety

This property is not synchronized. Mutate it during loading or on the main thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.AtlasTexture

FilterClip

Kind: Property

public System.Boolean FilterClip { get; set; }

Summary

Gets or sets whether sampling outside the region is clipped to reduce bleeding.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current filter clip value.

Thread Safety

This property is not synchronized. Mutate it during loading or on the main thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.AtlasTexture

Margin

Kind: Property

public Electron2D.Rect2 Margin { get; set; }

Summary

Gets or sets the margin around the atlas region.

Remarks

A non-zero margin can be used by future drawing code to adjust the placement of the region without changing the sampled atlas rectangle.

Value

The current margin value.

Thread Safety

This property is not synchronized. Mutate it during loading or on the main thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.AtlasTexture

Region

Kind: Property

public Electron2D.Rect2 Region { get; set; }

Summary

Gets or sets the rectangle in the atlas texture that this resource draws.

Remarks

If a region width or height is 0, the corresponding size from the atlas texture is used for that axis.

Value

The current region value.

Thread Safety

This property is not synchronized. Mutate it during loading or on the main thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.AtlasTexture

Electron2D.AtlasTexture()

Kind: Constructor

public Electron2D.AtlasTexture()

Summary

Initializes a new instance of the AtlasTexture type.

Remarks

The new instance follows the lifetime and validation rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.AtlasTexture

GetHeight()

Kind: Method

public System.Int32 GetHeight()()

Summary

Gets the height value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The current height value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.AtlasTexture

GetMipmapCount()

Kind: Method

public System.Int32 GetMipmapCount()()

Summary

Gets the mipmap count value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The current mipmap count value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.AtlasTexture

GetWidth()

Kind: Method

public System.Int32 GetWidth()()

Summary

Gets the width value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The current width value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.AtlasTexture

HasAlpha()

Kind: Method

public System.Boolean HasAlpha()()

Summary

Checks whether alpha is available.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

true when the condition is met; otherwise, false.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.AtlasTexture

HasMipmaps()

Kind: Method

public System.Boolean HasMipmaps()()

Summary

Checks whether mipmaps is available.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

true when the condition is met; otherwise, false.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.AtlasTexture

IsPixelOpaque(System.Int32, System.Int32)

Kind: Method

public System.Boolean IsPixelOpaque(System.Int32, System.Int32)(System.Int32 x, System.Int32 y)

Summary

Checks whether pixel opaque is true.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • x: The X coordinate or component.
  • y: The Y coordinate or component.

Returns

true when the condition is met; otherwise, false.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.AtlasTexture

Clone this wiki locally