tiny-skia-cpp
A C++20 2D rendering library (port of tiny-skia)
Loading...
Searching...
No Matches
tiny_skia::PremultipliedColorU8 Class Reference

8-bit RGBA color (premultiplied alpha). Internal pixel format.

#include <tiny_skia/Color.h>

Collaboration diagram for tiny_skia::PremultipliedColorU8:

Public Member Functions

ColorU8 demultiply () const
 Converts to straight alpha.
 

Static Public Member Functions

static std::optional< PremultipliedColorU8fromRgba (AlphaU8 red, AlphaU8 green, AlphaU8 blue, AlphaU8 alpha)
 Creates from components. Returns nullopt if any channel > alpha.
 
static constexpr PremultipliedColorU8 fromRgbaUnchecked (AlphaU8 red, AlphaU8 green, AlphaU8 blue, AlphaU8 alpha)
 Creates from components without validation.
 

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