Scope
scope::BGRA8Pixel Struct Reference

#include <pixel.h>

Public Member Functions

 BGRA8Pixel ()
 
 BGRA8Pixel (const uint8_t &val)
 
 BGRA8Pixel (const uint8_t &vB, const uint8_t &vG, const uint8_t &vR)
 
BGRA8Pixeloperator= (const uint8_t &val)
 
BGRA8Pixel operator+ (const BGRA8Pixel &adder)
 
BGRA8Pixeloperator+= (const BGRA8Pixel &adder)
 
Accessor methods to the color components
void to_blue (const uint8_t &val)
 
void to_green (const uint8_t &val)
 
void to_red (const uint8_t &val)
 
void to_gray (const uint8_t &val)
 

Public Attributes

uint8_t B
 
uint8_t G
 
uint8_t R
 
uint8_t A
 

Detailed Description

Encapsulated a 4-byte pixel in BGRA format for use with Direct2D.

Definition at line 38 of file pixel.h.

Constructor & Destructor Documentation

scope::BGRA8Pixel::BGRA8Pixel ( )
inline

Initialize to opaque black.

Definition at line 52 of file pixel.h.

scope::BGRA8Pixel::BGRA8Pixel ( const uint8_t &  val)
inline

Sets all colors to val (=> gray) and alpha to opaque.

Definition at line 60 of file pixel.h.

scope::BGRA8Pixel::BGRA8Pixel ( const uint8_t &  vB,
const uint8_t &  vG,
const uint8_t &  vR 
)
inline

Sets all colors as desired.

Definition at line 68 of file pixel.h.

Member Function Documentation

BGRA8Pixel& scope::BGRA8Pixel::operator= ( const uint8_t &  val)
inline

Sets all colors to val => gray and alpha to opaque.

Definition at line 76 of file pixel.h.

BGRA8Pixel scope::BGRA8Pixel::operator+ ( const BGRA8Pixel adder)
inline

satured addition (evtl do with MMX / 8 pixel at the same time because 64bit?!)

Definition at line 83 of file pixel.h.

BGRA8Pixel& scope::BGRA8Pixel::operator+= ( const BGRA8Pixel adder)
inline

satured addition (evtl do with MMX / 8 pixel at the same time because 64bit?!)

Definition at line 90 of file pixel.h.

Member Data Documentation

uint8_t scope::BGRA8Pixel::B

blue value

Definition at line 40 of file pixel.h.

uint8_t scope::BGRA8Pixel::G

green value

Definition at line 43 of file pixel.h.

uint8_t scope::BGRA8Pixel::R

red value

Definition at line 46 of file pixel.h.

uint8_t scope::BGRA8Pixel::A

alpha value

Definition at line 49 of file pixel.h.


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