TouchGFX + 0/3 examples
CodeScope will show references to touchgfx::ZoomAnimationImage from the following samples and libraries:
Examples
STM32469I-Discovery
Demonstrations
STM32469I_EVAL
Demonstrations
STM324x9I_EVAL
Demonstrations
 
Symbols
loading...
Files
loading...

touchgfx::ZoomAnimationImage class

@class ZoomAnimationImage ZoomAnimationImage.hpp touchgfx/containers/ZoomAnimationImage.hpp Class for optimizing and wrapping move and zoom operations on ScalableImages. Class for optimizing and wrapping move and zoom operations on ScalableImages. The ZoomAnimationImage takes two bitmaps representing the same image but at a small and a large resolution. These bitmaps should be the sizes that are used when not animating the image. The ZoomAnimationImage will use an Image for displaying the bitmap when its width and height matches one of them. When it does not it will use a ScalableImage instead. The main idea is that the supplied bitmaps should be the end points of the zoom animation so that it ends up using an Image when not animating. This is, however, not a required. You can animate from and to sizes that are not equal the sizes of the bitmaps. The result is a container that has the high performance of an ordinary image when the size matches the prerendered bitmaps. Moreover it supplies easy to use animation functions that lets you zoom and move the image. @see ScalableImage

Syntax

class ZoomAnimationImage : public touchgfx::Container { public:     enum ZoomMode     {         FIXED_CENTER = 0,         FIXED_LEFT,         FIXED_RIGHT,         FIXED_TOP,         FIXED_BOTTOM,         FIXED_LEFT_AND_TOP,         FIXED_RIGHT_AND_TOP,         FIXED_LEFT_AND_BOTTOM,         FIXED_RIGHT_AND_BOTTOM     };     ZoomAnimationImage();     virtual ~ZoomAnimationImage();     void startZoomAnimation(int16_t endWidth, int16_t endHeight, uint16_t duration, ZoomMode zoomMode = FIXED_LEFT_AND_TOP, touchgfx::EasingEquation widthProgressionEquation = &touchgfx::EasingEquations::linearEaseNone, EasingEquation heightProgressionEquation = &touchgfx::EasingEquations::linearEaseNone);     void startZoomAndMoveAnimation(int16_t endX, int16_t endY, int16_t endWidth, int16_t endHeight, uint16_t duration, ZoomMode zoomMode = FIXED_LEFT_AND_TOP, EasingEquation xProgressionEquation = &touchgfx::EasingEquations::linearEaseNone, EasingEquation yProgressionEquation = &touchgfx::EasingEquations::linearEaseNone, EasingEquation widthProgressionEquation = &touchgfx::EasingEquations::linearEaseNone, EasingEquation heightProgressionEquation = &touchgfx::EasingEquations::linearEaseNone);     void cancelZoomAnimation();     virtual void handleTickEvent();     void setBitmaps(const Bitmap& smallBitmap, const Bitmap& largeBitmap);     Bitmap getSmallBitmap() const     {         return smallBmp;     }     Bitmap getLargeBitmap() const     {         return largeBmp;     }     virtual void setPosition(int16_t x, int16_t y, int16_t width, int16_t height);     virtual void setWidth(int16_t width);     virtual void setHeight(int16_t height);     virtual void setDimension(int16_t width, int16_t height);     virtual void setScalingMode(ScalableImage::ScalingAlgorithm mode);     virtual ScalableImage::ScalingAlgorithm getScalingMode();     virtual void setAlpha(uint8_t alpha);     virtual uint8_t getAlpha() const;     virtual void setAnimationDelay(uint16_t delay);     virtual uint16_t getAnimationDelay() const;     void setAnimationEndedCallback(touchgfx::GenericCallback< const ZoomAnimationImage& >& callback)     {         animationEndedAction = &callback;     }     virtual bool isRunning() const;     virtual bool isZoomAnimationRunning() const;     virtual uint16_t getType() const     {         return (uint16_t)TYPE_ZOOMANIMATIONIMAGE;     } protected:     enum States     {         ANIMATE_ZOOM,                   ANIMATE_ZOOM_AND_MOVE,          NO_ANIMATION                };     States           currentState;                     uint32_t         animationCounter;                 uint16_t         zoomAnimationDelay;               touchgfx::Bitmap smallBmp;                         touchgfx::Bitmap largeBmp;                         touchgfx::Image  image;                            ScalableImage    scalableImage;                    ZoomMode         currentZoomMode;                  int16_t          zoomAnimationStartWidth;          int16_t          zoomAnimationStartHeight;         int16_t          zoomAnimationEndWidth;            int16_t          zoomAnimationEndHeight;           int16_t          zoomAnimationStartX;              int16_t          zoomAnimationStartY;              int16_t          zoomAnimationDeltaX;              int16_t          zoomAnimationDeltaY;              int16_t          moveAnimationEndX;                int16_t          moveAnimationEndY;                uint16_t         animationDuration;                EasingEquation   zoomAnimationWidthEquation;       EasingEquation   zoomAnimationHeightEquation;      EasingEquation   moveAnimationXEquation;           EasingEquation   moveAnimationYEquation;           touchgfx::GenericCallback<const ZoomAnimationImage&>* animationEndedAction;      virtual void updateRenderingMethod();     virtual void setCurrentState(States state);     void startTimerAndSetParameters(int16_t endWidth, int16_t endHeight, uint16_t duration, ZoomMode zoomMode, EasingEquation widthProgressionEquation, EasingEquation heightProgressionEquation);     virtual void updateZoomAnimationDeltaXY(); };

