Graphics::Display::NullDevice Class Reference

Null display device, discards data. More...

#include <Null.h>

Inheritance diagram for Graphics::Display::NullDevice:
Collaboration diagram for Graphics::Display::NullDevice:

Public Member Functions

 NullDevice (uint16_t width=240, uint16_t height=320, PixelFormat format=PixelFormat::RGB565)
 
bool begin ()
 
bool begin (uint16_t width, uint16_t height, PixelFormat format)
 
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...
 
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...
 
Size getSize () const override
 Get target dimensions. More...
 
PixelFormat getPixelFormat () const override
 All surfaces support the same pixel format. More...
 
SurfacecreateSurface (size_t bufferSize=0) override
 Create a surface for use with this render target. More...
 
- 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
 

Friends

class NullSurface
 

Additional Inherited Members

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

Detailed Description

Null display device, discards data.

Used for testing performance and algorithms.

Constructor & Destructor Documentation

◆ NullDevice()

Graphics::Display::NullDevice::NullDevice ( uint16_t  width = 240,
uint16_t  height = 320,
PixelFormat  format = PixelFormat::RGB565 
)
inline

Member Function Documentation

◆ begin() [1/2]

bool Graphics::Display::NullDevice::begin ( )
inline

◆ begin() [2/2]

bool Graphics::Display::NullDevice::begin ( uint16_t  width,
uint16_t  height,
PixelFormat  format 
)
inline

◆ createSurface()

Surface* Graphics::Display::NullDevice::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.

◆ getName()

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

Get name of display.

Implements Graphics::Device.

◆ getNativeSize()

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

Get physical size of display.

Return values
SizeDimensions for NORMAL orientation

Implements Graphics::Device.

◆ getPixelFormat()

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

All surfaces support the same pixel format.

Implements Graphics::RenderTarget.

◆ getSize()

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

Get target dimensions.

Implements Graphics::RenderTarget.

◆ scroll()

bool Graphics::Display::NullDevice::scroll ( int16_t  y)
inlineoverridevirtual

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.

◆ setOrientation()

bool Graphics::Display::NullDevice::setOrientation ( Orientation  orientation)
inlineoverridevirtual

Set display orientation.

Implements Graphics::Device.

◆ setScrollMargins()

bool Graphics::Display::NullDevice::setScrollMargins ( uint16_t  top,
uint16_t  bottom 
)
inlineoverridevirtual

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.

Friends And Related Function Documentation

◆ NullSurface

friend class NullSurface
friend

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