Pervasive Displays Library Suite - Reference Manual 9.0.3
Library for Pervasive Displays e-paper screens, extension boards and development kits
Loading...
Searching...
No Matches
hV_Screen_Buffer Class Referenceabstract

Generic buffered screen class. More...

#include <hV_Screen_Buffer.h>

Inheritance diagram for hV_Screen_Buffer:
Collaboration diagram for hV_Screen_Buffer:

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
Note
Advanced edition only
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
Note
Advanced edition only
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
Note
Advanced edition only
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
Note
Those functions are optional, and thus defined as empty and not compulsory.
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
 

Detailed Description

Generic buffered screen class.

This class provides the text and graphic primitives for the buffered screen

Member Function Documentation

◆ addFont()

virtual uint8_t hV_Screen_Buffer::addFont ( font_s fontName)
virtual

Add a font.

Parameters
fontNamename of the font
Returns
number of the font, 0 otherwise
Note
Previously selectFont()
More: Fonts

◆ arc()

virtual void hV_Screen_Buffer::arc ( uint16_t x0,
uint16_t y0,
uint16_t radius,
uint16_t start,
uint16_t end,
uint16_t colour )
virtual

Draw arc.

Parameters
x0center, point coordinate, x-axis
y0center, point coordinate, y-axis
radiusradius
startstarting angle, in degrees
endending angle, in degrees
colour16-bit colour
Note
if ending angle < starting angle, then starting angle..360 and 0..starting angle arcs are drawn
Advanced edition only

Implements hV_Screen_Virtual.

◆ characterSizeX()

virtual uint16_t hV_Screen_Buffer::characterSizeX ( uint8_t character = 0x00)
virtual

Character size, x-axis.

Parameters
charactercharacter to evaluate, default = 0 = font general size
Returns
horizontal size of the font for the specified character, in pixels
Note
With setSpaceX included
In variable font, each character has a specific size. The general size is indicative.
Previously fontSizeX()
More: Fonts

Implements hV_Screen_Virtual.

◆ characterSizeY()

virtual uint16_t hV_Screen_Buffer::characterSizeY ( )
virtual

Character size, y-axis.

Returns
vertical size for current font, in pixels
Note
Previously fontSizeY()
More: Fonts

Implements hV_Screen_Virtual.

◆ circle()

virtual void hV_Screen_Buffer::circle ( uint16_t x0,
uint16_t y0,
uint16_t radius,
uint16_t colour )
virtual

Draw circle.

Parameters
x0center, point coordinate, x-axis
y0center, point coordinate, y-axis
radiusradius
colour16-bit colour


More: Coordinates, Colours

Implements hV_Screen_Virtual.

◆ clear()

virtual void hV_Screen_Buffer::clear ( uint16_t colour = myColours.black)
virtual

Clear the screen.

Parameters
colour16-bit colour, default = white

Implements hV_Screen_Virtual.

Reimplemented in Screen_EPD.

◆ closeArea()

virtual void hV_Screen_Buffer::closeArea ( )
inlinevirtual

Close the area previously opened.


More: Area

Implements hV_Screen_Virtual.

◆ copyArea()

virtual void hV_Screen_Buffer::copyArea ( uint16_t x0,
uint16_t y0,
uint16_t dx,
uint16_t dy,
uint32_t & address )
inlinevirtual

Copy an area to an external support.

Parameters
x0source top left coordinate, x-axis
y0source top left coordinate, y-axis
dxwidth to be copied, x-axis
dyheight to be copied, y-axis
addressidentifier, as SRAM address or file number
Note
This feature requires a readable screen and a storage.
Advanced edition only


More: Coordinates, Screen, Storage

Implements hV_Screen_Virtual.

◆ copyPasteArea()

void hV_Screen_Buffer::copyPasteArea ( uint16_t x1,
uint16_t y1,
uint16_t x2,
uint16_t y2,
uint16_t dx,
uint16_t dy )
virtual

Copy a source area to a target area.

Parameters
x1source top left coordinate, x-axis
y1source top left coordinate, y-axis
x2target top left coordinate, x-axis
y2target top left coordinate, y-axis
dxwidth to be copied, x-axis
dyheight to be copied, y-axis
Note
This feature requires a readable screen.
Warning
The function does not manage the overlapping of the source and target areas. If such a case, use copyArea() pasteArea() instead.
Note
Advanced edition only


More: Coordinates, Screen, Storage

Implements hV_Screen_Virtual.

◆ dLine()

virtual void hV_Screen_Buffer::dLine ( uint16_t x0,
uint16_t y0,
uint16_t dx,
uint16_t dy,
uint16_t colour )
virtual

Draw line, vector coordinates.

Parameters
x0point coordinate, x-axis
y0point coordinate, y-axis
dxlength, x-axis
dyheight, y-axis
colour16-bit colour


More: Coordinates, Colours

Implements hV_Screen_Virtual.

◆ dRectangle()

virtual void hV_Screen_Buffer::dRectangle ( uint16_t x0,
uint16_t y0,
uint16_t dx,
uint16_t dy,
uint16_t colour )
virtual

Draw rectangle, vector coordinates.

Parameters
x0point coordinate, x-axis
y0point coordinate, y-axis
dxlength, x-axis
dyheight, y-axis
colour16-bit colour


More: Coordinates, Colours

Implements hV_Screen_Virtual.

◆ dRoundedRectangle()

virtual void hV_Screen_Buffer::dRoundedRectangle ( uint16_t x0,
uint16_t y0,
uint16_t dx,
uint16_t dy,
uint16_t radius,
uint16_t colour )
virtual

Draw rounded rectangle, vector coordinates.

Parameters
x0point coordinate, x-axis
y0point coordinate, y-axis
dxlength, x-axis
dyheight, y-axis
radiusradius for rounded corners, pixels
colour16-bit colour
Note
Advanced edition only


More: Coordinates, Colours

Implements hV_Screen_Virtual.

◆ feedArea()

virtual void hV_Screen_Buffer::feedArea ( uint16_t colour)
inlinevirtual

Feed the area with colour.

Maximum dx*dy pixels

Warning
No check!
Parameters
colour16-bit colour
Note
Pixels are displayed from left to right, top to bottom


More: Area, Colours

Implements hV_Screen_Virtual.

◆ fontMax()

virtual uint8_t hV_Screen_Buffer::fontMax ( )
virtual

Number of fonts.

Returns
number of fonts available
Note
First font is numbered 0, second 1, ...
The latest font is numbered fontMax()-1

Implements hV_Screen_Virtual.

◆ getFont()

virtual uint8_t hV_Screen_Buffer::getFont ( )
virtual

Get font number.

Returns
Number of the font, 0..fontMax()-1

Implements hV_Screen_Virtual.

◆ getFontDetails()

font_s hV_Screen_Buffer::getFontDetails ( )

Get the details of the selected font.

Returns
font_s structure
Note
Advanced edition only

◆ getFontSolid()

virtual bool hV_Screen_Buffer::getFontSolid ( )
virtual

Get text mode.

Returns
true = solid or opaque text, false = transparent text
Note
Advanced edition only

◆ getIntensity()

uint8_t hV_Screen_Buffer::getIntensity ( )
virtual

Get display backlight intensity.

Returns
intensity 0..255
Note
Feature specific to the SSD1963 and 4D Systems Diablo16
Advanced edition only

Implements hV_Screen_Virtual.

◆ getOrientation()

uint8_t hV_Screen_Buffer::getOrientation ( )
virtual

Get orientation.

Returns
orientation orientation:
  • 0 = portrait
  • 1 = right rotated landscape
  • 2 = reverse portrait
  • 3 = left rotated landscape
Note
Run the Common_Orientation.ino example to identify the options

Implements hV_Screen_Virtual.

◆ getPenSolid()

virtual bool hV_Screen_Buffer::getPenSolid ( )
virtual

Get pen mode.

Returns
true = solid or opaque pen, false = transparent pen
Note
Advanced edition only

Implements hV_Screen_Virtual.

◆ getTouch()

bool hV_Screen_Buffer::getTouch ( touch_t & touch)
virtual

Poll touch.

Parameters
[out]touchtouch structure
Returns
true if touch pressed or moved


More: Coordinates, Touch

Implements hV_Screen_Virtual.

◆ getTouchInterrupt()

bool hV_Screen_Buffer::getTouchInterrupt ( )

Check touch interrupt.

Returns
true interrupt raised, false otherwise

◆ gText()

virtual void hV_Screen_Buffer::gText ( uint16_t x0,
uint16_t y0,
STRING_CONST_TYPE text,
uint16_t textColour = myColours.black,
uint16_t backColour = myColours.white )
virtual

