summaryrefslogtreecommitdiff
path: root/NxWidgets/libnxwidgets
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-17 10:15:41 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-17 10:15:41 -0600
commitbca3ae582082e0582d3068c12abe2c51413305b8 (patch)
tree131b502d73af9a7d34e14bef7e5c76153f7e713e /NxWidgets/libnxwidgets
parent3ff27530a8b837742bf8a5a1e2ca3007c89431fc (diff)
downloadnuttx-bca3ae582082e0582d3068c12abe2c51413305b8.tar.gz
nuttx-bca3ae582082e0582d3068c12abe2c51413305b8.tar.bz2
nuttx-bca3ae582082e0582d3068c12abe2c51413305b8.zip
NxWidgets::CImage: Should not attempt to draw the empty regions at the top and the bottom of the image box in greyscale
Diffstat (limited to 'NxWidgets/libnxwidgets')
-rw-r--r--NxWidgets/libnxwidgets/src/cimage.cxx30
1 files changed, 7 insertions, 23 deletions
diff --git a/NxWidgets/libnxwidgets/src/cimage.cxx b/NxWidgets/libnxwidgets/src/cimage.cxx
index 1140df35d..713078f22 100644
--- a/NxWidgets/libnxwidgets/src/cimage.cxx
+++ b/NxWidgets/libnxwidgets/src/cimage.cxx
@@ -230,18 +230,10 @@ void CImage::drawContents(CGraphicsPort *port, bool selected)
for (int padRow = 0; padRow < m_origin.y; padRow++, destRow++)
{
- // Put the padded row on the display
+ // Put the padded row on the display (never greyscale)
- if (isEnabled())
- {
- port->drawBitmap(rect.getX(), destRow, rect.getWidth(), 1,
- &bitmap, 0, 0);
- }
- else
- {
- port->drawBitmapGreyScale(rect.getX(), destRow, rect.getWidth(),
- 1, &bitmap, 0, 0);
- }
+ port->drawBitmap(rect.getX(), destRow, rect.getWidth(), 1,
+ &bitmap, 0, 0);
}
// This is the number of rows that we can draw at the top of the display
@@ -303,7 +295,7 @@ void CImage::drawContents(CGraphicsPort *port, bool selected)
else
{
port->drawBitmapGreyScale(rect.getX(), destRow,
- rect.getWidth(), 1, &bitmap, 0, 0);
+ rect.getWidth(), 1, &bitmap, 0, 0);
}
}
}
@@ -324,18 +316,10 @@ void CImage::drawContents(CGraphicsPort *port, bool selected)
for (; destRow < rect.getHeight(); destRow++)
{
- // Put the padded row on the display
+ // Put the padded row on the display (never greyscale)
- if (isEnabled())
- {
- port->drawBitmap(rect.getX(), destRow, rect.getWidth(), 1,
- &bitmap, 0, 0);
- }
- else
- {
- port->drawBitmapGreyScale(rect.getX(), destRow,
- rect.getWidth(), 1, &bitmap, 0, 0);
- }
+ port->drawBitmap(rect.getX(), destRow, rect.getWidth(), 1,
+ &bitmap, 0, 0);
}
}