Fields

zoomAnimationStartY

No summary provided. Read more...

zoomAnimationDeltaX

No summary provided. Read more...

zoomAnimationDeltaY

No summary provided. Read more...

moveAnimationEndX

No summary provided. Read more...

moveAnimationEndY

No summary provided. Read more...

animationDuration

No summary provided. Read more...

zoomAnimationWidthEquation

No summary provided. Read more...

zoomAnimationHeightEquation

No summary provided. Read more...

moveAnimationXEquation

No summary provided. Read more...

moveAnimationYEquation

No summary provided. Read more...

animationEndedAction

No summary provided. Read more...

currentState

No summary provided. Read more...

animationCounter

No summary provided. Read more...

zoomAnimationDelay

No summary provided. Read more...

smallBmp

No summary provided. Read more...

largeBmp

No summary provided. Read more...

image

No summary provided. Read more...

scalableImage

No summary provided. Read more...

currentZoomMode

No summary provided. Read more...

zoomAnimationStartWidth

No summary provided. Read more...

zoomAnimationStartHeight

No summary provided. Read more...

zoomAnimationEndWidth

No summary provided. Read more...

zoomAnimationEndHeight

No summary provided. Read more...

zoomAnimationStartX

No summary provided. Read more...

Methods

updateRenderingMethod()

@fn virtual void ZoomAnimationImage::updateRenderingMethod(); Chooses the optimal rendering of the image given the current width and height. Chooses the optimal rendering of the image given the current width and height. Read more...

setCurrentState()

@fn virtual void ZoomAnimationImage::setCurrentState(States state); Sets the current animation state. Sets the current animation state. Read more...

startTimerAndSetParameters()

@fn void ZoomAnimationImage::startTimerAndSetParameters(int16_t endWidth, int16_t endHeight, uint16_t duration, ZoomMode zoomMode, EasingEquation widthProgressionEquation, EasingEquation heightProgressionEquation) Starts timer and set parameters. Starts timer and set parameters. Contains code shared between startZoomAnimation() and startZoomAndMoveAnimation(). If both delay and duration is zero, the end position and size is applied and the animation is ended. Read more...

updateZoomAnimationDeltaXY()

@fn virtual void ZoomAnimationImage::updateZoomAnimationDeltaXY(); Calculates the change in X and Y caused by the zoom animation given the current ZoomMode. Calculates the change in X and Y caused by the zoom animation given the current ZoomMode. Read more...

startZoomAnimation()

@fn void ZoomAnimationImage::startZoomAnimation(int16_t endWidth, int16_t endHeight, uint16_t duration, ZoomMode zoomMode = FIXED_LEFT_AND_TOP, touchgfx::EasingEquation widthProgressionEquation = &touchgfx::EasingEquations::linearEaseNone, EasingEquation heightProgressionEquation = &touchgfx::EasingEquations::linearEaseNone); Setup and starts the zoom animation. Setup and starts the zoom animation. At end of the animation the image will have been resized to the endWidth and endHeight. The development of the width and height during the animation is described by the supplied EasingEquations. The container is registered as a TimerWidget. Unregistering is handled automatically when the animation has finished. Note that the animation follows the specified ZoomMode so the X and Y of the image might change during animation. Read more...

startZoomAndMoveAnimation()

