Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::resource::SliceBorder Struct Reference

Nine-slice border definition for UI sprites. More...

#include <TextureMetadata.hpp>

Public Member Functions

bool hasSlicing () const
 Checks if any slicing is defined.
bool isZero () const
 Checks if all borders are zero.

Public Attributes

f32 left = 0.0f
 Left border width in pixels.
f32 right = 0.0f
 Right border width in pixels.
f32 top = 0.0f
 Top border height in pixels.
f32 bottom = 0.0f
 Bottom border height in pixels.

Detailed Description

Nine-slice border definition for UI sprites.

Defines the border widths in pixels for nine-slice rendering. When a texture has non-zero slice borders, sprites using it will be rendered as 9 quads, preserving corner regions.

Definition at line 34 of file TextureMetadata.hpp.

Member Function Documentation

◆ hasSlicing()

bool esengine::resource::SliceBorder::hasSlicing ( ) const
inline

Checks if any slicing is defined.

Definition at line 41 of file TextureMetadata.hpp.

References bottom, left, right, and top.

◆ isZero()

bool esengine::resource::SliceBorder::isZero ( ) const
inline

Checks if all borders are zero.

Definition at line 46 of file TextureMetadata.hpp.

References bottom, left, right, and top.

Member Data Documentation

◆ bottom

f32 esengine::resource::SliceBorder::bottom = 0.0f

Bottom border height in pixels.

Definition at line 38 of file TextureMetadata.hpp.

Referenced by esengine::SpritePlugin::collect(), hasSlicing(), isZero(), and esengine::rm_setTextureMetadata().

◆ left

f32 esengine::resource::SliceBorder::left = 0.0f

Left border width in pixels.

Definition at line 35 of file TextureMetadata.hpp.

Referenced by esengine::SpritePlugin::collect(), hasSlicing(), isZero(), and esengine::rm_setTextureMetadata().

◆ right

f32 esengine::resource::SliceBorder::right = 0.0f

Right border width in pixels.

Definition at line 36 of file TextureMetadata.hpp.

Referenced by esengine::SpritePlugin::collect(), hasSlicing(), isZero(), and esengine::rm_setTextureMetadata().

◆ top

f32 esengine::resource::SliceBorder::top = 0.0f

Top border height in pixels.

Definition at line 37 of file TextureMetadata.hpp.

Referenced by esengine::SpritePlugin::collect(), hasSlicing(), isZero(), and esengine::rm_setTextureMetadata().


The documentation for this struct was generated from the following file: