|
| PixelOperations (const PixelFormat &format) |
|
unsigned | red (Pixel p) const |
| Extract RGB components. More...
|
|
unsigned | green (Pixel p) const |
|
unsigned | blue (Pixel p) const |
|
unsigned | alpha (Pixel p) const |
|
bool | isFullyOpaque (Pixel p) const |
|
bool | isFullyTransparent (Pixel p) const |
|
unsigned | red256 (Pixel p) const |
| Same as above, but result is scaled to [0..255]. More...
|
|
unsigned | green256 (Pixel p) const |
|
unsigned | blue256 (Pixel p) const |
|
Pixel | combine (unsigned r, unsigned g, unsigned b) const |
| Combine RGB components to a pixel. More...
|
|
Pixel | combine256 (unsigned r, unsigned g, unsigned b) const |
|
unsigned | getMaxRed () const |
| Get maximum component value. More...
|
|
unsigned | getMaxGreen () const |
|
unsigned | getMaxBlue () const |
|
template<unsigned w1, unsigned w2> |
Pixel | blend (Pixel p1, Pixel p2) const |
| Blend the given colors into a single color. More...
|
|
template<unsigned w1, unsigned w2, unsigned w3> |
Pixel | blend (Pixel p1, Pixel p2, Pixel p3) const |
|
template<unsigned w1, unsigned w2, unsigned w3, unsigned w4> |
Pixel | blend (Pixel p1, Pixel p2, Pixel p3, Pixel p4) const |
|
template<unsigned w1, unsigned w2, unsigned w3, unsigned w4, unsigned w5, unsigned w6> |
Pixel | blend (Pixel p1, Pixel p2, Pixel p3, Pixel p4, Pixel p5, Pixel p6) const |
|
template<unsigned w1, unsigned w2> |
Pixel | blend (std::span< const Pixel, 2 > p) const |
|
template<unsigned w1, unsigned w2, unsigned w3> |
Pixel | blend (std::span< const Pixel, 3 > p) const |
|
template<unsigned w1, unsigned w2, unsigned w3, unsigned w4> |
Pixel | blend (std::span< const Pixel, 4 > p) const |
|
template<unsigned w1, unsigned w2, unsigned w3, unsigned w4, unsigned w5, unsigned w6> |
Pixel | blend (std::span< const Pixel, 6 > p) const |
|
Pixel | lerp (Pixel p1, Pixel p2, unsigned x) const |
| Perform linear interpolation between two pixels. More...
|
|
Pixel | alphaBlend (Pixel p1, Pixel p2) const |
| Perform alpha blending of two pixels. More...
|
|
| PixelOpBase (const PixelFormat &format_) |
|
const PixelFormat & | getPixelFormat () const |
|
unsigned | getRmask () const |
|
unsigned | getGmask () const |
|
unsigned | getBmask () const |
|
unsigned | getAmask () const |
|
unsigned | getRshift () const |
|
unsigned | getGshift () const |
|
unsigned | getBshift () const |
|
unsigned | getAshift () const |
|
unsigned | getRloss () const |
|
unsigned | getGloss () const |
|
unsigned | getBloss () const |
|
unsigned | getAloss () const |
|
Pixel | getBlendMask () const |
| Returns a constant that is useful to calculate the average of two pixel values. More...
|
|
template<std::unsigned_integral Pixel>
class openmsx::PixelOperations< Pixel >
Definition at line 146 of file PixelOperations.hh.
template<std::unsigned_integral Pixel>
template<unsigned w1, unsigned w2>
Blend the given colors into a single color.
The special case for blending between two colors with an equal blend weight has an optimized implementation.
Definition at line 414 of file PixelOperations.hh.
References openmsx::Keys::combine(), and g.
template<std::unsigned_integral Pixel>
template<unsigned w1, unsigned w2, unsigned w3, unsigned w4, unsigned w5, unsigned w6>
template<std::unsigned_integral Pixel>
Perform linear interpolation between two pixels.
This calculates component-wise: (c1 * (256 - x) + c2 * x) / 256 with c1, c2 the R,B,G,A components of the pixel. 'x' must be in range [0..256]. For x=0 the result is p1. For x=256 the result is p2.
Definition at line 616 of file PixelOperations.hh.
References openmsx::Keys::combine(), and g.