@fn void ZoomAnimationImage::startZoomAndMoveAnimation(int16_t endX, int16_t endY, int16_t endWidth, int16_t endHeight, uint16_t duration, ZoomMode zoomMode = FIXED_LEFT_AND_TOP, EasingEquation xProgressionEquation = &touchgfx::EasingEquations::linearEaseNone, EasingEquation yProgressionEquation = &touchgfx::EasingEquations::linearEaseNone, EasingEquation widthProgressionEquation = &touchgfx::EasingEquations::linearEaseNone, EasingEquation heightProgressionEquation = &touchgfx::EasingEquations::linearEaseNone); Setup and starts the zoom and move animation. Setup and starts the zoom and move animation. At end of the animation the image will have been resized to the endWidth and endHeight and have moved from its original position to the endX and endY. Please note that the ZoomMode might influence the actual end position since the zoom transformation might change the X and Y of the image. The ZoomMode FIXED_LEFT_AND_TOP ensures that the endX and endY will be the actual end position. The development of the width, height, X and Y during the animation is described by the supplied EasingEquations. The container is registered as a TimerWidget. Unregistering is handled automatically when the animation has finished. Read more...

cancelZoomAnimation()

@fn void ZoomAnimationImage::cancelZoomAnimation(); Cancel zoom animation. Read more...

handleTickEvent()

@fn virtual void ZoomAnimationImage::handleTickEvent(); The tick handler. The tick handler. Read more...

setBitmaps()

@fn void ZoomAnimationImage::setBitmaps(const Bitmap& smallBitmap, const Bitmap& largeBitmap); Initializes the bitmap of the image to be used. Initializes the bitmap of the image to be used. The bitmaps should represent the same image in the two needed static resolutions. Note that it is possible to scale the image beyond the sizes of these bitmaps. Read more...

getSmallBitmap() const

@fn Bitmap ZoomAnimationImage::getSmallBitmap() const Gets the small bitmap. Gets the small bitmap. Read more...

getLargeBitmap() const

@fn Bitmap ZoomAnimationImage::getLargeBitmap() const Gets the large bitmap. Gets the large bitmap. Read more...

setPosition()

@fn virtual void ZoomAnimationImage::setPosition(int16_t x, int16_t y, int16_t width, int16_t height); Sets the size and position of the image, relative to its parent. Sets the size and position of the image, relative to its parent. Chooses the optimal rendering method afterwards The image is automatically invalidated. Read more...

setWidth()

@fn virtual void ZoomAnimationImage::setWidth(int16_t width); Sets the width of the image. Sets the width of the image. Chooses the optimal rendering method afterwards The image is automatically invalidated. Read more...

setHeight()

@fn virtual void ZoomAnimationImage::setHeight(int16_t height); Sets the height of the image. Sets the height of the image. Chooses the optimal rendering method afterwards. The image is automatically invalidated. Read more...

setDimension()

@fn virtual void ZoomAnimationImage::setDimension(int16_t width, int16_t height); Sets the width and height of the image. Sets the width and height of the image. Chooses the optimal rendering method afterwards The image is automatically invalidated. Read more...

setScalingMode()

@fn virtual void ZoomAnimationImage::setScalingMode(ScalableImage::ScalingAlgorithm mode); Sets the scaling algorithm of the ScalableImage. Sets the scaling algorithm of the ScalableImage. Read more...

getScalingMode()

@fn virtual ScalableImage::ScalingAlgorithm ZoomAnimationImage::getScalingMode(); Gets the scaling algorithm of the ScalableImage. Gets the scaling algorithm of the ScalableImage. Read more...

setAlpha()

@fn virtual void ZoomAnimationImage::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 ZoomAnimationImage::getAlpha() const; Gets the current alpha value. Gets the current alpha value. Read more...

setAnimationDelay()

@fn virtual void ZoomAnimationImage::setAnimationDelay(uint16_t delay); Sets a delay on animations done by the ZoomAnimationImage. Sets a delay on animations done by the ZoomAnimationImage. Defaults to 0. Read more...

getAnimationDelay() const

@fn virtual uint16_t ZoomAnimationImage::getAnimationDelay() const; Gets the current animation delay. Gets the current animation delay. Read more...

setAnimationEndedCallback()

@fn void ZoomAnimationImage::setAnimationEndedCallback(touchgfx::GenericCallback& callback) Associates an action to be performed when the animation ends. Associates an action to be performed when the animation ends. @see GenericCallback. Read more...

isRunning() const

@fn virtual bool ZoomAnimationImage::isRunning() const; Is there currently an animation running. Is there currently an animation running. Read more...

isZoomAnimationRunning() const

@fn virtual bool ZoomAnimationImage::isZoomAnimationRunning() const; Is there currently an animation running. Is there currently an animation running. Read more...

getType() const

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

Examples

touchgfx::ZoomAnimationImage is referenced by 3 libraries and example projects.

References

LocationText
ZoomAnimationImage.hpp:49
class ZoomAnimationImage : public touchgfx::Container

Class Tree

Child classes
touchgfx::ZoomAnimationImage
all items filtered out