@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
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...