LCD LIB
Fork of RA8875 by
Diff: GraphicsDisplay.h
- Revision:
- 142:6e9bff59878a
- Parent:
- 136:224e03d5c31f
- Child:
- 143:e872d65a710d
diff -r 2ec78a50dc98 -r 6e9bff59878a GraphicsDisplay.h --- a/GraphicsDisplay.h Thu Dec 29 20:06:00 2016 +0000 +++ b/GraphicsDisplay.h Sun Mar 19 21:41:24 2017 +0000 @@ -147,6 +147,54 @@ virtual RetCode_t fillrect(loc_t x1, loc_t y1, loc_t x2, loc_t y2, color_t color, fill_t fillit = FILL) = 0; + /// Select the drawing layer for subsequent commands. + /// + /// If the screen configuration is 480 x 272, or if it is 800 x 480 + /// and 8-bit color, the the display supports two layers, which can + /// be independently drawn on and shown. Additionally, complex + /// operations involving both layers are permitted. + /// + /// @code + /// //lcd.SetLayerMode(OnlyLayer0); // default is layer 0 + /// lcd.rect(400,130, 475,155,Brown); + /// lcd.SelectDrawingLayer(1); + /// lcd.circle(400,25, 25, BrightRed); + /// wait(1); + /// lcd.SetLayerMode(ShowLayer1); + /// @endcode + /// + /// @attention The user manual refers to Layer 1 and Layer 2, however the + /// actual register values are value 0 and 1. This API as well as + /// others that reference the layers use the values 0 and 1 for + /// cleaner iteration in the code. + /// + /// @param[in] layer is 0 or 1 to select the layer for subsequent + /// commands. + /// @returns the previous drawing layer; 0 or 1. + /// + virtual uint16_t SelectDrawingLayer(uint16_t layer) = 0; + + + /// Get the currently active drawing layer. + /// + /// This returns a value, 0 or 1, based on the screen configuration + /// and the currently active drawing layer. + /// + /// @code + /// uint16_t prevLayer = lcd.SelectDrawingLayer(x); + /// lcd.circle(400,25, 25, BrightRed); + /// lcd.SelectDrawingLayer(prevLayer); + /// @endcode + /// + /// @attention The user manual refers to Layer 1 and Layer 2, however the + /// actual register values are value 0 and 1. This API as well as + /// others that reference the layers use the values 0 and 1 for + /// cleaner iteration in the code. + /// + /// @returns the current drawing layer; 0 or 1. + /// + virtual uint16_t GetDrawingLayer(void) = 0; + /// a function to write the command and data to the RA8875 chip. /// /// @param command is the RA8875 instruction to perform