|
NXWidgets
1.19
|
#include <cscaledbitmap.hxx>

Public Member Functions | |
| CScaledBitmap (IBitmap *bitmap, struct nxgl_size_s &newSize) | |
| ~CScaledBitmap (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 | |
| bool | cacheRows (unsigned int row) |
| bool | scaleColor (FAR const struct rgbcolor_s &incolor1, FAR const struct rgbcolor_s &incolor2, b16_t fraction, FAR struct rgbcolor_s &outcolor) |
| bool | rowColor (FAR uint8_t *row, b16_t column, FAR struct rgbcolor_s &outcolor) |
| CScaledBitmap (const CScaledBitmap &bitmap) | |
Protected Attributes | |
| FAR IBitmap * | m_bitmap |
| struct nxgl_size_s | m_size |
| FAR uint8_t * | m_rowCache [2] |
| unsigned int | m_row |
| b16_t | m_xScale |
| b16_t | m_yScale |
Class for scaling layer for any bitmap that inherits from IBitMap
Definition at line 72 of file cscaledbitmap.hxx.
|
inlineprotected |
Copy constructor is protected to prevent usage.
Definition at line 121 of file cscaledbitmap.hxx.
| CScaledBitmap::CScaledBitmap | ( | IBitmap * | bitmap, |
| struct nxgl_size_s & | newSize | ||
| ) |
Constructor.
| bitmap | The bitmap structure being scaled. The new, scaled size of the image |
Definition at line 67 of file cscaledbitmap.cxx.
| CScaledBitmap::~CScaledBitmap | ( | void | ) |
Destructor.
Definition at line 102 of file cscaledbitmap.cxx.
|
protected |
Read two rows into the row cache
| row | - The row number of the first row to cache |
Definition at line 363 of file cscaledbitmap.cxx.
|
virtual |
Get the bitmap's color format.
Get the bitmap's color format.
Implements NXWidgets::IBitmap.
Definition at line 141 of file cscaledbitmap.cxx.
|
virtual |
Get the bitmap's color format.
Get the bitmap's color format.
Implements NXWidgets::IBitmap.
Definition at line 130 of file cscaledbitmap.cxx.
|
virtual |
Get the bitmap's height (in rows).
Implements NXWidgets::IBitmap.
Definition at line 163 of file cscaledbitmap.cxx.
|
virtual |
Get one row from the bit map image.
| x | The offset into the row to get |
| y | The row number to get |
| width | The number of pixels to get from the row |
| data | The 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. |
| True | if the run was returned successfully. |
Get one row from the bit map image.
REVISIT: This algorithm is really intended to expand images. Hence, for example, interpolation is between row and row+1 and column and column+1 in the original, unscaled image. You would the interpolation differently if you really wanted to sub-sample well.
| x | The offset into the row to get |
| y | The row number to get |
| width | The number of pixels to get from the row |
| data | The 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. |
| True | if the run was returned successfully. |
Implements NXWidgets::IBitmap.
Definition at line 197 of file cscaledbitmap.cxx.
|
virtual |
Get the bitmap's width (in bytes).
Implements NXWidgets::IBitmap.
Definition at line 174 of file cscaledbitmap.cxx.
|
virtual |
Get the bitmap's width (in pixels/columns).
Get the bitmap's width (in pixels/columns).
Implements NXWidgets::IBitmap.
Definition at line 152 of file cscaledbitmap.cxx.
|
protected |
Given an image row and a non-integer column offset, return the interpolated RGB color value corresponding to that position
| row | - The pointer to the row in the row cache to use |
| column | - The non-integer column offset |
| outcolor | - The returned, interpolated color |
Definition at line 490 of file cscaledbitmap.cxx.
|
protected |
Given an two RGB colors and a fractional value, return the scaled value between the two colors.
| incolor1 | - The first color to be used |
| incolor2 | - The second color to be used |
| fraction | - The fractional value |
| outcolor | - The returned, scaled color |
Definition at line 446 of file cscaledbitmap.cxx.
|
inlinevirtual |
Use the colors associated with a selected image.
| selected. | true: Use colors for a selected widget, false: Use normal (default) colors. |
Implements NXWidgets::IBitmap.
Definition at line 187 of file cscaledbitmap.hxx.
|
protected |
The bitmap that is being scaled
Definition at line 75 of file cscaledbitmap.hxx.
|
protected |
Row number of the first cached row
Definition at line 78 of file cscaledbitmap.hxx.
|
protected |
Two cached rows of the image
Definition at line 77 of file cscaledbitmap.hxx.
|
protected |
Scaled size of the image
Definition at line 76 of file cscaledbitmap.hxx.
|
protected |
X scale factor
Definition at line 79 of file cscaledbitmap.hxx.
|
protected |
Y scale factor
Definition at line 80 of file cscaledbitmap.hxx.
1.8.13