#include <ImageControl.h>
List of all members.
Public Member Functions |
| const char * | getTypeName () const |
| void | setImage (const char *path) |
| void | setRegionSrc (float x, float y, float width, float height) |
| void | setRegionSrc (const Rectangle ®ion) |
| const Rectangle & | getRegionSrc () const |
| void | setRegionDst (float x, float y, float width, float height) |
| void | setRegionDst (const Rectangle ®ion) |
| const Rectangle & | getRegionDst () const |
Static Public Member Functions |
| static ImageControl * | create (const char *id, Theme::Style *style=NULL) |
Protected Member Functions |
| void | initialize (const char *typeName, Theme::Style *style, Properties *properties) |
| unsigned int | drawImages (Form *form, const Rectangle &clip) |
| void | updateBounds () |
Static Protected Member Functions |
| static Control * | create (Theme::Style *style, Properties *properties=NULL) |
Detailed Description
Defines an image control.
This allows forms to display seperate images from arbitrary files not specified in the theme.
- See also:
- http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
Member Function Documentation
Creates a new ImageControl.
- Parameters:
-
| id | The image control ID. |
| style | The image control style (optional). |
- Returns:
- The new image control.
Creates a new ImageControl.
- Parameters:
-
| style | The control's custom style. |
| properties | A properties object containing a definition of the ImageControl (optional). |
- Returns:
- The new ImageControl.
Initializes the control.
- Parameters:
-
| typeName | The type name of the control being initalized. |
| style | The style to apply to this control (optional). |
| properties | The properties to set on this control (optional). |
Reimplemented from gameplay::Control.
Set the path of the image for this ImageControl to display.
- Parameters:
-
| path | The path to the image. |
Sets the destination region of this ImageControl. This is the region within the control's viewport to draw the image.
- Parameters:
-
| x | The x coordinate of the destination region. |
| y | The y coordinate of the destination region. |
| width | The width of the destination region. |
| height | The height of the destination region. |
Sets the destination region of this ImageControl. This is the region within the control's viewport to draw the image.
- Parameters:
-
| region | The new destination region. |
Set the source region of this ImageControl. This is the region of the file, in pixels, to use when drawing.
- Parameters:
-
| x | The x coordinate of the source region. |
| y | The y coordinate of the source region. |
| width | The width of the source region. |
| height | The height of the source region. |
Set the source region of this ImageControl. This is the region of the file, in pixels, to use when drawing.
- Parameters:
-
| region | The new source region. |