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
Gauge Class Reference

Gauge graphics element. More...

#include <hV_Graphics.h>

Inheritance diagram for Gauge:
Collaboration diagram for Gauge:

Public Member Functions

 Gauge (Graphics *graphics)
 Constructor.
 
void define (uint16_t x0, uint16_t y0, uint16_t radius, int32_t valueMin, int32_t valueMax, int32_t unit=1, uint16_t grid=8, uint16_t valueColour=myColours.black)
 Define the graphic, rectangle coordinates.
 
void dDefine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, int32_t valueMin, int32_t valueMax, int32_t unit=1, uint16_t grid=8, uint16_t valueColour=myColours.black)
 Define the graphic, vector coordinates.
 
void draw (int32_t value, STRING_CONST_TYPE text="")
 Update the graphic.
 
- Public Member Functions inherited from mtgDial
 mtgDial (Graphics *graphics)
 Constructor.
 

Detailed Description

Gauge graphics element.

Gauge displays a needle inside a rounded dial

Constructor & Destructor Documentation

◆ Gauge()

Gauge::Gauge ( Graphics * graphics)

Constructor.

Parameters
graphics&graphics to which the element belongs

Member Function Documentation

◆ dDefine()

void Gauge::dDefine ( uint16_t x0,
uint16_t y0,
uint16_t dx,
uint16_t dy,
int32_t valueMin,
int32_t valueMax,
int32_t unit = 1,
uint16_t grid = 8,
uint16_t valueColour = myColours.black )

Define the graphic, vector coordinates.

Parameters
screen&screen to which the graphic belongs
x0point coordinate, x-axis
y0point coordinate, y-axis
dxlength, x-axis
dyheight, y-axis
valueMinminimum value for measures, already multiplied by unit
valueMaxmaximum value for measures, already multiplied by unit
unitmultiplier for all values, default = 1, 10 or 100
gridnumber of areas for measures, default = 8, 0 = no grid
valueColour16-bit colour for measures, default = black, optional


More: Coordinates, Colours, Value

◆ define()

void Gauge::define ( uint16_t x0,
uint16_t y0,
uint16_t radius,
int32_t valueMin,
int32_t valueMax,
int32_t unit = 1,
uint16_t grid = 8,
uint16_t valueColour = myColours.black )

Define the graphic, rectangle coordinates.

Parameters
screen&screen to which the graphic belongs
x0center, point coordinate, x-axis
y0center, point coordinate, y-axis
radiusradius
valueMinminimum value for measures
valueMaxmaximum value for measures, already multiplied by unit
unitmultiplier for all values, default = 1, 10 or 100
gridnumber of areas for measures, default = 8, 0 = no grid
valueColour16-bit colour for measures, default = black, optional


More: Coordinates, Colours, Value

◆ draw()

void Gauge::draw ( int32_t value,
STRING_CONST_TYPE text = "" )

Update the graphic.

Parameters
valuenew measure, already multiplied by unit
stringValuelabel, default = "", optional
Note
If value=1234 with unit=100, actual value is 1234/100=12.34


More: Value


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