|
| ScreenImage (const QString &filename, float x, float y, bool show=false, float scale=1., float alpha=1., float fadeDuration=1.) |
| Load an image. More...
|
|
virtual bool | draw (const StelCore *core) |
| Draw the image. More...
|
|
virtual void | update (double deltaTime) |
| update fade for on/off action More...
|
|
virtual void | setFadeDuration (float duration) |
| Set the duration used for the fade in / fade out of the image. More...
|
|
virtual void | setFlagShow (bool b) |
| Show or hide the image (it will fade in/out) More...
|
|
virtual bool | getFlagShow (void) |
| Get the displayed status of the image. More...
|
|
virtual void | setAlpha (float a) |
| Set the image alpha for when it is in full "on" (after fade in). More...
|
|
virtual void | setXY (float x, float y, float duration=0.) |
| Set the x, y position of the image. More...
|
|
virtual void | addXY (float x, float y, float duration=0.) |
| Set the x, y position of the image relative to the current position. More...
|
|
virtual int | imageHeight (void) |
|
virtual int | imageWidth (void) |
|
|
QGraphicsPixmapItem * | tex |
|
QTimeLine * | moveTimer |
|
QTimeLine * | fadeTimer |
|
QGraphicsItemAnimation * | anim |
|
Definition at line 38 of file ScreenImageMgr.hpp.
ScreenImage::ScreenImage |
( |
const QString & |
filename, |
|
|
float |
x, |
|
|
float |
y, |
|
|
bool |
show = false , |
|
|
float |
scale = 1. , |
|
|
float |
alpha = 1. , |
|
|
float |
fadeDuration = 1. |
|
) |
| |
Load an image.
- Parameters
-
filename | the partial path of the file to load. This will be searched for in the scripts directory using StelFileMgr. |
x | the screen x-position for the texture (in pixels), measured from the left side of the screen. |
y | the screen x-position for the texture (in pixels), measured from the bottom of the screen. |
show | the initial displayed status of the image (false == hidden). |
scale | scale factor for the image. 1 = original size, 0.5 = 50% size etc. |
alpha | Alpha (opaqueness) of the image. |
fadeDuration | the time it takes for screen images to fade in/out/change alpha in seconds. |
virtual void ScreenImage::addXY |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
duration = 0. |
|
) |
| |
|
virtual |
Set the x, y position of the image relative to the current position.
- Parameters
-
x | the offset in the x-axis |
y | the offset in the y-axis |
duration | how long for the movement to take in seconds |
virtual bool ScreenImage::draw |
( |
const StelCore * |
core | ) |
|
|
virtual |
Draw the image.
- Parameters
-
virtual bool ScreenImage::getFlagShow |
( |
void |
| ) |
|
|
virtual |
Get the displayed status of the image.
virtual void ScreenImage::setAlpha |
( |
float |
a | ) |
|
|
virtual |
Set the image alpha for when it is in full "on" (after fade in).
- Parameters
-
a | the new alpha (transparency) for the image. 1.0 = totally transparent, 0.0 = fully opaque. |
virtual void ScreenImage::setFadeDuration |
( |
float |
duration | ) |
|
|
virtual |
Set the duration used for the fade in / fade out of the image.
virtual void ScreenImage::setFlagShow |
( |
bool |
b | ) |
|
|
virtual |
Show or hide the image (it will fade in/out)
- Parameters
-
b | if true, the image will be shown, else it will be hidden |
virtual void ScreenImage::setXY |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
duration = 0. |
|
) |
| |
|
virtual |
Set the x, y position of the image.
- Parameters
-
x | new x position |
y | new y position |
duration | how long for the movement to take in seconds |
virtual void ScreenImage::update |
( |
double |
deltaTime | ) |
|
|
virtual |
update fade for on/off action
The documentation for this class was generated from the following file: