C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
GraphicDisplayDevice Class Referenceabstract

This is the abstract class to handle all generic behavior of physical graphic display devices (e.g. OLED screen SSD1306). More...

#include <display_device.h>

Inheritance diagram for GraphicDisplayDevice:
Inheritance graph
Collaboration diagram for GraphicDisplayDevice:
Collaboration graph

Public Member Functions

virtual void check_display_device_compatibility (struct_ConfigGraphicWidget framebuffer_cfg)=0
 A pure virtual member function. Each device must implement this method and check the compatibility of the widget parameter with the its physical limitations.
 
virtual void show (Canvas *canvas, const uint8_t anchor_x, const uint8_t anchor_y)=0
 A pure virtual member function. It transfers the pixel buffer to the a part of display screen buffer starting at the (anchor_x, anchor_y) coordinates of the screen , expressed in pixel. This method takes into account the specific addressing scheme and memory structure of the actual display device.
 
 GraphicDisplayDevice (size_t screen_width, size_t screen_height)
 Construct a new Display Device object.
 
virtual ~GraphicDisplayDevice ()
 Destroy the Display Device object.
 

Public Attributes

size_t TFT_panel_width_in_pixel
 the physical width of the screen (in pixel)
 
size_t TFT_panel_height_in_pixel
 the physical height of the screen (in pixel)
 

Detailed Description

This is the abstract class to handle all generic behavior of physical graphic display devices (e.g. OLED screen SSD1306).

Constructor & Destructor Documentation

◆ GraphicDisplayDevice()

GraphicDisplayDevice::GraphicDisplayDevice ( size_t screen_width,
size_t screen_height )

Construct a new Display Device object.

Parameters
screen_widthThe width of physical screen, in pixel
screen_heightThe height of physical screen, in pixel.
Here is the caller graph for this function:

Member Function Documentation

◆ check_display_device_compatibility()

virtual void GraphicDisplayDevice::check_display_device_compatibility ( struct_ConfigGraphicWidget framebuffer_cfg)
pure virtual

A pure virtual member function. Each device must implement this method and check the compatibility of the widget parameter with the its physical limitations.

Parameters
framebuffer_cfgthe widget configuration data

Implemented in SSD1306, and ST7735.

◆ show()

virtual void GraphicDisplayDevice::show ( Canvas * canvas,
const uint8_t anchor_x,
const uint8_t anchor_y )
pure virtual

A pure virtual member function. It transfers the pixel buffer to the a part of display screen buffer starting at the (anchor_x, anchor_y) coordinates of the screen , expressed in pixel. This method takes into account the specific addressing scheme and memory structure of the actual display device.

Parameters
canvasa pointer to the canvas that contains the buffer to be displayed
anchor_xthe x(horizontal) starting position of the frame within the display screen,(in pixel)
anchor_ythe y(vertical) starting position of the frame within the display screen,(in pixel)

Implemented in SSD1306, and ST7735.


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