summaryrefslogtreecommitdiff
path: root/glcdgraphics/imagefile.h
diff options
context:
space:
mode:
authormrwastl <mrwastl@users.sourceforge.net>2011-10-24 20:00:59 +0200
committermrwastl <mrwastl@users.sourceforge.net>2011-10-24 20:00:59 +0200
commitb560da0e0e08d791bbc404da19c394657af816ac (patch)
treee00bd6101f197e61eb62b95ff1c4746386fb33bd /glcdgraphics/imagefile.h
parentd14d492732a84e1bda42b0a4a249c83a7d99b93c (diff)
downloadgraphlcd-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 'glcdgraphics/imagefile.h')
-rw-r--r--glcdgraphics/imagefile.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/glcdgraphics/imagefile.h b/glcdgraphics/imagefile.h
index bc7e835..2cc1eba 100644
--- a/glcdgraphics/imagefile.h
+++ b/glcdgraphics/imagefile.h
@@ -21,18 +21,19 @@ class cImage;
class cImageFile
{
+private:
+ uint32_t Blend(uint32_t fgcol, uint32_t bgcol, uint8_t level, double antiAliasGranularity = 0.0) const;
+protected:
+ bool Scale(cImage & image, uint16_t scalew, uint16_t scaleh, bool AntiAlias = false);
public:
cImageFile();
virtual ~cImageFile();
virtual bool Load(cImage & image, const std::string & fileName);
virtual bool Save(cImage & image, const std::string & fileName);
- virtual bool SupportsScaling(void) { return false; }
- virtual bool LoadScaled(cImage & image, const std::string & fileName, uint16_t & scalew, uint16_t & scaleh) {
- scalew = 0;
- scaleh = 0;
- return Load(image, fileName);
- }
+ virtual bool SupportsScaling(void) { return true; }
+
+ virtual bool LoadScaled(cImage & image, const std::string & fileName, uint16_t & scalew, uint16_t & scaleh);
};
} // end of namespace