JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
jngl
Alpha.hpp
Go to the documentation of this file.
1
// Copyright 2024 Jan Niklas Hasse <jhasse@bixense.com>
2
// For conditions of distribution and use, see copyright notice in LICENSE.txt
5
#pragma once
6
7
#include <
cstdint
>
8
9
namespace
jngl
{
11
class
Alpha
{
12
public
:
16
explicit
Alpha
(
float
alpha);
17
18
static
Alpha
u8
(uint8_t alpha);
19
21
[[nodiscard]] uint8_t
u8
()
const
;
22
24
float
getAlpha
()
const
;
26
void
setAlpha
(
float
);
27
28
private
:
29
float
alpha;
30
};
31
32
}
// namespace jngl
jngl::Alpha
Object representing only the Alpha Channel in an RGBA color.
Definition
Alpha.hpp:11
jngl::Alpha::u8
uint8_t u8() const
0...255
jngl::Alpha::getAlpha
float getAlpha() const
0.0f ... 1.0f
jngl::Alpha::Alpha
Alpha(float alpha)
jngl::Alpha::setAlpha
void setAlpha(float)
0.0f ... 1.0f
cstdint
jngl
JNGL's main namespace.
Definition
Achievement.hpp:10