74 #include <nuttx/config.h> 80 #include <nuttx/nx/nxglib.h> 113 nxgl_coord_t width, nxgl_coord_t height, FAR
IBitmap *
bitmap,
115 :
CNxWidget(pWidgetControl, x, y, width, height, 0, style)
201 bitmap.
data = buffer;
220 for (
int column = 0; column < rect.
getWidth(); column++)
227 nxgl_coord_t destRow = rect.
getY();
231 for (
int padRow = 0; padRow <
m_origin.y; padRow++, destRow++)
241 nxgl_coord_t nTopRows = bottomRow -
m_origin.y;
258 nxgl_coord_t nLeftPixels = rightColumn -
m_origin.x;
262 nxgl_coord_t lastTopRow = nTopRows + destRow;
264 for (
int srcRow = 0; destRow < lastTopRow; srcRow++, destRow++)
271 ginfo(
"IBitmap::getRun failed at image row\n", srcRow);
280 for (
int i = 0; i < nLeftPixels; i++, ptr++)
284 if (*ptr == CONFIG_NXWIDGETS_TRANSPARENT_COLOR)
295 else if (*ptr != backColor && !
isEnabled())
309 *ptr = MKRGB(avg, avg, avg);
327 for (
int column = 0; column < rect.
getWidth(); column++)
334 for (; destRow < rect.
getHeight(); destRow++)
void setImageLeft(nxgl_coord_t column)
WidgetBorderSize m_borderSize
bool isClicked(void) const
bool isBorderless(void) const
nxgl_mxpixel_t getShadowEdgeColor(void) const
nxgl_coord_t getHeight(void) const
virtual void onClick(nxgl_coord_t x, nxgl_coord_t y)
void getRect(CRect &rect) const
nxgl_coord_t getWidth(void) const
void drawBevelledRect(nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t height, nxgl_mxpixel_t shineColor, nxgl_mxpixel_t shadowColor)
nxgl_coord_t getX(void) const
virtual bool getRun(nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, FAR void *data)=0
void raiseActionEvent(void)
void drawBitmap(nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t height, const struct SBitmap *bitmap, int bitmapX, int bitmapY)
nxgl_mxpixel_t getBackgroundColor(void) const
virtual const nxgl_coord_t getHeight(void) const =0
void alignHorizontalCenter(void)
void highlight(bool highlightOn)
void getPreferredDimensions(CRect &rect) const
void drawBorder(CGraphicsPort *port, bool selected)
bool isEnabled(void) const
nxgl_coord_t getHeight(void) const
void alignHorizontalRight(void)
void setHeight(nxgl_coord_t height)
void drawContents(CGraphicsPort *port, bool selected)
void setX(nxgl_coord_t x)
void setImageTop(nxgl_coord_t row)
virtual void onPreRelease(nxgl_coord_t x, nxgl_coord_t y)
void alignVerticalCenter(void)
nxgl_mxpixel_t getShineEdgeColor(void) const
virtual void onReleaseOutside(nxgl_coord_t x, nxgl_coord_t y)
struct nxgl_point_s m_origin
CWidgetEventHandlerList * m_widgetEventHandlers
CImage(const CImage &label)
virtual const nxgl_coord_t getWidth(void) const =0
nxgl_coord_t getY(void) const
void setWidth(nxgl_coord_t width)
nxgl_coord_t getWidth(void) const
nxgl_coord_t getX(void) const
nxgl_coord_t getY(void) const
virtual void setSelected(bool selected)=0
static const NXWidgets::SRlePaletteBitmapEntry bitmap[]
virtual const uint8_t getBitsPerPixel(void) const =0
virtual const uint8_t getColorFormat(void) const =0
void setY(nxgl_coord_t y)
virtual void onRelease(nxgl_coord_t x, nxgl_coord_t y)
void alignVerticalBottom(void)