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);
56 void OnSize(wxSizeEvent & e);
69 int scale(
int x)
const;
70 double scale(
double x)
const;
79 #endif // PREVIEWWINDOW_H
void OnPaint(wxPaintEvent &e)
drawing routine
double m_scaleFactor
store current scale factor
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)
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