NXWidgets  1.19
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NXWidgets::CBitmap Class Reference

#include <cbitmap.hxx>

Inheritance diagram for NXWidgets::CBitmap:
Inheritance graph

Public Member Functions

 CBitmap (const struct SBitmap *bitmap)
 
 ~CBitmap (void)
 
const uint8_t getColorFormat (void) const
 
const uint8_t getBitsPerPixel (void) const
 
const nxgl_coord_t getWidth (void) const
 
const nxgl_coord_t getHeight (void) const
 
const size_t getStride (void) const
 
void setSelected (bool selected)
 
bool getRun (nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, FAR void *data)
 
- Public Member Functions inherited from NXWidgets::IBitmap
virtual ~IBitmap (void)
 

Protected Member Functions

 CBitmap (const CBitmap &bitmap)
 

Protected Attributes

const struct SBitmapm_bitmap
 

Detailed Description

Class providing bitmap accessor for a bitmap represented by SBitmap.

Definition at line 117 of file cbitmap.hxx.

Constructor & Destructor Documentation

◆ CBitmap() [1/2]

NXWidgets::CBitmap::CBitmap ( const CBitmap bitmap)
inlineprotected

Copy constructor is protected to prevent usage.

Definition at line 126 of file cbitmap.hxx.

◆ CBitmap() [2/2]

CBitmap::CBitmap ( const struct SBitmap bitmap)

Constructor.

Parameters
bitmapThe bitmap structure being wrapped.

Definition at line 100 of file cbitmap.cxx.

◆ ~CBitmap()

NXWidgets::CBitmap::~CBitmap ( void  )
inline

Destructor.

Definition at line 142 of file cbitmap.hxx.

Member Function Documentation

◆ getBitsPerPixel()

const uint8_t CBitmap::getBitsPerPixel ( void  ) const
virtual

Get the bitmap's color format.

Returns
The bitmap's color format.

Implements NXWidgets::IBitmap.

Definition at line 119 of file cbitmap.cxx.

◆ getColorFormat()

const uint8_t CBitmap::getColorFormat ( void  ) const
virtual

Get the bitmap's color format.

Returns
The bitmap's width.

Implements NXWidgets::IBitmap.

Definition at line 108 of file cbitmap.cxx.

◆ getHeight()

const nxgl_coord_t CBitmap::getHeight ( void  ) const
virtual

Get the bitmap's height (in rows).

Returns
The bitmap's height.

Implements NXWidgets::IBitmap.

Definition at line 141 of file cbitmap.cxx.

◆ getRun()

bool CBitmap::getRun ( nxgl_coord_t  x,
nxgl_coord_t  y,
nxgl_coord_t  width,
FAR void *  data 
)
virtual

Get one row from the bit map image.

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.

Implements NXWidgets::IBitmap.

Definition at line 170 of file cbitmap.cxx.

◆ getStride()

const size_t CBitmap::getStride ( void  ) const
virtual

Get the bitmap's width (in bytes).

Returns
The bitmap's width.

Implements NXWidgets::IBitmap.

Definition at line 152 of file cbitmap.cxx.

◆ getWidth()

const nxgl_coord_t CBitmap::getWidth ( void  ) const
virtual

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

Returns
The bitmap's pixel depth.

Implements NXWidgets::IBitmap.

Definition at line 130 of file cbitmap.cxx.

◆ setSelected()

void NXWidgets::CBitmap::setSelected ( bool  selected)
inlinevirtual

Use the colors associated with a selected image.

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

Implements NXWidgets::IBitmap.

Definition at line 191 of file cbitmap.hxx.

Member Data Documentation

◆ m_bitmap

const struct SBitmap* NXWidgets::CBitmap::m_bitmap
protected

The bitmap that is being managed

Definition at line 120 of file cbitmap.hxx.


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