Eile Mit Weile
Loading...
Searching...
No Matches
ImagePanel.hpp
1// This class can be used to display an image. It can be scaled with parameter <size> and rotated with <rotation> (in radian)
2
3#ifndef EILE_MIT_WEILE_IMAGEPANEL_HPP
4#define EILE_MIT_WEILE_IMAGEPANEL_HPP
5#include <wx/wx.h>
6#include <wx/sizer.h>
7
8
19class ImagePanel: public wxPanel {
20 wxImage _image;
21 wxBitmap _bitmap;
23 double _rotation;
25 int _width;
26 int _height;
28public:
32 ImagePanel(wxWindow* parent, wxString file, wxBitmapType format, wxPoint position = wxDefaultPosition, wxSize size = wxDefaultSize, double rotation = 0.0);
33
37 void PaintEvent(wxPaintEvent& event);
38
42 void OnSize(wxSizeEvent& event);
43
44};
45
46
47#endif //EILE_MIT_WEILE_IMAGEPANEL_HPP
Panel for displaying an image.
Definition ImagePanel.hpp:19
ImagePanel(wxWindow *parent, wxString file, wxBitmapType format, wxPoint position=wxDefaultPosition, wxSize size=wxDefaultSize, double rotation=0.0)
Definition ImagePanel.cpp:3
wxBitmap _bitmap
Definition ImagePanel.hpp:21
void OnSize(wxSizeEvent &event)
Definition ImagePanel.cpp:65
double _rotation
Definition ImagePanel.hpp:23
int _width
Definition ImagePanel.hpp:25
wxImage _image
Definition ImagePanel.hpp:20
void PaintEvent(wxPaintEvent &event)
Definition ImagePanel.cpp:28
int _height
Definition ImagePanel.hpp:26