NXWidgets  1.19
Public Member Functions | List of all members
NXWidgets::IBitmap Class Referenceabstract

#include <ibitmap.hxx>

Inheritance diagram for NXWidgets::IBitmap:
Inheritance graph

Public Member Functions

virtual ~IBitmap (void)
 
virtual const uint8_t getColorFormat (void) const =0
 
virtual const uint8_t getBitsPerPixel (void) const =0
 
virtual const nxgl_coord_t getWidth (void) const =0
 
virtual const nxgl_coord_t getHeight (void) const =0
 
virtual const size_t getStride (void) const =0
 
virtual void setSelected (bool selected)=0
 
virtual bool getRun (nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, FAR void *data)=0
 

Detailed Description

Abstract class defining the basic properties of a source bitmap. The primary intent of this class is two support a variety of sources of bitmap data with various kinds of compression.

Definition at line 103 of file ibitmap.hxx.

Constructor & Destructor Documentation

◆ ~IBitmap()

virtual NXWidgets::IBitmap::~IBitmap ( void  )
inlinevirtual

A virtual destructor is required in order to override the IBitmap destructor. We do this because if we delete IBitmap, we want the destructor of the class that inherits from IBitmap to run, not this one.

Definition at line 113 of file ibitmap.hxx.

Member Function Documentation

◆ getBitsPerPixel()

virtual const uint8_t NXWidgets::IBitmap::getBitsPerPixel ( void  ) const
pure virtual

Get the bitmap's color format.

Returns
The bitmap's color format.

Implemented in NXWidgets::CRlePaletteBitmap, NXWidgets::CBitmap, and NXWidgets::CScaledBitmap.

◆ getColorFormat()

virtual const uint8_t NXWidgets::IBitmap::getColorFormat ( void  ) const
pure virtual

Get the bitmap's color format.

Returns
The bitmap's color format.

Implemented in NXWidgets::CRlePaletteBitmap, NXWidgets::CBitmap, and NXWidgets::CScaledBitmap.

◆ getHeight()

virtual const nxgl_coord_t NXWidgets::IBitmap::getHeight ( void  ) const
pure virtual

Get the bitmap's height (in rows).

Returns
The bitmap's height (in rows).

Implemented in NXWidgets::CRlePaletteBitmap, NXWidgets::CBitmap, and NXWidgets::CScaledBitmap.

◆ getRun()

virtual bool NXWidgets::IBitmap::getRun ( nxgl_coord_t  x,
nxgl_coord_t  y,
nxgl_coord_t  width,
FAR void *  data 
)
pure virtual

Get one row from the bit map image using the selected colors.

Parameters
xThe offset into the row to get
yThe row number to get
widthThe number of pixels to get from the row
dataThe memory location provided by the caller in which to return the data. This should be at least (getWidth()*getBitsPerPixl() + 7)/8 bytes in length and properly aligned for the pixel color format.
Trueif the run was returned successfully.

Implemented in NXWidgets::CRlePaletteBitmap, NXWidgets::CBitmap, and NXWidgets::CScaledBitmap.

◆ getStride()

virtual const size_t NXWidgets::IBitmap::getStride ( void  ) const
pure virtual

Get the bitmap's width (in bytes).

Returns
The bitmap's width.

Implemented in NXWidgets::CRlePaletteBitmap, NXWidgets::CBitmap, and NXWidgets::CScaledBitmap.

◆ getWidth()

virtual const nxgl_coord_t NXWidgets::IBitmap::getWidth ( void  ) const
pure virtual

Get the bitmap's width (in pixels/columns).

Returns
The bitmap's width (in pixels/columns).

Implemented in NXWidgets::CRlePaletteBitmap, NXWidgets::CBitmap, and NXWidgets::CScaledBitmap.

◆ setSelected()

virtual void NXWidgets::IBitmap::setSelected ( bool  selected)
pure virtual

Use the colors associated with a selected image.

Parameters
selected.true: Use colors for a selected widget, false: Use normal (default) colors.

Implemented in NXWidgets::CRlePaletteBitmap, NXWidgets::CBitmap, and NXWidgets::CScaledBitmap.


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