touchgfx::ScalableImage is only used within TouchGFX.
 
Symbols
loading...
Files
loading...

touchgfx::ScalableImage class

@class ScalableImage ScalableImage.hpp touchgfx/widgets/ScalableImage.hpp Widget for representing a scaled version of a bitmap. Widget for representing a scaled version of a bitmap. Simply change the width/height of the widget to resize the image. The quality of the scaled image depends of the rendering algorithm used. The rendering algorithm can be changed dynamically. Please note that scaling images is done at runtime and requires a lot of calculations. Therefore use it with some care. Note that this widget does not support 1 bit per pixel color depth. @see Widget

Syntax

class ScalableImage : public Widget { public:     enum ScalingAlgorithm     {         NEAREST_NEIGHBOR,         BILINEAR_INTERPOLATION     };     ScalableImage();     virtual ~ScalableImage();     virtual void setBitmap(const Bitmap& bmp);     Bitmap getBitmap() const     {         return bitmap;     }     virtual void setAlpha(uint8_t alpha)     {         this->alpha = alpha;     }     virtual uint8_t getAlpha() const     {         return alpha;     }     virtual void setScalingAlgorithm(ScalingAlgorithm algorithm);     virtual ScalingAlgorithm getScalingAlgorithm();     virtual void draw(const Rect& invalidatedArea) const;     virtual Rect getSolidRect() const;     virtual uint16_t getType() const     {         return (uint16_t)TYPE_SCALABLEIMAGE;     } protected:     ScalingAlgorithm currentScalingAlgorithm;      Bitmap           bitmap;                       uint8_t          alpha;                        void drawTriangle(const Rect& invalidatedArea, uint16_t* fb, const float* triangleXs, const float* triangleYs, const float* triangleZs, const float* triangleUs, const float* triangleVs) const;     RenderingVariant lookupRenderVariant() const; };

Fields

currentScalingAlgorithm

No summary provided. Read more...

bitmap

No summary provided. Read more...

alpha

No summary provided. Read more...

Methods

setBitmap()

@fn virtual void ScalableImage::setBitmap(const Bitmap& bmp); Sets the bitmap for the image. Sets the bitmap for the image. Read more...

getBitmap() const

@fn Bitmap ScalableImage::getBitmap() const Gets the bitmap for the image. Gets the bitmap for the image. Read more...

setAlpha()

@fn virtual void ScalableImage::setAlpha(uint8_t alpha) Sets the alpha channel for the image. Sets the alpha channel for the image. Read more...

getAlpha() const

@fn virtual uint8_t ScalableImage::getAlpha() const Gets the current alpha value. Gets the current alpha value. Read more...

setScalingAlgorithm()

@fn virtual void ScalableImage::setScalingAlgorithm(ScalingAlgorithm algorithm); Sets the algorithm to be used. Sets the algorithm to be used. Read more...

getScalingAlgorithm()

@fn virtual ScalingAlgorithm ScalableImage::getScalingAlgorithm(); Gets the algorithm used when rendering. Gets the algorithm used when rendering. Read more...

draw() const

@fn virtual void ScalableImage::draw(const Rect& invalidatedArea) const; Draws the given invalidated area. Draws the given invalidated area. @see Drawable::draw(). Read more...

getSolidRect() const

@fn virtual Rect ScalableImage::getSolidRect() const; Gets solid rectangle. Gets solid rectangle. @see Drawable::getSolidRect(). Read more...

getType() const

@fn virtual uint16_t ScalableImage::getType() const For GUI testing only. For GUI testing only. Returns type of this drawable. Read more...

drawTriangle() const

@fn void ScalableImage::drawTriangle(const Rect& invalidatedArea, uint16_t* fb, const float* triangleXs, const float* triangleYs, const float* triangleZs, const float* triangleUs, const float* triangleVs) const; Draw a triangle part of the bitmap. Draw a triangle part of the bitmap. Read more...

lookupRenderVariant() const

@fn RenderingVariant ScalableImage::lookupRenderVariant() const; Looks up the appropriate render variant based on the bitmap format and scaling algorithm. Looks up the appropriate render variant based on the bitmap format and scaling algorithm. Read more...

References

LocationReferrerScopeText
ScalableImage.hpp:39
class ScalableImage : public Widget
ZoomAnimationImage.hpp:278
virtual void setScalingMode(ScalableImage::ScalingAlgorithm mode);
ZoomAnimationImage.hpp:289
virtual ScalableImage::ScalingAlgorithm getScalingMode();
ZoomAnimationImage.hpp:409touchgfx::ZoomAnimationImage::scalableImagetouchgfx::ZoomAnimationImage
ScalableImage scalableImage; ///< The scalable image for displaying the bitmap when the width/height is not equal one of the bitmaps

Class Tree

Child classes
touchgfx::ScalableImage
all items filtered out
Variables of touchgfx::ScalableImage type
touchgfx::ScalableImage