Draw ASCII Text (pixel coordinates)

Parameters
x0point coordinate, x-axis
y0point coordinate, y-axis
texttext string
textColour16-bit colour, default = white
backColour16-bit colour, default = black


More: Colours, Fonts, Coordinates

Implements hV_Screen_Virtual.

◆ isArea()

virtual bool hV_Screen_Buffer::isArea ( )
virtual

Is area available?

Returns
true if area available, false otherwise


More: Area

Implements hV_Screen_Virtual.

◆ isEnergy()

bool hV_Screen_Buffer::isEnergy ( )
virtual

Does the screen provide energy features?

Returns
true is energy featured, false otherwise
Note
Advanced edition only


More: Energy

Implements hV_Screen_Virtual.

◆ isIntensity()

bool hV_Screen_Buffer::isIntensity ( )
virtual

Is screen backlight variable?

Returns
true is backlight variable, false otherwise


More: Screen

Note
Advanced edition only

Implements hV_Screen_Virtual.

◆ isReadable()

bool hV_Screen_Buffer::isReadable ( )
virtual

Is screen readable?

Returns
true is screen readable, false otherwise
Note
Advanced edition only


More: Screen

Implements hV_Screen_Virtual.

◆ isStorage()

bool hV_Screen_Buffer::isStorage ( )
virtual

Does the screen feature an external storage?

Returns
true is storage available, false otherwise
Note
Advanced edition only


More: Storage

Implements hV_Screen_Virtual.

◆ isTouch()

bool hV_Screen_Buffer::isTouch ( )
virtual

Is touch available?

Returns
true is touch available, false otherwise

Implements hV_Screen_Virtual.

◆ isTouchEvent()

bool hV_Screen_Buffer::isTouchEvent ( )
virtual

Are touch events available?

Returns
true if touch events available, false otherwise

Implements hV_Screen_Virtual.

◆ level()

virtual void hV_Screen_Buffer::level ( uint16_t x0,
uint16_t y0,
uint16_t radius,
uint16_t start,
uint16_t end,
uint16_t colour )
virtual

Draw level in a circle.

Parameters
x0center, point coordinate, x-axis
y0center, point coordinate, y-axis
radiusradius
startstarting angle, in degrees
endending angle, in degrees
colour16-bit colour
Note
0 <= starting angle < ending angle <= 180
Advanced edition only

Implements hV_Screen_Virtual.

◆ line()

virtual void hV_Screen_Buffer::line ( uint16_t x1,
uint16_t y1,
uint16_t x2,
uint16_t y2,
uint16_t colour )
virtual

Draw line, rectangle coordinates.

Parameters
x1top left coordinate, x-axis
y1top left coordinate, y-axis
x2bottom right coordinate, x-axis
y2bottom right coordinate, y-axis
colour16-bit colour


More: Coordinates, Colours

Implements hV_Screen_Virtual.

◆ openArea()

virtual void hV_Screen_Buffer::openArea ( uint16_t x0,
uint16_t y0,
uint16_t dx,
uint16_t dy )
inlinevirtual

Open an area for fast sequential writing, vector coordinates.

Parameters
x0source top left coordinate, x-axis
y0source top left coordinate, y-axis
dxtarget to be pasted, x-axis
dytarget to be pasted, y-axis


More: Area, Coordinates

Implements hV_Screen_Virtual.

◆ pasteArea()

virtual void hV_Screen_Buffer::pasteArea ( uint16_t x0,
uint16_t y0,
uint16_t dx,
uint16_t dy,
uint32_t & address,
bool option = false )
inlinevirtual

Paste an area from an external support.

Parameters
x0source top left coordinate, x-axis
y0source top left coordinate, y-axis
dxtarget to be pasted, x-axis
dytarget to be pasted, y-axis
addressidentifier, as SRAM address or file number
optionfalse = default = original colours, true = halved colours
Note
This feature requires a readable screen and a storage.
Advanced edition only


More: Coordinates, Screen, Storage

Implements hV_Screen_Virtual.

◆ point()

virtual void hV_Screen_Buffer::point ( uint16_t x1,
uint16_t y1,
uint16_t colour )
virtual

Draw pixel.

Parameters
x1point coordinate, x-axis
y1point coordinate, y-axis
colour16-bit colour


More: Coordinates, Colours

Implements hV_Screen_Virtual.

◆ readPixel()

