|
Hugintrunk
0.1
|
preview window More...
#include <PreviewWindow.h>

Public Member Functions | |
| 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 More... | |
| void | setImage (const wxString &filename) |
| set the current image and mask list, this loads also the image from cache More... | |
| void | setScale (double factor) |
| set the scaling factor f. More... | |
| double | getScale () |
| return scale factor, 0 for autoscale More... | |
| void | OnPaint (wxPaintEvent &e) |
| drawing routine More... | |
Protected Member Functions | |
| void | OnSize (wxSizeEvent &e) |
| handler called when size of control was changed More... | |
| double | getScaleFactor () const |
| get scale factor (calculates factor when fit to window is active) More... | |
| double | calcAutoScaleFactor (wxSize size) |
| calculate new scale factor for this image More... | |
| void | rescaleImage () |
| rescale the image More... | |
Private Member Functions | |
| int | scale (int x) const |
| helper function to scale of width/height More... | |
| double | scale (double x) const |
Private Attributes | |
| wxImage | m_image |
| wxBitmap | m_bitmap |
| double | m_scaleFactor { 1.0 } |
| store current scale factor More... | |
| bool | m_fitToWindow { false } |
| vigra::ImageImportInfo::ICCProfile | m_iccProfile |
| remember icc profile of currently loaded file More... | |
preview window
This class handles display of an image at different zoom ratio
Definition at line 38 of file PreviewWindow.h.
|
protected |
calculate new scale factor for this image
Definition at line 172 of file PreviewWindow.cpp.
References vigra_ext::EMoR::h.
Referenced by rescaleImage(), and setScale().
| bool PreviewWindow::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
Definition at line 33 of file PreviewWindow.cpp.
References m_fitToWindow, m_scaleFactor, OnPaint(), and OnSize().
Referenced by EnfusePanel::Create(), and StackerPanel::Create().
| double PreviewWindow::getScale | ( | ) |
return scale factor, 0 for autoscale
Definition at line 166 of file PreviewWindow.cpp.
References m_fitToWindow, and m_scaleFactor.
|
protected |
get scale factor (calculates factor when fit to window is active)
Definition at line 182 of file PreviewWindow.cpp.
References m_scaleFactor.
Referenced by rescaleImage(), and scale().
| void PreviewWindow::OnPaint | ( | wxPaintEvent & | e | ) |
drawing routine
Definition at line 76 of file PreviewWindow.cpp.
References m_bitmap.
Referenced by Create().
|
protected |
handler called when size of control was changed
Definition at line 89 of file PreviewWindow.cpp.
References m_fitToWindow, m_image, and setScale().
Referenced by Create().
|
protected |
rescale the image
Definition at line 101 of file PreviewWindow.cpp.
References calcAutoScaleFactor(), HuginBase::Color::CorrectImage(), HuginBase::Color::detail::GetMonitorProfile(), getScaleFactor(), m_bitmap, m_fitToWindow, m_iccProfile, m_image, m_scaleFactor, celeste::max(), and scale().
Referenced by setImage(), and setScale().
|
private |
helper function to scale of width/height
Definition at line 187 of file PreviewWindow.cpp.
References getScaleFactor().
Referenced by rescaleImage().
|
private |
Definition at line 192 of file PreviewWindow.cpp.
References getScaleFactor().
| void PreviewWindow::setImage | ( | const wxString & | filename | ) |
set the current image and mask list, this loads also the image from cache
Definition at line 46 of file PreviewWindow.cpp.
References HUGIN_CONV_FILENAME, celeste::info(), m_iccProfile, m_image, and rescaleImage().
Referenced by EnfusePanel::OnProcessFinished(), and StackerPanel::OnProcessFinished().
| void PreviewWindow::setScale | ( | double | factor | ) |
set the scaling factor f.
| factor | zoom factor, 0 means fit to window. |
Definition at line 146 of file PreviewWindow.cpp.
References calcAutoScaleFactor(), m_fitToWindow, m_image, m_scaleFactor, and rescaleImage().
Referenced by OnSize(), EnfusePanel::OnZoom(), and StackerPanel::OnZoom().
|
private |
Definition at line 67 of file PreviewWindow.h.
Referenced by OnPaint(), and rescaleImage().
|
private |
Definition at line 73 of file PreviewWindow.h.
Referenced by Create(), getScale(), OnSize(), rescaleImage(), and setScale().
|
private |
remember icc profile of currently loaded file
Definition at line 75 of file PreviewWindow.h.
Referenced by rescaleImage(), and setImage().
|
private |
Definition at line 65 of file PreviewWindow.h.
Referenced by OnSize(), rescaleImage(), setImage(), and setScale().
|
private |
store current scale factor
Definition at line 72 of file PreviewWindow.h.
Referenced by Create(), getScale(), getScaleFactor(), rescaleImage(), and setScale().
1.8.5