Eile Mit Weile
Loading...
Searching...
No Matches
ImagePanel Class Reference

Panel for displaying an image. More...

#include <ImagePanel.hpp>

Inheritance diagram for ImagePanel:

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
 

Detailed Description

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!

Constructor & Destructor Documentation

◆ ImagePanel()

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

Member Function Documentation

◆ OnSize()

void ImagePanel::OnSize ( wxSizeEvent event)

The code in this method is called when the size of the panel changes.

◆ PaintEvent()

void ImagePanel::PaintEvent ( wxPaintEvent event)

The code in this method is called when the system requests this panel to be redrawn.

Member Data Documentation

◆ _bitmap

wxBitmap ImagePanel::_bitmap
private

The bitmap to be displayed.

◆ _height

int ImagePanel::_height
private

The height of the image.

◆ _image

wxImage ImagePanel::_image
private

The image to be displayed.

◆ _rotation

double ImagePanel::_rotation
private

The rotation of the image in radian.

◆ _width

int ImagePanel::_width
private

The width of the image.


The documentation for this class was generated from the following files: