26 #ifndef PREVIEWWINDOW_H
27 #define PREVIEWWINDOW_H
29 #include <wx/scrolwin.h>
30 #include <wx/bitmap.h>
42 bool Create(wxWindow* parent, wxWindowID
id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL,
const wxString& name =
"panel");
44 void setImage (
const wxString& filename);
55 virtual void OnDraw(wxDC& dc) wxOVERRIDE;
58 void OnSize(wxSizeEvent & e);
71 int scale(
int x)
const;
72 double scale(
double x)
const;
81 #endif // PREVIEWWINDOW_H
double m_scaleFactor
store current scale factor
void update()
initiate redraw
double calcAutoScaleFactor(wxSize size)
calculate new scale factor for this image
double getScaleFactor() const
get scale factor (calculates factor when fit to window is active)
virtual void OnDraw(wxDC &dc) wxOVERRIDE
drawing routine
int scale(int x) const
helper function to scale of width/height
vigra::ImageImportInfo::ICCProfile m_iccProfile
remember icc profile of currently loaded file
void setImage(const wxString &filename)
set the current image and mask list, this loads also the image from cache
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name="panel")
create the control
void OnSize(wxSizeEvent &e)
handler called when size of control was changed
void setScale(double factor)
set the scaling factor f.
void rescaleImage()
rescale the image
double getScale()
return scale factor, 0 for autoscale