roo_display
API Documentation for roo_display
Loading...
Searching...
No Matches
roo_display::Argb8888 Class Reference

ColorMode template contract. More...

#include <color_modes.h>

Public Member Functions

constexpr Color toArgbColor (uint32_t in) const
 
constexpr uint32_t fromArgbColor (Color color) const
 
constexpr TransparencyMode transparency () const
 

Static Public Attributes

static const int8_t bits_per_pixel = 32
 

Detailed Description

ColorMode template contract.

A color mode T must provide:

static const int8_t bits_per_pixel;
Color toArgbColor(storage_type in) const;
storage_type fromArgbColor(Color color) const;
static const int8_t bits_per_pixel
Definition color_modes.h:37
constexpr uint32_t fromArgbColor(Color color) const
Definition color_modes.h:41
constexpr Color toArgbColor(uint32_t in) const
Definition color_modes.h:39
constexpr TransparencyMode transparency() const
Definition color_modes.h:45
ARGB8888 color stored as a 32-bit unsigned integer.
Definition color.h:16
TransparencyMode
Transparency information for a stream or color mode.
Definition blending.h:103

Meaning and expectations:

  • bits_per_pixel: how many bits encode a single pixel in this mode.
  • toArgbColor(in): convert a raw pixel value to ARGB8888. If bits_per_pixel < 8, the value is stored in the low-order bits of in.
  • fromArgbColor(color): convert ARGB8888 to a raw pixel value. If bits_per_pixel < 8, the return value must be in the low-order bits.
  • transparency(): indicates the alpha capabilities of the mode (opaque, binary, or gradual). Used as a rendering optimization hint.

For optimized blending, consider specializing RawFullByteBlender or RawSubByteBlender. 32-bit ARGB color mode.

Definition at line 35 of file color_modes.h.

Member Function Documentation

◆ fromArgbColor()

constexpr uint32_t roo_display::Argb8888::fromArgbColor ( Color  color) const
inlineconstexpr

Definition at line 41 of file color_modes.h.

References color.

◆ toArgbColor()

constexpr Color roo_display::Argb8888::toArgbColor ( uint32_t  in) const
inlineconstexpr

Definition at line 39 of file color_modes.h.

◆ transparency()

constexpr TransparencyMode roo_display::Argb8888::transparency ( ) const
inlineconstexpr

Definition at line 45 of file color_modes.h.

References roo_display::kFull.

Field Documentation

◆ bits_per_pixel

const int8_t roo_display::Argb8888::bits_per_pixel = 32
static

Definition at line 37 of file color_modes.h.


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