|
Eile Mit Weile
|
Panel for displaying an image. More...
#include <ImagePanel.hpp>
Public Member Functions | |
| ImagePanel (wxWindow *parent, wxString file, wxBitmapType format, wxPoint position=wxDefaultPosition, wxSize size=wxDefaultSize, double rotation=0.0) | |
| void | PaintEvent (wxPaintEvent &event) |
| void | OnSize (wxSizeEvent &event) |
Private Attributes | |
| wxImage | _image |
| wxBitmap | _bitmap |
| double | _rotation |
| int | _width |
| int | _height |
Panel for displaying an image.
This class is derived from wxPanel, which is wxWidgets' panel class. It is responsible for displaying an image. The image can be scaled with parameter <size> and rotated with <rotation> (in radian).
The layout is not scalable!
| ImagePanel::ImagePanel | ( | wxWindow * | parent, |
| wxString | file, | ||
| wxBitmapType | format, | ||
| wxPoint | position = wxDefaultPosition, |
||
| wxSize | size = wxDefaultSize, |
||
| double | rotation = 0.0 |
||
| ) |
Initializes the ImagePanel with the given parent window (GameWindow).
| void ImagePanel::OnSize | ( | wxSizeEvent & | event | ) |
The code in this method is called when the size of the panel changes.
| void ImagePanel::PaintEvent | ( | wxPaintEvent & | event | ) |
The code in this method is called when the system requests this panel to be redrawn.
|
private |
The bitmap to be displayed.
|
private |
The height of the image.
|
private |
The image to be displayed.
|
private |
The rotation of the image in radian.
|
private |
The width of the image.