uint16_t hV_Screen_Buffer::readPixel ( uint16_t x1,
uint16_t y1 )
virtual

Read pixel colour.

Parameters
x1point coordinate, x-axis
y1point coordinate, y-axis
Returns
16-bit colour, bits 15-11 red, bits 10-5 green, bits 4-0 blue
Note
This feature requires a readable screen.
Advanced edition only


More: Coordinates, Colours, Screen

Implements hV_Screen_Virtual.

◆ rectangle()

virtual void hV_Screen_Buffer::rectangle ( uint16_t x1,
uint16_t y1,
uint16_t x2,
uint16_t y2,
uint16_t colour )
virtual

Draw rectangle, rectangle coordinates.

Parameters
x1top left coordinate, x-axis
y1top left coordinate, y-axis
x2bottom right coordinate, x-axis
y2bottom right coordinate, y-axis
colour16-bit colour


More: Coordinates, Colours

Implements hV_Screen_Virtual.

◆ ring()

virtual void hV_Screen_Buffer::ring ( uint16_t x0,
uint16_t y0,
uint16_t inner,
uint16_t outer,
uint16_t colour )
virtual

Draw ring.

Parameters
x0center, point coordinate, x-axis
y0center, point coordinate, y-axis
innerinner radius
outerouter radius
colour16-bit colour
Note
inner radius < outer radius
Advanced edition only

Implements hV_Screen_Virtual.

◆ roundedRectangle()

virtual void hV_Screen_Buffer::roundedRectangle ( uint16_t x1,
uint16_t y1,
uint16_t x2,
uint16_t y2,
uint16_t radius,
uint16_t colour )
virtual

Draw rectangle, rectangle coordinates.

Parameters
x1top left coordinate, x-axis
y1top left coordinate, y-axis
x2bottom right coordinate, x-axis
y2bottom right coordinate, y-axis
radiusradius for rounded corners, pixels
colour16-bit colour
Note
Advanced edition only


More: Coordinates, Colours

Implements hV_Screen_Virtual.

◆ screenColourBits()

virtual uint8_t hV_Screen_Buffer::screenColourBits ( )
virtual

Screen colour depth.

Returns
colour depth, in bits
Note
Examples: BW=1, BWR=2, BWRY=2, RGB565=16


More: Coordinates

Implements hV_Screen_Virtual.

◆ screenDiagonal()

virtual uint16_t hV_Screen_Buffer::screenDiagonal ( )
virtual

Screen size, diagonal.

Returns
diagonal size of the screen, in inches x 100
Note
320 means 3.20"

Implements hV_Screen_Virtual.

◆ screenMarginX()

virtual uint16_t hV_Screen_Buffer::screenMarginX ( )
virtual

Margin size, x-axis of logical screen.

Returns
x-axis size of the screen, in pixels
Note
Advanced edition only

Implements hV_Screen_Virtual.

◆ screenMarginY()

virtual uint16_t hV_Screen_Buffer::screenMarginY ( )
virtual

Magin size, y-axis of logical screen.

Returns
y-axis size of the screen, in pixels
Note
240 means 240 pixels and thus 0..239 coordinates (decimal)
Advanced edition only

Implements hV_Screen_Virtual.

◆ screenSizeX()

virtual uint16_t hV_Screen_Buffer::screenSizeX ( )
virtual

Screen size, x-axis of logical screen.

Returns
x-axis size of the screen, in pixels
Note
240 means 240 pixels and thus 0..239 coordinates (decimal)

Implements hV_Screen_Virtual.

◆ screenSizeY()

virtual uint16_t hV_Screen_Buffer::screenSizeY ( )
virtual

Screen size, y-axis of logical screen.

Returns
y-axis size of the screen, in pixels
Note
240 means 240 pixels and thus 0..239 coordinates (decimal)

Implements hV_Screen_Virtual.

◆ selectFont()

virtual void hV_Screen_Buffer::selectFont ( uint8_t font)
virtual

Select font number.

Parameters
fontdefault = 0, 0..fontMax()-1

Implements hV_Screen_Virtual.

◆ setBacklight()

void hV_Screen_Buffer::setBacklight ( bool state)
virtual

Turn display backlight on or off.

Parameters
statetrue = HIGH = on, false = LOW = off
Note
Feature specific to the SSD1963
Advanced edition only

Implements hV_Screen_Virtual.

◆ setEnergy()

void hV_Screen_Buffer::setEnergy ( uint32_t seconds = 6)
virtual

Set delay for power saving.

Parameters
secondsidle period in seconds before power saving, default = 6 s
Note
Set seconds = 0 to disable
Feature specific to the SSD1963 and the Screen_EPD_FRAM
Advanced edition only

Implements hV_Screen_Virtual.

◆ setFontSolid()

virtual void hV_Screen_Buffer::setFontSolid ( bool flag = true)
virtual

Set transparent or opaque text.

Parameters
flagdefault = 1 = opaque = solid, false = transparent

Implements hV_Screen_Virtual.

◆ setFontSpaceX()

virtual void hV_Screen_Buffer::setFontSpaceX ( uint8_t number = 1)
virtual

Set additional spaces between two characters, horizontal axis.

Parameters
numberof spaces default = 1 pixel

◆ setFontSpaceY()

virtual void hV_Screen_Buffer::setFontSpaceY ( uint8_t number = 1)
virtual

Set additional spaces between two characters, vertical axis.

Parameters
numberof spaces default = 1 pixel

◆ setIntensity()

void hV_Screen_Buffer::setIntensity ( uint8_t intensity)
virtual

Set backlight intensity.

Parameters
intensity0..255
Note
Feature specific to the SSD1963 and 4D Systems Diablo16
Advanced edition only

Implements hV_Screen_Virtual.

◆ setMarginXY()

virtual void hV_Screen_Buffer::setMarginXY ( uint16_t marginX = 0,
uint16_t marginY = 0 )
virtual

Set margin for logical screen.

Parameters
marginXmargin in pixels, x coordinates
marginYmargin in pixels, y coordinates
Note
Advanced edition only

Implements hV_Screen_Virtual.

◆ setOrientation()

virtual void hV_Screen_Buffer::setOrientation ( uint8_t orientation)
virtual

Set orientation.

Parameters
orientationorientation,
  • 0 = default
  • 1 = right rotated
  • 2 = reverse default
  • 3 = left rotated
  • ORIENTATION_PORTRAIT = 6 = check portrait
  • ORIENTATION_LANDSCAPE = 7 = check landscape
Note
Run the Common_Orientation.ino example to identify the options

Implements hV_Screen_Virtual.

◆ setPenSolid()

virtual void hV_Screen_Buffer::setPenSolid ( bool flag = true)
virtual

Set pen opaque.

Parameters
flagdefault = true = opaque = solid, false = wire frame

Implements hV_Screen_Virtual.

◆ stringLengthToFitX()

virtual uint8_t hV_Screen_Buffer::stringLengthToFitX ( STRING_CONST_TYPE text,
uint16_t pixels )
virtual

Number of characters to fit a size, x-axis.

Parameters
textstring to evaluate
pixelsnumber of pixels to fit in
Returns
number of characters to be displayed inside the pixels
More: Fonts

Implements hV_Screen_Virtual.

◆ stringSizeX()

virtual uint16_t hV_Screen_Buffer::stringSizeX ( STRING_CONST_TYPE text)
virtual

String size, x-axis.

Parameters
textstring to evaluate
Returns
horizontal size of the string for current font, in pixels
More: Fonts

Implements hV_Screen_Virtual.

◆ triangle()

virtual void hV_Screen_Buffer::triangle ( uint16_t x1,
uint16_t y1,
uint16_t x2,
uint16_t y2,
uint16_t x3,
uint16_t y3,
uint16_t colour )
virtual

Draw triangle, rectangle coordinates.

Parameters
x1first point coordinate, x-axis
y1first point coordinate, y-axis
x2second point coordinate, x-axis
y2second point coordinate, y-axis
x3third point coordinate, x-axis
y3third point coordinate, y-axis
colour16-bit colour
Note
If two points are equal, draw a line


More: Coordinates, Colours

Implements hV_Screen_Virtual.

◆ updateEnergy()

void hV_Screen_Buffer::updateEnergy ( bool state)
virtual

Update power saving.

Parameters
statetrue = update or start new period or false = check period
Note
Feature specific to the SSD1963
Advanced edition only

Implements hV_Screen_Virtual.

◆ WhoAmI()

virtual STRING_TYPE hV_Screen_Buffer::WhoAmI ( )
pure virtual

Request information about the screen.

Returns
string with hardware version

Implements hV_Screen_Virtual.

Implemented in Screen_EPD.


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