Pervasive Displays Library Suite - Reference Manual 9.0.3
Library for Pervasive Displays e-paper screens, extension boards and development kits
|
Generic buffered screen class. More...
#include <hV_Screen_Buffer.h>
Public Member Functions | |
hV_Screen_Buffer () | |
Constructor. | |
font_s | getFontDetails () |
Get the details of the selected font. | |
General | |
virtual void | begin () |
Initialisation. | |
virtual STRING_TYPE | WhoAmI ()=0 |
Request information about the screen. | |
virtual void | clear (uint16_t colour=myColours.black) |
Clear the screen. | |
virtual void | flush ()=0 |
Send frame-buffer to display. | |
virtual void | setOrientation (uint8_t orientation) |
Set orientation. | |
uint8_t | getOrientation () |
Get orientation. | |
virtual uint16_t | screenSizeX () |
Screen size, x-axis of logical screen. | |
virtual uint16_t | screenSizeY () |
Screen size, y-axis of logical screen. | |
virtual uint16_t | screenDiagonal () |
Screen size, diagonal. | |
virtual uint8_t | screenColourBits () |
Screen colour depth. | |
Margins | |
| |
virtual void | setMarginXY (uint16_t marginX=0, uint16_t marginY=0) |
Set margin for logical screen. | |
virtual uint16_t | screenMarginX () |
Margin size, x-axis of logical screen. | |
virtual uint16_t | screenMarginY () |
Magin size, y-axis of logical screen. | |
Graphics | |
virtual void | circle (uint16_t x0, uint16_t y0, uint16_t radius, uint16_t colour) |
Draw circle. | |
virtual void | arc (uint16_t x0, uint16_t y0, uint16_t radius, uint16_t start, uint16_t end, uint16_t colour) |
Draw arc. | |
virtual void | level (uint16_t x0, uint16_t y0, uint16_t radius, uint16_t start, uint16_t end, uint16_t colour) |
Draw level in a circle. | |
virtual void | ring (uint16_t x0, uint16_t y0, uint16_t inner, uint16_t outer, uint16_t colour) |
Draw ring. | |
virtual void | line (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t colour) |
Draw line, rectangle coordinates. | |
virtual void | dLine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint16_t colour) |
Draw line, vector coordinates. | |
virtual void | setPenSolid (bool flag=true) |
Set pen opaque. | |
virtual bool | getPenSolid () |
Get pen mode. | |
virtual void | triangle (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t x3, uint16_t y3, uint16_t colour) |
Draw triangle, rectangle coordinates. | |
virtual void | rectangle (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t colour) |
Draw rectangle, rectangle coordinates. | |
virtual void | dRectangle (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint16_t colour) |
Draw rectangle, vector coordinates. | |
virtual void | roundedRectangle (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t radius, uint16_t colour) |
Draw rectangle, rectangle coordinates. | |
virtual void | dRoundedRectangle (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint16_t radius, uint16_t colour) |
Draw rounded rectangle, vector coordinates. | |
virtual void | point (uint16_t x1, uint16_t y1, uint16_t colour) |
Draw pixel. | |
uint16_t | readPixel (uint16_t x1, uint16_t y1) |
Read pixel colour. | |
Fast area features | |
Specific to each controller | |
virtual bool | isArea () |
Is area available? | |
virtual void | openArea (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy) |
Open an area for fast sequential writing, vector coordinates. | |
virtual void | feedArea (uint16_t colour) |
Feed the area with colour. | |
virtual void | closeArea () |
Close the area previously opened. | |
Text | |
virtual void | selectFont (uint8_t font) |
Select font number. | |
virtual uint8_t | getFont () |
Get font number. | |
virtual uint8_t | addFont (font_s fontName) |
Add a font. | |
virtual void | setFontSolid (bool flag=true) |
Set transparent or opaque text. | |
virtual bool | getFontSolid () |
Get text mode. | |
virtual void | setFontSpaceX (uint8_t number=1) |
Set additional spaces between two characters, horizontal axis. | |
virtual void | setFontSpaceY (uint8_t number=1) |
Set additional spaces between two characters, vertical axis. | |
virtual uint16_t | characterSizeX (uint8_t character=0x00) |
Character size, x-axis. | |
virtual uint16_t | characterSizeY () |
Character size, y-axis. | |
virtual uint16_t | stringSizeX (STRING_CONST_TYPE text) |
String size, x-axis. | |
virtual uint8_t | stringLengthToFitX (STRING_CONST_TYPE text, uint16_t pixels) |
Number of characters to fit a size, x-axis. | |
virtual uint8_t | fontMax () |
Number of fonts. | |
virtual void | gText (uint16_t x0, uint16_t y0, STRING_CONST_TYPE text, uint16_t textColour=myColours.black, uint16_t backColour=myColours.white) |
Draw ASCII Text (pixel coordinates) | |
Energy features | |
| |
bool | isEnergy () |
Does the screen provide energy features? | |
bool | isIntensity () |
Is screen backlight variable? | |
void | setBacklight (bool state) |
Turn display backlight on or off. | |
void | setIntensity (uint8_t intensity) |
Set backlight intensity. | |
uint8_t | getIntensity () |
Get display backlight intensity. | |
void | setEnergy (uint32_t seconds=6) |
Set delay for power saving. | |
void | updateEnergy (bool state) |
Update power saving. | |
Advanced features | |
| |
bool | isReadable () |
Is screen readable? | |
bool | isStorage () |
Does the screen feature an external storage? | |
void | copyPasteArea (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t dx, uint16_t dy) |
Copy a source area to a target area. | |
virtual void | copyArea (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint32_t &address) |
Copy an area to an external support. | |
virtual void | pasteArea (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint32_t &address, bool option=false) |
Paste an area from an external support. | |
Touch | |
| |
bool | isTouch () |
Is touch available? | |
bool | isTouchEvent () |
Are touch events available? | |
bool | getTouch (touch_t &touch) |
Poll touch. | |
void | clearTouch () |
Clear touch. | |
bool | getTouchInterrupt () |
Check touch interrupt. | |
void | calibrateTouch () |
Calibrate the touch. | |
Public Member Functions inherited from hV_Screen_Virtual | |
hV_Screen_Virtual ()=default | |
Constructor. | |
~hV_Screen_Virtual ()=default | |
Destructor. | |
Friends | |
class | File_Buffer |
Generic buffered screen class.
This class provides the text and graphic primitives for the buffered screen
|
virtual |
Add a font.
fontName | name of the font |
|
virtual |
Draw arc.
x0 | center, point coordinate, x-axis |
y0 | center, point coordinate, y-axis |
radius | radius |
start | starting angle, in degrees |
end | ending angle, in degrees |
colour | 16-bit colour |
Implements hV_Screen_Virtual.
|
virtual |
Character size, x-axis.
character | character to evaluate, default = 0 = font general size |
Implements hV_Screen_Virtual.
|
virtual |
Character size, y-axis.
Implements hV_Screen_Virtual.
|
virtual |
Draw circle.
x0 | center, point coordinate, x-axis |
y0 | center, point coordinate, y-axis |
radius | radius |
colour | 16-bit colour |
More: Coordinates, Colours
Implements hV_Screen_Virtual.
|
virtual |
Clear the screen.
colour | 16-bit colour, default = white |
Implements hV_Screen_Virtual.
Reimplemented in Screen_EPD.
|
inlinevirtual |
|
inlinevirtual |
Copy an area to an external support.
x0 | source top left coordinate, x-axis |
y0 | source top left coordinate, y-axis |
dx | width to be copied, x-axis |
dy | height to be copied, y-axis |
address | identifier, as SRAM address or file number |
More: Coordinates, Screen, Storage
Implements hV_Screen_Virtual.
|
virtual |
Copy a source area to a target area.
x1 | source top left coordinate, x-axis |
y1 | source top left coordinate, y-axis |
x2 | target top left coordinate, x-axis |
y2 | target top left coordinate, y-axis |
dx | width to be copied, x-axis |
dy | height to be copied, y-axis |
More: Coordinates, Screen, Storage
Implements hV_Screen_Virtual.
|
virtual |
Draw line, vector coordinates.
x0 | point coordinate, x-axis |
y0 | point coordinate, y-axis |
dx | length, x-axis |
dy | height, y-axis |
colour | 16-bit colour |
More: Coordinates, Colours
Implements hV_Screen_Virtual.
|
virtual |
Draw rectangle, vector coordinates.
x0 | point coordinate, x-axis |
y0 | point coordinate, y-axis |
dx | length, x-axis |
dy | height, y-axis |
colour | 16-bit colour |
More: Coordinates, Colours
Implements hV_Screen_Virtual.
|
virtual |
Draw rounded rectangle, vector coordinates.
x0 | point coordinate, x-axis |
y0 | point coordinate, y-axis |
dx | length, x-axis |
dy | height, y-axis |
radius | radius for rounded corners, pixels |
colour | 16-bit colour |
More: Coordinates, Colours
Implements hV_Screen_Virtual.
|
inlinevirtual |
Feed the area with colour.
Maximum dx*dy pixels
colour | 16-bit colour |
Implements hV_Screen_Virtual.
|
virtual |
Number of fonts.
Implements hV_Screen_Virtual.
|
virtual |
font_s hV_Screen_Buffer::getFontDetails | ( | ) |
|
virtual |
Get text mode.
|
virtual |
Get display backlight intensity.
Implements hV_Screen_Virtual.
|
virtual |
Get orientation.
Implements hV_Screen_Virtual.
|
virtual |
Get pen mode.
Implements hV_Screen_Virtual.
|
virtual |
Poll touch.
[out] | touch | touch structure |
More: Coordinates, Touch
Implements hV_Screen_Virtual.
bool hV_Screen_Buffer::getTouchInterrupt | ( | ) |
Check touch interrupt.
|
virtual |
Draw ASCII Text (pixel coordinates)
x0 | point coordinate, x-axis |
y0 | point coordinate, y-axis |
text | text string |
textColour | 16-bit colour, default = white |
backColour | 16-bit colour, default = black |
More: Colours, Fonts, Coordinates
Implements hV_Screen_Virtual.
|
virtual |
Is area available?
More: Area
Implements hV_Screen_Virtual.
|
virtual |
Does the screen provide energy features?
More: Energy
Implements hV_Screen_Virtual.
|
virtual |
Is screen backlight variable?
More: Screen
Implements hV_Screen_Virtual.
|
virtual |
Is screen readable?
More: Screen
Implements hV_Screen_Virtual.
|
virtual |
Does the screen feature an external storage?
More: Storage
Implements hV_Screen_Virtual.
|
virtual |
|
virtual |
Are touch events available?
Implements hV_Screen_Virtual.
|
virtual |
Draw level in a circle.
x0 | center, point coordinate, x-axis |
y0 | center, point coordinate, y-axis |
radius | radius |
start | starting angle, in degrees |
end | ending angle, in degrees |
colour | 16-bit colour |
Implements hV_Screen_Virtual.
|
virtual |
Draw line, rectangle coordinates.
x1 | top left coordinate, x-axis |
y1 | top left coordinate, y-axis |
x2 | bottom right coordinate, x-axis |
y2 | bottom right coordinate, y-axis |
colour | 16-bit colour |
More: Coordinates, Colours
Implements hV_Screen_Virtual.
|
inlinevirtual |
Open an area for fast sequential writing, vector coordinates.
x0 | source top left coordinate, x-axis |
y0 | source top left coordinate, y-axis |
dx | target to be pasted, x-axis |
dy | target to be pasted, y-axis |
More: Area, Coordinates
Implements hV_Screen_Virtual.
|
inlinevirtual |
Paste an area from an external support.
x0 | source top left coordinate, x-axis |
y0 | source top left coordinate, y-axis |
dx | target to be pasted, x-axis |
dy | target to be pasted, y-axis |
address | identifier, as SRAM address or file number |
option | false = default = original colours, true = halved colours |
More: Coordinates, Screen, Storage
Implements hV_Screen_Virtual.
|
virtual |
Draw pixel.
x1 | point coordinate, x-axis |
y1 | point coordinate, y-axis |
colour | 16-bit colour |
More: Coordinates, Colours
Implements hV_Screen_Virtual.
|
virtual |
Read pixel colour.
x1 | point coordinate, x-axis |
y1 | point coordinate, y-axis |
More: Coordinates, Colours, Screen
Implements hV_Screen_Virtual.
|
virtual |
Draw rectangle, rectangle coordinates.
x1 | top left coordinate, x-axis |
y1 | top left coordinate, y-axis |
x2 | bottom right coordinate, x-axis |
y2 | bottom right coordinate, y-axis |
colour | 16-bit colour |
More: Coordinates, Colours
Implements hV_Screen_Virtual.
|
virtual |
Draw ring.
x0 | center, point coordinate, x-axis |
y0 | center, point coordinate, y-axis |
inner | inner radius |
outer | outer radius |
colour | 16-bit colour |
Implements hV_Screen_Virtual.
|
virtual |
Draw rectangle, rectangle coordinates.
x1 | top left coordinate, x-axis |
y1 | top left coordinate, y-axis |
x2 | bottom right coordinate, x-axis |
y2 | bottom right coordinate, y-axis |
radius | radius for rounded corners, pixels |
colour | 16-bit colour |
More: Coordinates, Colours
Implements hV_Screen_Virtual.
|
virtual |
Screen colour depth.
More: Coordinates
Implements hV_Screen_Virtual.
|
virtual |
Screen size, diagonal.
Implements hV_Screen_Virtual.
|
virtual |
Margin size, x-axis of logical screen.
Implements hV_Screen_Virtual.
|
virtual |
Magin size, y-axis of logical screen.
Implements hV_Screen_Virtual.
|
virtual |
Screen size, x-axis of logical screen.
Implements hV_Screen_Virtual.
|
virtual |
Screen size, y-axis of logical screen.
Implements hV_Screen_Virtual.
|
virtual |
|
virtual |
Turn display backlight on or off.
state | true = HIGH = on, false = LOW = off |
Implements hV_Screen_Virtual.
|
virtual |
Set delay for power saving.
seconds | idle period in seconds before power saving, default = 6 s |
Implements hV_Screen_Virtual.
|
virtual |
Set transparent or opaque text.
flag | default = 1 = opaque = solid, false = transparent |
Implements hV_Screen_Virtual.
|
virtual |
Set additional spaces between two characters, horizontal axis.
number | of spaces default = 1 pixel |
|
virtual |
Set additional spaces between two characters, vertical axis.
number | of spaces default = 1 pixel |
|
virtual |
Set backlight intensity.
intensity | 0..255 |
Implements hV_Screen_Virtual.
|
virtual |
Set margin for logical screen.
marginX | margin in pixels, x coordinates |
marginY | margin in pixels, y coordinates |
Implements hV_Screen_Virtual.
|
virtual |
Set orientation.
orientation | orientation,
|
Implements hV_Screen_Virtual.
|
virtual |
Set pen opaque.
flag | default = true = opaque = solid, false = wire frame |
Implements hV_Screen_Virtual.
|
virtual |
Number of characters to fit a size, x-axis.
text | string to evaluate |
pixels | number of pixels to fit in |
Implements hV_Screen_Virtual.
|
virtual |
String size, x-axis.
text | string to evaluate |
Implements hV_Screen_Virtual.
|
virtual |
Draw triangle, rectangle coordinates.
x1 | first point coordinate, x-axis |
y1 | first point coordinate, y-axis |
x2 | second point coordinate, x-axis |
y2 | second point coordinate, y-axis |
x3 | third point coordinate, x-axis |
y3 | third point coordinate, y-axis |
colour | 16-bit colour |
More: Coordinates, Colours
Implements hV_Screen_Virtual.
|
virtual |
Update power saving.
state | true = update or start new period or false = check period |
Implements hV_Screen_Virtual.
|
pure virtual |
Request information about the screen.
Implements hV_Screen_Virtual.
Implemented in Screen_EPD.