diff options
author | mrwastl <mrwastl@users.sourceforge.net> | 2011-10-24 20:00:59 +0200 |
---|---|---|
committer | mrwastl <mrwastl@users.sourceforge.net> | 2011-10-24 20:00:59 +0200 |
commit | b560da0e0e08d791bbc404da19c394657af816ac (patch) | |
tree | e00bd6101f197e61eb62b95ff1c4746386fb33bd /glcdskin/object.c | |
parent | d14d492732a84e1bda42b0a4a249c83a7d99b93c (diff) | |
download | graphlcd-base-b560da0e0e08d791bbc404da19c394657af816ac.tar.gz graphlcd-base-b560da0e0e08d791bbc404da19c394657af816ac.tar.bz2 |
cImageFile: scaling support for non-ImageMagick files (-> pbm, glcd); serdisp.[ch]: paranoia checks (SetBrightness()!), encapsulation of touch events; cImageCache: syslog message after successful loading of an image; cSkinObject: beauty fix
Diffstat (limited to 'glcdskin/object.c')
-rw-r--r-- | glcdskin/object.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glcdskin/object.c b/glcdskin/object.c index 7e99092..204b0d4 100644 --- a/glcdskin/object.c +++ b/glcdskin/object.c @@ -484,9 +484,9 @@ void cSkinObject::Render(GLCD::cBitmap * screen) uint16_t xoff = 0; uint16_t yoff = 0; if (scalew || scaleh) { - if (image->Width() < Size().w) { + if (image->Width() < (uint16_t)Size().w) { xoff = (Size().w - image->Width() ) / 2; - } else if (image->Height() < Size().h) { + } else if (image->Height() < (uint16_t)Size().h) { yoff = (Size().h - image->Height() ) / 2; } } |