Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
TextureMetadata.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
13#pragma once
14
15// =============================================================================
16// Includes
17// =============================================================================
18
19#include "../core/Types.hpp"
20
21namespace esengine::resource {
22
23// =============================================================================
24// SliceBorder
25// =============================================================================
26
35 f32 left = 0.0f;
36 f32 right = 0.0f;
37 f32 top = 0.0f;
38 f32 bottom = 0.0f;
39
41 bool hasSlicing() const {
42 return left > 0 || right > 0 || top > 0 || bottom > 0;
43 }
44
46 bool isZero() const {
47 return left == 0 && right == 0 && top == 0 && bottom == 0;
48 }
49};
50
51// =============================================================================
52// TextureMetadata
53// =============================================================================
54
65
66} // namespace esengine::resource
Core type definitions and utilities for ESEngine.
float f32
32-bit floating point
Definition Types.hpp:59
Nine-slice border definition for UI sprites.
bool hasSlicing() const
Checks if any slicing is defined.
f32 left
Left border width in pixels.
f32 top
Top border height in pixels.
bool isZero() const
Checks if all borders are zero.
f32 bottom
Bottom border height in pixels.
f32 right
Right border width in pixels.
Metadata associated with a texture resource.
SliceBorder sliceBorder
Nine-slice border configuration.