From 24ee5014675d43c80c0580882fe5cc24ca17e7a8 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 15 Oct 2013 11:09:20 -0600 Subject: NxWidgets::CScaledImage: New class that wraps any class that provides IBitMap and adds image scaling --- NxWidgets/libnxwidgets/src/cbitmap.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'NxWidgets/libnxwidgets/src/cbitmap.cxx') diff --git a/NxWidgets/libnxwidgets/src/cbitmap.cxx b/NxWidgets/libnxwidgets/src/cbitmap.cxx index c9c974814..c0cf71ea4 100644 --- a/NxWidgets/libnxwidgets/src/cbitmap.cxx +++ b/NxWidgets/libnxwidgets/src/cbitmap.cxx @@ -149,7 +149,7 @@ const nxgl_coord_t CBitmap::getHeight(void) const * @return The bitmap's width. */ -const nxgl_coord_t CBitmap::getStride(void) const +const size_t CBitmap::getStride(void) const { return m_bitmap->stride; } @@ -172,7 +172,7 @@ bool CBitmap::getRun(nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, { // Check ranges. Casts to unsigned int are ugly but permit one-sided comparisons - if (((unsigned int)x < (unsigned int)width) && + if (((unsigned int)x < (unsigned int)m_bitmap->width) && ((unsigned int)(x + width) <= (unsigned int)m_bitmap->width) && ((unsigned int)y < (unsigned int)m_bitmap->height)) { -- cgit v1.2.3