Porytiles
Loading...
Searching...
No Matches
porytiles::Rgba32 Class Reference

#include <rgba32.hpp>

Public Member Functions

constexpr Rgba32 ()
 
constexpr Rgba32 (std::uint8_t red, std::uint8_t green, std::uint8_t blue, std::uint8_t alpha=kAlphaOpaque)
 
std::uint8_t red () const
 
std::uint8_t green () const
 
std::uint8_t blue () const
 
std::uint8_t alpha () const
 
bool operator== (const Rgba32 &rgba) const =default
 
auto operator<=> (const Rgba32 &rgba) const =default
 
std::string ToJascStr () const
 
bool EqualsIgnoringAlpha (const Rgba32 &other) const
 

Static Public Attributes

static constexpr std::uint8_t kAlphaTransparent = 0
 
static constexpr std::uint8_t kAlphaOpaque = 255
 

Detailed Description

Definition at line 9 of file rgba32.hpp.

Constructor & Destructor Documentation

◆ Rgba32() [1/2]

constexpr porytiles::Rgba32::Rgba32 ( )
inlineconstexpr

Definition at line 19 of file rgba32.hpp.

◆ Rgba32() [2/2]

constexpr porytiles::Rgba32::Rgba32 ( std::uint8_t  red,
std::uint8_t  green,
std::uint8_t  blue,
std::uint8_t  alpha = kAlphaOpaque 
)
inlineconstexpr

Definition at line 21 of file rgba32.hpp.

Member Function Documentation

◆ alpha()

std::uint8_t porytiles::Rgba32::alpha ( ) const
inline

Definition at line 36 of file rgba32.hpp.

◆ blue()

std::uint8_t porytiles::Rgba32::blue ( ) const
inline

Definition at line 32 of file rgba32.hpp.

◆ EqualsIgnoringAlpha()

bool porytiles::Rgba32::EqualsIgnoringAlpha ( const Rgba32 other) const

Definition at line 11 of file rgba32.cpp.

◆ green()

std::uint8_t porytiles::Rgba32::green ( ) const
inline

Definition at line 28 of file rgba32.hpp.

◆ operator<=>()

auto porytiles::Rgba32::operator<=> ( const Rgba32 rgba) const
default

◆ operator==()

bool porytiles::Rgba32::operator== ( const Rgba32 rgba) const
default

◆ red()

std::uint8_t porytiles::Rgba32::red ( ) const
inline

Definition at line 24 of file rgba32.hpp.

◆ ToJascStr()

std::string porytiles::Rgba32::ToJascStr ( ) const

Definition at line 7 of file rgba32.cpp.

Member Data Documentation

◆ kAlphaOpaque

constexpr std::uint8_t porytiles::Rgba32::kAlphaOpaque = 255
staticconstexpr

Definition at line 17 of file rgba32.hpp.

◆ kAlphaTransparent

constexpr std::uint8_t porytiles::Rgba32::kAlphaTransparent = 0
staticconstexpr

Definition at line 16 of file rgba32.hpp.


The documentation for this class was generated from the following files: