Michael Kuchnik / Mbed 2 deprecated uLCD_Multiscreen

Dependencies:   4DGL-uLCD-SE mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

VirtualScreen< pixelType, screenType > Class Template Reference

VirtualScreen< pixelType, screenType > Class Template Reference

Class represents a virtual screen of arbitrary size. More...

#include <VirtualScreen.h>

Public Member Functions

 VirtualScreen (std::vector< screenType * > screens, int rows, int columns)
 Creates a virtual screen of size rows * columns.
void setPixel (int x, int y, pixelType value)
 Writes a pixel value into the virtual screen at (row, column) index.
void clearScreen ()
 Clears the screens of all attached screens.
void resetScreen ()
 Resets the screens of all attached screens.
void setBaudRate (int rate)
 Sets the baud rate for all screens.
void BLIT (int x, int y, int w, int h, int *colors)
 draw a block of pixels
void background_color (int color)
 Sets the background color for all screens.

Detailed Description

template<class pixelType, class screenType>
class VirtualScreen< pixelType, screenType >

Class represents a virtual screen of arbitrary size.

To keep simplicity, screen data should be kept in a pixel format where it can be read by physical devices.

Definition at line 17 of file VirtualScreen.h.


Constructor & Destructor Documentation

VirtualScreen ( std::vector< screenType * >  screens,
int  rows,
int  columns 
)

Creates a virtual screen of size rows * columns.

This screen is partitioned into different physical screens. Writing pixels into this screen will transparently write into these separate screens.

Parameters:
screensA vector of physical screens to be used for drawing on.
rowsThe number of rows in the virtual screen.
columnsThe number of columns in the virtual screen.

Definition at line 34 of file VirtualScreen.h.


Member Function Documentation

void background_color ( int  color )

Sets the background color for all screens.

Parameters:
colorThe color of the desired background.

Definition at line 113 of file VirtualScreen.h.

void BLIT ( int  x,
int  y,
int  w,
int  h,
int *  colors 
)

draw a block of pixels

Definition at line 102 of file VirtualScreen.h.

void clearScreen (  )

Clears the screens of all attached screens.

Definition at line 73 of file VirtualScreen.h.

void resetScreen (  )

Resets the screens of all attached screens.

Definition at line 82 of file VirtualScreen.h.

void setBaudRate ( int  rate )

Sets the baud rate for all screens.

Parameters:
rateThe desired baud rate.

Definition at line 93 of file VirtualScreen.h.

void setPixel ( int  x,
int  y,
pixelType  value 
)

Writes a pixel value into the virtual screen at (row, column) index.

Parameters:
xThe row to write the pixel to.
yThe column to write the pixel to.
valueThe value to write to the pixel.

Definition at line 59 of file VirtualScreen.h.