Graphics::Display::Virtual Class Reference

Virtual display device for Host. More...

#include <Virtual.h>

Inheritance diagram for Graphics::Display::Virtual:
Collaboration diagram for Graphics::Display::Virtual:

Public Types

enum class  Mode { Normal , Debug }
 
using TouchCallback = Delegate< void(const void *buffer, size_t len)>
 

Public Member Functions

 Virtual ()
 
 ~Virtual ()
 
bool begin (uint16_t width=240, uint16_t height=320)
 
bool begin (const String &ipaddr, uint16_t port, uint16_t width=240, uint16_t height=320)
 
void setMode (Mode mode)
 
Mode getMode () const
 
String getName () const override
 Get name of display. More...
 
Size getNativeSize () const override
 Get physical size of display. More...
 
bool setOrientation (Orientation orientation) override
 Set display orientation. More...
 
Size getSize () const override
 Get target dimensions. More...
 
PixelFormat getPixelFormat () const override
 All surfaces support the same pixel format. More...
 
bool setScrollMargins (uint16_t top, uint16_t bottom) override
 Set margins for hardware scrolling. More...
 
bool scroll (int16_t y) override
 Scroll region of display up or down using hardware scrolling. More...
 
SurfacecreateSurface (size_t bufferSize=0) override
 Create a surface for use with this render target. More...
 
void onTouch (TouchCallback callback)
 
- Public Member Functions inherited from Graphics::AbstractDisplay
virtual ~AbstractDisplay ()
 
- Public Member Functions inherited from Graphics::Device
virtual ~Device ()
 
Orientation getOrientation ()
 Get current display orientation. More...
 
- Public Member Functions inherited from Graphics::RenderTarget
virtual ~RenderTarget ()
 
PackedColor getColor (Color color) const
 

Additional Inherited Members

- Protected Attributes inherited from Graphics::Device
Orientation orientation {}
 

Detailed Description

Virtual display device for Host.

Talks to python virtual screen application via TCP

Member Typedef Documentation

◆ TouchCallback

using Graphics::Display::Virtual::TouchCallback = Delegate<void(const void* buffer, size_t len)>

Member Enumeration Documentation

◆ Mode

Enumerator
Normal 

Aim to produce similar performance to real display.

Debug 

Use standard software renderers, may run slower and less smoothly.

Constructor & Destructor Documentation

◆ Virtual()

Graphics::Display::Virtual::Virtual ( )

◆ ~Virtual()

Graphics::Display::Virtual::~Virtual ( )

Member Function Documentation

◆ begin() [1/2]

bool Graphics::Display::Virtual::begin ( const String ipaddr,
uint16_t  port,
uint16_t  width = 240,
uint16_t  height = 320 
)

◆ begin() [2/2]

bool Graphics::Display::Virtual::begin ( uint16_t  width = 240,
uint16_t  height = 320 
)

◆ createSurface()

Surface* Graphics::Display::Virtual::createSurface ( size_t  bufferSize = 0)
overridevirtual

Create a surface for use with this render target.

Parameters
bufferSizeSize of internal command/data buffer
Return values
Surface*The surface to use

Caller is responsible for destroying the surface when no longer required.

Implements Graphics::RenderTarget.

◆ getMode()

Mode Graphics::Display::Virtual::getMode ( ) const
inline

◆ getName()

String Graphics::Display::Virtual::getName ( ) const
inlineoverridevirtual

Get name of display.

Implements Graphics::Device.

◆ getNativeSize()

Size Graphics::Display::Virtual::getNativeSize ( ) const
inlineoverridevirtual

Get physical size of display.

Return values
SizeDimensions for NORMAL orientation

Implements Graphics::Device.

◆ getPixelFormat()

PixelFormat Graphics::Display::Virtual::getPixelFormat ( ) const
inlineoverridevirtual

All surfaces support the same pixel format.

Implements Graphics::RenderTarget.

◆ getSize()

Size Graphics::Display::Virtual::getSize ( ) const
inlineoverridevirtual

Get target dimensions.

Implements Graphics::RenderTarget.

◆ onTouch()

void Graphics::Display::Virtual::onTouch ( TouchCallback  callback)
inline

◆ scroll()

bool Graphics::Display::Virtual::scroll ( int16_t  y)
overridevirtual

Scroll region of display up or down using hardware scrolling.

Parameters
yNumber of lines to scroll. Positive values scroll content down, negative values scroll up.

Implements Graphics::Device.

◆ setMode()

void Graphics::Display::Virtual::setMode ( Mode  mode)
inline

◆ setOrientation()

bool Graphics::Display::Virtual::setOrientation ( Orientation  orientation)
overridevirtual

Set display orientation.

Implements Graphics::Device.

◆ setScrollMargins()

bool Graphics::Display::Virtual::setScrollMargins ( uint16_t  top,
uint16_t  bottom 
)
overridevirtual

Set margins for hardware scrolling.

Parameters
topNumber of fixed pixels at top of screen
bottomNumber of fixed pixels at bottom of screen

Area between top/bottom can be scrolled using scroll() method.

Implements Graphics::Device.


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