LCDGFX LCD display driver  1.1.5
This library is developed to control SSD1306/SSD1325/SSD1327/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays
NanoSprite< T > Class Template Reference

#include <sprite.h>

Inheritance diagram for NanoSprite< T >:
Collaboration diagram for NanoSprite< T >:

Public Member Functions

 NanoSprite (const NanoPoint &pos, const NanoPoint &size, const uint8_t *bitmap)
 
void draw () override
 
void setBitmap (const uint8_t *bitmap)
 
const uint8_t * getBitmap ()
 
- Public Member Functions inherited from NanoObject< T >
 NanoObject (const NanoPoint &pos)
 
 NanoObject (const NanoPoint &pos, const NanoPoint &size)
 
void refresh () override
 
void update () override
 
lcdint_t width () const
 
lcdint_t height () const
 
void moveTo (const NanoPoint &p)
 
void moveBy (const NanoPoint &p)
 
void resize (const NanoPoint &size)
 
void setSize (const NanoPoint &size)
 
void setPos (const NanoPoint &p)
 
const NanoPoint bottom () const
 
const NanoPoint top () const
 
const NanoPoint left () const
 
const NanoPoint right () const
 
const NanoPoint center () const
 
lcdint_t x () const
 
lcdint_t y () const
 
const NanoPointgetPosition () const
 
const NanoRectgetRect () const
 
- Public Member Functions inherited from NanoEngineObject< T >
void focus ()
 
void defocus ()
 
bool isFocused ()
 
bool hasTiler ()
 
T & getTiler ()
 

Additional Inherited Members

- Protected Member Functions inherited from NanoEngineObject< T >
void setTiler (T *tiler)
 
- Protected Attributes inherited from NanoObject< T >
NanoRect m_rect
 
- Protected Attributes inherited from NanoEngineObject< T >
T * m_tiler = nullptr
 Active tiler, assigned to the NanoEngineObject.
 
NanoEngineObject< T > * m_next = nullptr
 Next NanoEngineObject in the list.
 

Detailed Description

template<class T>
class NanoSprite< T >

This is template class for user sprites implementations. NanoSprite can work only as part of NanoEngine.

Definition at line 45 of file sprite.h.

Constructor & Destructor Documentation

◆ NanoSprite()

template<class T>
NanoSprite< T >::NanoSprite ( const NanoPoint pos,
const NanoPoint size,
const uint8_t *  bitmap 
)
inline

Creates sprite object of variable size. Such sprites can change their size and bitmap content.

Parameters
posposition of the sprite in global coordinates
sizesize of sprite
bitmapsprite content (in flash memory)

Definition at line 55 of file sprite.h.

Member Function Documentation

◆ draw()

template<class T>
void NanoSprite< T >::draw ( )
inlineoverridevirtual

Draws nano object Engine canvas

Reimplemented from NanoObject< T >.

Definition at line 61 of file sprite.h.

◆ getBitmap()

template<class T>
const uint8_t* NanoSprite< T >::getBitmap ( )
inline

Returns pointer to sprite bitmap data. The data are located in the Flash memory.

Definition at line 79 of file sprite.h.

◆ setBitmap()

template<class T>
void NanoSprite< T >::setBitmap ( const uint8_t *  bitmap)
inline

Replaces sprite bitmap with new one.

Definition at line 70 of file sprite.h.


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