OpenWareLaboratory
ScreenBuffer< Colour, BLACK, WHITE > Class Template Reference

Public Member Functions

void clear ()
 
void clear (int x, int y, int width, int height)
 
void drawChar (uint16_t x, uint16_t y, unsigned char ch, Colour c, Colour bg, uint8_t size)
 
void drawCircle (uint16_t x, uint16_t y, uint16_t r, Colour c)
 
void drawHorizontalLine (int x, int y, int length, Colour c)
 
void drawLine (int x0, int y0, int x1, int y1, Colour c)
 
void drawRectangle (int x, int y, int w, int h, Colour c)
 
void drawRotatedChar (uint16_t x, uint16_t y, unsigned char ch, Colour c, Colour bg, uint8_t size)
 
void drawVerticalLine (int x, int y, int length, Colour c)
 
void fade (uint16_t steps)
 
void fill (Colour c)
 
void fillCircle (uint16_t x, uint16_t y, uint16_t r, Colour c)
 
void fillRectangle (int x, int y, int w, int h, Colour c)
 
ColourgetBuffer ()
 
int getHeight ()
 
Colour getPixel (unsigned int x, unsigned int y)
 
int getWidth ()
 
void invert ()
 
void invert (int x, int y, int w, int h)
 
void invertPixel (unsigned int x, unsigned int y)
 
void print (const char *str)
 
void print (float num)
 
void print (int num)
 
void print (int x, int y, const char *text)
 
 ScreenBuffer (uint16_t w, uint16_t h)
 
void setBuffer (uint8_t *buffer)
 
void setCursor (uint16_t x, uint16_t y)
 
void setPixel (unsigned int x, unsigned int y, Colour c)
 
void setTextColour (Colour c)
 
void setTextColour (Colour c, Colour b)
 
void setTextSize (uint8_t s)
 
void setTextWrap (bool w)
 
void write (uint8_t c)
 

Detailed Description

template<typename Colour, Colour BLACK, Colour WHITE>
class ScreenBuffer< Colour, BLACK, WHITE >

Definition at line 20 of file ScreenBuffer.h.

Constructor & Destructor Documentation

template<typename Colour , Colour BLACK, Colour WHITE>
ScreenBuffer< Colour, BLACK, WHITE >::ScreenBuffer ( uint16_t  w,
uint16_t  h 
)
inline

Definition at line 32 of file ScreenBuffer.h.

Member Function Documentation

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::clear ( )
inline

Definition at line 53 of file ScreenBuffer.h.

References BLACK, and ScreenBuffer< Colour, BLACK, WHITE >::fill().

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::clear ( int  x,
int  y,
int  width,
int  height 
)
inline

Definition at line 57 of file ScreenBuffer.h.

References BLACK, and ScreenBuffer< Colour, BLACK, WHITE >::fillRectangle().

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::drawChar ( uint16_t  x,
uint16_t  y,
unsigned char  ch,
Colour  c,
Colour  bg,
uint8_t  size 
)
inline
template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::drawCircle ( uint16_t  x,
uint16_t  y,
uint16_t  r,
Colour  c 
)
inline

Definition at line 199 of file ScreenBuffer.h.

References ScreenBuffer< Colour, BLACK, WHITE >::setPixel().

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::drawHorizontalLine ( int  x,
int  y,
int  length,
Colour  c 
)
inline
template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::drawLine ( int  x0,
int  y0,
int  x1,
int  y1,
Colour  c 
)
inline

Definition at line 115 of file ScreenBuffer.h.

References abs, ScreenBuffer< Colour, BLACK, WHITE >::setPixel(), and swap.

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::drawRectangle ( int  x,
int  y,
int  w,
int  h,
Colour  c 
)
inline
template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::drawRotatedChar ( uint16_t  x,
uint16_t  y,
unsigned char  ch,
Colour  c,
Colour  bg,
uint8_t  size 
)
inline
template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::drawVerticalLine ( int  x,
int  y,
int  length,
Colour  c 
)
inline
void MonochromeScreenBuffer::fade ( uint16_t  steps)

Definition at line 47 of file ColourScreenPatch.cpp.

References BLUE, GREEN, and RED.

void MonochromeScreenBuffer::fill ( Colour  c)

Definition at line 56 of file ColourScreenPatch.cpp.

Referenced by ScreenBuffer< Colour, BLACK, WHITE >::clear().

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::fillCircle ( uint16_t  x,
uint16_t  y,
uint16_t  r,
Colour  c 
)
inline
template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::fillRectangle ( int  x,
int  y,
int  w,
int  h,
Colour  c 
)
inline
template<typename Colour , Colour BLACK, Colour WHITE>
Colour* ScreenBuffer< Colour, BLACK, WHITE >::getBuffer ( )
inline

Definition at line 45 of file ScreenBuffer.h.

template<typename Colour , Colour BLACK, Colour WHITE>
int ScreenBuffer< Colour, BLACK, WHITE >::getHeight ( )
inline

Definition at line 39 of file ScreenBuffer.h.

Colour MonochromeScreenBuffer::getPixel ( unsigned int  x,
unsigned int  y 
)

Definition at line 28 of file ColourScreenPatch.cpp.

template<typename Colour , Colour BLACK, Colour WHITE>
int ScreenBuffer< Colour, BLACK, WHITE >::getWidth ( )
inline

Definition at line 36 of file ScreenBuffer.h.

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::invert ( )
inline

Definition at line 173 of file ScreenBuffer.h.

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::invert ( int  x,
int  y,
int  w,
int  h 
)
inline
void MonochromeScreenBuffer::invertPixel ( unsigned int  x,
unsigned int  y 
)

Definition at line 41 of file ColourScreenPatch.cpp.

References WHITE.

Referenced by ScreenBuffer< Colour, BLACK, WHITE >::invert().

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::print ( const char *  str)
inline
template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::print ( float  num)
inline

Definition at line 68 of file ScreenBuffer.h.

References msg_ftoa(), and ScreenBuffer< Colour, BLACK, WHITE >::print().

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::print ( int  num)
inline

Definition at line 72 of file ScreenBuffer.h.

References msg_itoa(), and ScreenBuffer< Colour, BLACK, WHITE >::print().

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::print ( int  x,
int  y,
const char *  text 
)
inline
template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::setBuffer ( uint8_t *  buffer)
inline

Definition at line 42 of file ScreenBuffer.h.

Referenced by onDrawCallback().

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::setCursor ( uint16_t  x,
uint16_t  y 
)
inline

Definition at line 149 of file ScreenBuffer.h.

Referenced by ScreenBuffer< Colour, BLACK, WHITE >::print().

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::setTextColour ( Colour  c)
inline

Definition at line 158 of file ScreenBuffer.h.

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::setTextColour ( Colour  c,
Colour  b 
)
inline

Definition at line 164 of file ScreenBuffer.h.

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::setTextSize ( uint8_t  s)
inline

Definition at line 154 of file ScreenBuffer.h.

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::setTextWrap ( bool  w)
inline

Definition at line 169 of file ScreenBuffer.h.

template<typename Colour , Colour BLACK, Colour WHITE>
void ScreenBuffer< Colour, BLACK, WHITE >::write ( uint8_t  c)
inline

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