Hugintrunk
0.1
|
brief description. More...
#include <CPImageCtrl.h>
Public Types | |
enum | EditorState { NO_IMAGE =0, NO_SELECTION, KNOWN_POINT_SELECTED, NEW_POINT_SELECTED, NEW_LINE_CREATING, SELECT_DELETE_REGION } |
state machine for selection process: More... | |
enum | ImageRotation { ROT0 =0, ROT90, ROT180, ROT270 } |
image rotation. More... | |
Public Member Functions | |
CPImageCtrl () | |
ctor. More... | |
bool | Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel")) |
void | Init (CPEditorPanel *parent) |
~CPImageCtrl () | |
dtor. More... | |
void | setImage (const std::string &filename, ImageRotation rot) |
display img. More... | |
void | setSameImage (bool sameImage) |
void | setTransforms (HuginBase::PTools::Transform *firstTrans, HuginBase::PTools::Transform *firstInvTrans, HuginBase::PTools::Transform *secondInvTrans) |
void | setMagTransforms (HuginBase::PTools::Transform *magTrans, HuginBase::PTools::Transform *magInvTrans) |
HuginBase::PTools::Transform * | getFirstTrans () const |
HuginBase::PTools::Transform * | getFirstInvTrans () const |
HuginBase::PTools::Transform * | getSecondInvTrans () const |
void | setCtrlPoint (const HuginBase::ControlPoint &cp, const bool mirrored) |
add control piont to internal cp list More... | |
void | clearCtrlPointList () |
clear internal control point list More... | |
void | clearNewPoint () |
clear new point More... | |
void | setNewPoint (const hugin_utils::FDiff2D &p) |
set new point to a specific point More... | |
void | selectPoint (unsigned int, bool scrollTo=true) |
select a point for usage More... | |
void | deselect () |
remove selection. More... | |
void | mousePressLMBEvent (wxMouseEvent &mouse) |
void | mouseReleaseLMBEvent (wxMouseEvent &mouse) |
void | mousePressRMBEvent (wxMouseEvent &mouse) |
void | mouseReleaseRMBEvent (wxMouseEvent &mouse) |
void | mouseMoveEvent (wxMouseEvent &mouse) |
void | mousePressMMBEvent (wxMouseEvent &mouse) |
void | mouseReleaseMMBEvent (wxMouseEvent &mouse) |
wxSize | DoGetBestSize () const |
void | setScale (double factor) |
set the scaling factor for cp display. More... | |
double | getScale () |
return scale factor, 0 for autoscale More... | |
void | showPosition (hugin_utils::FDiff2D point, bool warpPointer=false) |
Show point x , y . More... | |
void | showSearchArea (bool show=true) |
show/hide the search area rectangle More... | |
void | showTemplateArea (bool show=true) |
hugin_utils::FDiff2D | getNewPoint () |
get the new point More... | |
void | update () |
initiate redraw More... | |
void | ScrollDelta (const wxPoint &delta) |
scroll the window by delta pixels More... | |
wxPoint | MaxScrollDelta (wxPoint delta) |
calculate maximum delta that is allowed when scrolling More... | |
int | scale (int x) const |
double | scale (double x) const |
hugin_utils::FDiff2D | scale (const hugin_utils::FDiff2D &p) const |
wxPoint | scale (const wxPoint &p) const |
int | invScale (int x) const |
double | invScale (double x) const |
hugin_utils::FDiff2D | invScale (const hugin_utils::FDiff2D &p) const |
wxPoint | invScale (const wxPoint &p) const |
wxPoint | roundP (const hugin_utils::FDiff2D &p) const |
template<class T > | |
T | applyRot (const T &p) const |
template<class T > | |
T | applyRotInv (const T &p) const |
const bool | GetMouseInWindow () const |
const bool | GetForceMagnifier () const |
HuginBase::ImageCache::ImageCacheRGB8Ptr | GetImg () |
get pointer to image, for DisplayedControlPoint More... | |
wxBitmap & | GetMagBitmap (hugin_utils::FDiff2D point) |
draw the magnified view of a selected control point More... | |
const wxSize | GetRealImageSize () const |
return the real size of the image in the control More... | |
const wxSize | GetBitmapSize () const |
return the size of the drawn bitmap (possible rotate is applied) More... | |
virtual void | OnDraw (wxDC &dc) |
void | ShowLines (bool isShown) |
bool | IsShowingLines () const |
Protected Member Functions | |
void | OnImageLoaded (ImageCache::EntryPtr entry, std::string filename, bool load_small) |
void | OnSize (wxSizeEvent &e) |
void | OnKey (wxKeyEvent &e) |
void | OnKeyDown (wxKeyEvent &e) |
void | OnMouseLeave (wxMouseEvent &e) |
void | OnMouseEnter (wxMouseEvent &e) |
void | OnTimer (wxTimerEvent &e) |
void | OnScrollWin (wxScrollWinEvent &e) |
bool | emit (CPEvent &ev) |
helper func to emit a region 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 () |
Private Member Functions | |
void | DrawSelectionRectangle (hugin_utils::FDiff2D pos1, hugin_utils::FDiff2D pos2) |
EditorState | isOccupied (wxPoint mousePos, const hugin_utils::FDiff2D &point, unsigned int &pointNr) const |
check if p is over a known point, if it is, pointNr contains the point More... | |
DECLARE_EVENT_TABLE () | |
state machine for selection process:
The select region is temporarily disabled.. maybe I find use for it later on..
format of this list:
states:
Enumerator | |
---|---|
NO_IMAGE | |
NO_SELECTION | |
KNOWN_POINT_SELECTED | |
NEW_POINT_SELECTED | |
NEW_LINE_CREATING | |
SELECT_DELETE_REGION |
Definition at line 220 of file CPImageCtrl.h.
image rotation.
Useful to display images depending on their roll setting. rotation is clockwise
Enumerator | |
---|---|
ROT0 | |
ROT90 | |
ROT180 | |
ROT270 |
Definition at line 241 of file CPImageCtrl.h.
|
inline |
ctor.
Definition at line 224 of file CPImageCtrl.h.
CPImageCtrl::~CPImageCtrl | ( | ) |
|
inline |
Definition at line 371 of file CPImageCtrl.h.
References m_imgRotation, m_realSize, ROT0, ROT180, ROT270, and ROT90.
Referenced by DisplayedControlPoint::Draw(), DisplayedControlPoint::DrawLine(), DisplayedControlPoint::DrawLineSegment(), DrawSelectionRectangle(), OnDraw(), and showPosition().
|
inline |
Definition at line 395 of file CPImageCtrl.h.
References m_imgRotation, m_realSize, ROT0, ROT180, ROT270, and ROT90.
Referenced by mouseMoveEvent(), mousePressLMBEvent(), mousePressRMBEvent(), mouseReleaseLMBEvent(), and mouseReleaseRMBEvent().
|
protected |
calculate new scale factor for this image
Definition at line 1534 of file CPImageCtrl.cpp.
References DEBUG_DEBUG, vigra_ext::EMoR::h, m_imgRotation, ROT270, and ROT90.
Referenced by rescaleImage(), and setScale().
void CPImageCtrl::clearCtrlPointList | ( | ) |
clear internal control point list
Definition at line 1074 of file CPImageCtrl.cpp.
References editState, KNOWN_POINT_SELECTED, m_points, NO_SELECTION, and selectedPointNr.
Referenced by CPEditorPanel::UpdateDisplay().
void CPImageCtrl::clearNewPoint | ( | ) |
clear new point
Definition at line 1084 of file CPImageCtrl.cpp.
References DEBUG_TRACE, editState, NO_IMAGE, and NO_SELECTION.
Referenced by CPEditorPanel::changeState(), and CPEditorPanel::NewPointChange().
bool CPImageCtrl::Create | ( | wxWindow * | parent, |
wxWindowID | id = wxID_ANY , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxTAB_TRAVERSAL , |
||
const wxString & | name = wxT("panel") |
||
) |
Definition at line 668 of file CPImageCtrl.cpp.
References huginApp::Get(), huginApp::GetXRCPath(), and wxcode::NO_IMAGE.
|
private |
void CPImageCtrl::deselect | ( | ) |
remove selection.
Definition at line 1110 of file CPImageCtrl.cpp.
References DEBUG_TRACE, editState, KNOWN_POINT_SELECTED, NO_SELECTION, and update().
Referenced by CPEditorPanel::ClearSelection(), and CPEditorPanel::OnCPListDeselect().
wxSize CPImageCtrl::DoGetBestSize | ( | ) | const |
Definition at line 929 of file CPImageCtrl.cpp.
References imageSize.
|
private |
Definition at line 1168 of file CPImageCtrl.cpp.
References applyRot(), m_overlay, roundP(), and scale().
Referenced by mouseMoveEvent().
|
protected |
helper func to emit a region
Definition at line 1507 of file CPImageCtrl.cpp.
Referenced by mouseMoveEvent(), mousePressLMBEvent(), mouseReleaseLMBEvent(), mouseReleaseRMBEvent(), and OnKey().
const wxSize CPImageCtrl::GetBitmapSize | ( | ) | const |
return the size of the drawn bitmap (possible rotate is applied)
Definition at line 1808 of file CPImageCtrl.cpp.
References bitmap.
Referenced by DisplayedControlPoint::DrawLine(), and DisplayedControlPoint::DrawLineSegment().
|
inline |
Definition at line 250 of file CPImageCtrl.h.
References m_firstInvTrans.
Referenced by DisplayedControlPoint::DrawLine(), and DisplayedControlPoint::DrawLineSegment().
|
inline |
Definition at line 249 of file CPImageCtrl.h.
References m_firstTrans.
Referenced by DisplayedControlPoint::DrawLine(), and DisplayedControlPoint::DrawLineSegment().
|
inline |
Definition at line 415 of file CPImageCtrl.h.
References m_forceMagnifier.
Referenced by DisplayedControlPoint::Draw().
HuginBase::ImageCache::ImageCacheRGB8Ptr CPImageCtrl::GetImg | ( | ) |
get pointer to image, for DisplayedControlPoint
Definition at line 1813 of file CPImageCtrl.cpp.
References m_img.
Referenced by DisplayedControlPoint::Draw().
wxBitmap & CPImageCtrl::GetMagBitmap | ( | hugin_utils::FDiff2D | point | ) |
draw the magnified view of a selected control point
Definition at line 840 of file CPImageCtrl.cpp.
References DEBUG_TRACE, vigra_ext::destImage(), vigra_ext::destImageRange(), m_img, m_imgRotation, m_magImg, m_magImgCenter, m_magInvTrans, m_magTrans, ROT180, ROT270, ROT90, hugin_utils::roundi(), vigra_ext::srcImageRange(), vigra_ext::transformImage(), vigra_ext::transformImageIntern(), HuginBase::PTools::Transform::transformImgCoord(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by DisplayedControlPoint::DrawTextMag().
|
inline |
Definition at line 414 of file CPImageCtrl.h.
References m_mouseInWindow.
Referenced by DisplayedControlPoint::Draw().
hugin_utils::FDiff2D CPImageCtrl::getNewPoint | ( | ) |
get the new point
Definition at line 1710 of file CPImageCtrl.cpp.
References newPoint.
Referenced by CPEditorPanel::CreateNewPoint(), CPEditorPanel::estimateAndAddOtherPoint(), CPEditorPanel::FineTuneNewPoint(), and CPEditorPanel::NewPointChange().
|
inline |
return the real size of the image in the control
Definition at line 421 of file CPImageCtrl.h.
References m_realSize.
Referenced by DisplayedControlPoint::DrawLine(), and DisplayedControlPoint::DrawLineSegment().
|
inline |
return scale factor, 0 for autoscale
Definition at line 289 of file CPImageCtrl.h.
References fitToWindow, and scaleFactor.
Referenced by DisplayedControlPoint::DrawTextMag(), CPEditorPanel::NewPointChange(), and CPEditorPanel::OnZoom().
|
protected |
get scale factor (calculates factor when fit to window is active)
Definition at line 1554 of file CPImageCtrl.cpp.
References scaleFactor.
Referenced by invScale(), OnDraw(), rescaleImage(), and scale().
|
inline |
Definition at line 251 of file CPImageCtrl.h.
References m_secondInvTrans.
Referenced by DisplayedControlPoint::DrawLineSegment().
void CPImageCtrl::Init | ( | CPEditorPanel * | parent | ) |
Definition at line 733 of file CPImageCtrl.cpp.
References m_editPanel, m_magImgCenter, and m_sameImage.
Referenced by CPEditorPanel::Create().
|
inline |
Definition at line 341 of file CPImageCtrl.h.
References getScaleFactor().
Referenced by DisplayedControlPoint::CheckSelection(), invScale(), DisplayedControlPoint::isOccupiedPos(), mouseMoveEvent(), mousePressLMBEvent(), mousePressRMBEvent(), mouseReleaseLMBEvent(), and mouseReleaseRMBEvent().
|
inline |
Definition at line 344 of file CPImageCtrl.h.
References getScaleFactor().
|
inline |
Definition at line 347 of file CPImageCtrl.h.
References invScale(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
|
inline |
Definition at line 355 of file CPImageCtrl.h.
References invScale().
|
private |
check if p is over a known point, if it is, pointNr contains the point
Definition at line 1141 of file CPImageCtrl.cpp.
References KNOWN_POINT_SELECTED, m_points, and NEW_POINT_SELECTED.
Referenced by mouseMoveEvent(), and mousePressLMBEvent().
bool CPImageCtrl::IsShowingLines | ( | ) | const |
Definition at line 1823 of file CPImageCtrl.cpp.
References m_showLines.
Referenced by DisplayedControlPoint::Draw(), and DisplayedControlPoint::IsDrawingLine().
wxPoint CPImageCtrl::MaxScrollDelta | ( | wxPoint | delta | ) |
calculate maximum delta that is allowed when scrolling
Definition at line 1753 of file CPImageCtrl.cpp.
References bitmap.
Referenced by CPEditorPanel::OnCPEvent().
void CPImageCtrl::mouseMoveEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1181 of file CPImageCtrl.cpp.
References applyRotInv(), DEBUG_DEBUG, DrawSelectionRectangle(), editState, emit(), invScale(), isOccupied(), KNOWN_POINT_SELECTED, m_CPSelectCursor, m_img, m_mousePos, m_mouseScrollPos, m_points, m_realSize, m_selectedPoint, m_showSearchArea, NEW_LINE_CREATING, NEW_POINT_SELECTED, newPoint, NO_IMAGE, NO_SELECTION, rectStartPos, ScrollDelta(), CPEvent::SCROLLED, SELECT_DELETE_REGION, selectedPointNr, update(), and DisplayedControlPoint::UpdateControlPoint().
void CPImageCtrl::mousePressLMBEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1291 of file CPImageCtrl.cpp.
References applyRotInv(), DEBUG_DEBUG, DEBUG_ERROR, editState, emit(), invScale(), isOccupied(), KNOWN_POINT_SELECTED, m_forceMagnifier, m_img, m_mousePos, m_points, m_realSize, m_sameImage, m_selectedPoint, m_timer, NEW_LINE_CREATING, NEW_POINT_SELECTED, newPoint, NO_IMAGE, SELECT_DELETE_REGION, selectedPointNr, DisplayedControlPoint::SetControl(), and DisplayedControlPoint::StartLineControlPoint().
void CPImageCtrl::mousePressMMBEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1435 of file CPImageCtrl.cpp.
References DEBUG_DEBUG, m_img, and m_mouseScrollPos.
void CPImageCtrl::mousePressRMBEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1443 of file CPImageCtrl.cpp.
References applyRotInv(), editState, invScale(), KNOWN_POINT_SELECTED, m_img, m_realSize, NEW_POINT_SELECTED, NO_SELECTION, rectStartPos, and SELECT_DELETE_REGION.
void CPImageCtrl::mouseReleaseLMBEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1363 of file CPImageCtrl.cpp.
References applyRotInv(), DEBUG_DEBUG, editState, emit(), DisplayedControlPoint::GetControlPoint(), DisplayedControlPoint::GetPos(), invScale(), KNOWN_POINT_SELECTED, m_img, m_points, m_realSize, m_selectedPoint, m_timer, CPEvent::NEW_LINE_ADDED, NEW_LINE_CREATING, NEW_POINT_SELECTED, newPoint, NO_IMAGE, NO_SELECTION, CPEvent::POINT_CHANGED, SELECT_DELETE_REGION, selectedPointNr, and showPosition().
void CPImageCtrl::mouseReleaseMMBEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1428 of file CPImageCtrl.cpp.
References DEBUG_DEBUG.
void CPImageCtrl::mouseReleaseRMBEvent | ( | wxMouseEvent & | mouse | ) |
Definition at line 1464 of file CPImageCtrl.cpp.
References applyRotInv(), DEBUG_DEBUG, editState, emit(), invScale(), m_img, m_overlay, m_realSize, NO_SELECTION, rectStartPos, CPEvent::RIGHT_CLICK, and SELECT_DELETE_REGION.
|
virtual |
Definition at line 748 of file CPImageCtrl.cpp.
References applyRot(), bitmap, DEBUG_DEBUG, DisplayedControlPoint::Draw(), editState, getScaleFactor(), KNOWN_POINT_SELECTED, m_img, m_mousePos, m_points, m_searchRectWidth, m_selectedPoint, m_showSearchArea, m_showTemplateArea, m_templateRectWidth, NEW_LINE_CREATING, NEW_POINT_SELECTED, newPoint, NO_IMAGE, NO_SELECTION, hugin_utils::roundi(), roundP(), scale(), SELECT_DELETE_REGION, selectedPointNr, DisplayedControlPoint::SetLabel(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by update().
|
protected |
Definition at line 983 of file CPImageCtrl.cpp.
References imageFilename, m_img, and rescaleImage().
Referenced by setImage().
|
protected |
Definition at line 1570 of file CPImageCtrl.cpp.
References CPEvent::CANCELED, DEBUG_DEBUG, DEBUG_TRACE, editState, emit(), DisplayedControlPoint::GetControlPoint(), KNOWN_POINT_SELECTED, m_editPanel, m_forceMagnifier, m_img, m_imgRotation, m_points, m_timer, NEW_POINT_SELECTED, newPoint, CPEvent::POINT_CHANGED, CPEvent::RIGHT_CLICK, ROT180, ROT270, ROT90, ScrollDelta(), CPEvent::SCROLLED, selectedPointNr, shift, DisplayedControlPoint::ShiftControlPoint(), update(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
|
protected |
Definition at line 1680 of file CPImageCtrl.cpp.
References DEBUG_DEBUG, DEBUG_TRACE, m_img, and m_mouseScrollPos.
|
protected |
Definition at line 1699 of file CPImageCtrl.cpp.
References DEBUG_TRACE, huginApp::Get(), m_mouseInWindow, and update().
|
protected |
Definition at line 1691 of file CPImageCtrl.cpp.
References DEBUG_TRACE, m_mouseInWindow, m_mousePos, and update().
|
protected |
Definition at line 1356 of file CPImageCtrl.cpp.
References update().
|
protected |
Definition at line 1559 of file CPImageCtrl.cpp.
References DEBUG_TRACE, fitToWindow, imageFilename, and setScale().
|
protected |
Definition at line 1349 of file CPImageCtrl.cpp.
References m_forceMagnifier, m_img, and update().
|
protected |
Definition at line 993 of file CPImageCtrl.cpp.
References bitmap, calcAutoScaleFactor(), HuginBase::Color::CorrectImage(), DEBUG_DEBUG, editState, fitToWindow, huginApp::Get(), huginApp::GetMonitorProfile(), getScaleFactor(), huginApp::HasMonitorProfile(), imageCacheEntry2wxImage(), imageSize, m_img, m_imgRotation, m_realSize, celeste::max(), NO_IMAGE, ROT0, ROT180, ROT270, ROT90, scale(), and scaleFactor.
Referenced by OnImageLoaded(), setImage(), and setScale().
|
inline |
Definition at line 363 of file CPImageCtrl.h.
References hugin_utils::roundi(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by DisplayedControlPoint::Draw(), DisplayedControlPoint::DrawLine(), DisplayedControlPoint::DrawLineSegment(), DrawSelectionRectangle(), and OnDraw().
|
inline |
Definition at line 319 of file CPImageCtrl.h.
References getScaleFactor().
Referenced by DisplayedControlPoint::Draw(), DisplayedControlPoint::DrawLine(), DisplayedControlPoint::DrawLineSegment(), DrawSelectionRectangle(), OnDraw(), rescaleImage(), scale(), and showPosition().
|
inline |
Definition at line 322 of file CPImageCtrl.h.
References getScaleFactor().
|
inline |
Definition at line 325 of file CPImageCtrl.h.
References scale(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
|
inline |
Definition at line 333 of file CPImageCtrl.h.
References scale().
void CPImageCtrl::ScrollDelta | ( | const wxPoint & | delta | ) |
scroll the window by delta
pixels
Definition at line 1787 of file CPImageCtrl.cpp.
References update().
Referenced by mouseMoveEvent(), CPEditorPanel::OnCPEvent(), and OnKey().
void CPImageCtrl::selectPoint | ( | unsigned int | nr, |
bool | scrollTo = true |
||
) |
select a point for usage
Definition at line 1093 of file CPImageCtrl.cpp.
References DEBUG_DEBUG, DEBUG_TRACE, editState, KNOWN_POINT_SELECTED, m_points, selectedPointNr, showPosition(), and update().
Referenced by CPEditorPanel::SelectLocalPoint(), and CPEditorPanel::UpdateDisplay().
void CPImageCtrl::setCtrlPoint | ( | const HuginBase::ControlPoint & | cp, |
const bool | mirrored | ||
) |
add control piont to internal cp list
Definition at line 1066 of file CPImageCtrl.cpp.
References m_points, pointColors, DisplayedControlPoint::SetColour(), DisplayedControlPoint::SetLabel(), and textColours.
Referenced by CPEditorPanel::UpdateDisplay().
void CPImageCtrl::setImage | ( | const std::string & | filename, |
ImageRotation | rot | ||
) |
display img.
every CPImageCtrl has a wxBitmap with its current image
Definition at line 935 of file CPImageCtrl.cpp.
References bitmap, DEBUG_TRACE, editState, hugin_utils::FileExists(), HUGIN_CONV_FILENAME, imageFilename, m_img, m_imgRequest, m_imgRotation, m_magImgCenter, m_sameImage, NO_IMAGE, NO_SELECTION, OnImageLoaded(), and rescaleImage().
Referenced by CPEditorPanel::panoramaImagesChanged(), CPEditorPanel::setLeftImage(), and CPEditorPanel::setRightImage().
void CPImageCtrl::setMagTransforms | ( | HuginBase::PTools::Transform * | magTrans, |
HuginBase::PTools::Transform * | magInvTrans | ||
) |
Definition at line 972 of file CPImageCtrl.cpp.
References m_magInvTrans, and m_magTrans.
Referenced by CPEditorPanel::Create().
void CPImageCtrl::setNewPoint | ( | const hugin_utils::FDiff2D & | p | ) |
set new point to a specific point
Definition at line 1717 of file CPImageCtrl.cpp.
References DEBUG_DEBUG, editState, NEW_POINT_SELECTED, newPoint, showPosition(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by CPEditorPanel::estimateAndAddOtherPoint(), CPEditorPanel::FineTuneNewPoint(), and CPEditorPanel::NewPointChange().
void CPImageCtrl::setSameImage | ( | bool | sameImage | ) |
Definition at line 978 of file CPImageCtrl.cpp.
References m_sameImage.
Referenced by CPEditorPanel::UpdateDisplay().
void CPImageCtrl::setScale | ( | double | factor | ) |
set the scaling factor for cp display.
factor | zoom factor, 0 means fit to window. |
Definition at line 1517 of file CPImageCtrl.cpp.
References calcAutoScaleFactor(), DEBUG_DEBUG, fitToWindow, imageSize, rescaleImage(), and scaleFactor.
Referenced by CPEditorPanel::estimateAndAddOtherPoint(), CPEditorPanel::NewPointChange(), OnSize(), and CPEditorPanel::OnZoom().
void CPImageCtrl::setTransforms | ( | HuginBase::PTools::Transform * | firstTrans, |
HuginBase::PTools::Transform * | firstInvTrans, | ||
HuginBase::PTools::Transform * | secondInvTrans | ||
) |
Definition at line 965 of file CPImageCtrl.cpp.
References m_firstInvTrans, m_firstTrans, and m_secondInvTrans.
Referenced by CPEditorPanel::Create().
void CPImageCtrl::ShowLines | ( | bool | isShown | ) |
Definition at line 1818 of file CPImageCtrl.cpp.
References m_showLines.
Referenced by CPEditorPanel::Create(), and CPEditorPanel::OnShowLinesCheckbox().
void CPImageCtrl::showPosition | ( | hugin_utils::FDiff2D | point, |
bool | warpPointer = false |
||
) |
Show point x
, y
.
Scrolls the windows so that x,y is shown in the center if warpPointer
is true, the mouse pointer is moved to that position as well
Definition at line 1120 of file CPImageCtrl.cpp.
References applyRot(), DEBUG_DEBUG, hugin_utils::roundi(), scale(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by CPEditorPanel::estimateAndAddOtherPoint(), mouseReleaseLMBEvent(), CPEditorPanel::NewPointChange(), selectPoint(), and setNewPoint().
void CPImageCtrl::showSearchArea | ( | bool | show = true | ) |
show/hide the search area rectangle
Definition at line 1732 of file CPImageCtrl.cpp.
References bitmap, DEBUG_DEBUG, HUGIN_FT_SEARCH_AREA_PERCENT, m_mousePos, m_realSize, m_searchRectWidth, and m_showSearchArea.
Referenced by CPEditorPanel::changeState().
void CPImageCtrl::showTemplateArea | ( | bool | show = true | ) |
Definition at line 1744 of file CPImageCtrl.cpp.
References HUGIN_FT_TEMPLATE_SIZE, m_showTemplateArea, and m_templateRectWidth.
Referenced by CPEditorPanel::changeState().
void CPImageCtrl::update | ( | ) |
initiate redraw
Definition at line 1499 of file CPImageCtrl.cpp.
References DEBUG_TRACE, editState, and OnDraw().
Referenced by deselect(), CPEditorPanel::FineTuneNewPoint(), mouseMoveEvent(), CPEditorPanel::NewPointChange(), CPEditorPanel::OnCPEvent(), OnKey(), OnMouseEnter(), OnMouseLeave(), OnScrollWin(), OnTimer(), ScrollDelta(), selectPoint(), and CPEditorPanel::UpdateDisplay().
|
private |
Definition at line 454 of file CPImageCtrl.h.
Referenced by GetBitmapSize(), MaxScrollDelta(), OnDraw(), rescaleImage(), setImage(), and showSearchArea().
|
private |
Definition at line 488 of file CPImageCtrl.h.
Referenced by clearCtrlPointList(), clearNewPoint(), deselect(), mouseMoveEvent(), mousePressLMBEvent(), mousePressRMBEvent(), mouseReleaseLMBEvent(), mouseReleaseRMBEvent(), OnDraw(), OnKey(), rescaleImage(), selectPoint(), setImage(), setNewPoint(), and update().
|
private |
Definition at line 501 of file CPImageCtrl.h.
Referenced by getScale(), OnSize(), rescaleImage(), and setScale().
|
private |
Definition at line 455 of file CPImageCtrl.h.
Referenced by OnImageLoaded(), OnSize(), and setImage().
|
private |
Definition at line 457 of file CPImageCtrl.h.
Referenced by DoGetBestSize(), rescaleImage(), and setScale().
|
private |
Definition at line 470 of file CPImageCtrl.h.
Referenced by mouseMoveEvent(), and ~CPImageCtrl().
|
private |
Definition at line 516 of file CPImageCtrl.h.
|
private |
Definition at line 491 of file CPImageCtrl.h.
Referenced by getFirstInvTrans(), and setTransforms().
|
private |
Definition at line 490 of file CPImageCtrl.h.
Referenced by getFirstTrans(), and setTransforms().
|
private |
Definition at line 524 of file CPImageCtrl.h.
Referenced by GetForceMagnifier(), mousePressLMBEvent(), OnKey(), and OnTimer().
|
private |
Definition at line 520 of file CPImageCtrl.h.
Referenced by GetImg(), GetMagBitmap(), mouseMoveEvent(), mousePressLMBEvent(), mousePressMMBEvent(), mousePressRMBEvent(), mouseReleaseLMBEvent(), mouseReleaseRMBEvent(), OnDraw(), OnImageLoaded(), OnKey(), OnKeyDown(), OnTimer(), rescaleImage(), and setImage().
|
private |
Definition at line 521 of file CPImageCtrl.h.
Referenced by setImage().
|
private |
Definition at line 518 of file CPImageCtrl.h.
Referenced by applyRot(), applyRotInv(), calcAutoScaleFactor(), GetMagBitmap(), OnKey(), rescaleImage(), and setImage().
|
private |
Definition at line 463 of file CPImageCtrl.h.
Referenced by GetMagBitmap().
|
private |
Definition at line 464 of file CPImageCtrl.h.
Referenced by GetMagBitmap(), Init(), and setImage().
|
private |
Definition at line 495 of file CPImageCtrl.h.
Referenced by GetMagBitmap(), and setMagTransforms().
|
private |
Definition at line 494 of file CPImageCtrl.h.
Referenced by GetMagBitmap(), and setMagTransforms().
|
private |
Definition at line 523 of file CPImageCtrl.h.
Referenced by GetMouseInWindow(), OnMouseEnter(), and OnMouseLeave().
|
private |
Definition at line 506 of file CPImageCtrl.h.
Referenced by mouseMoveEvent(), mousePressLMBEvent(), OnDraw(), OnMouseLeave(), and showSearchArea().
|
private |
Definition at line 507 of file CPImageCtrl.h.
Referenced by mouseMoveEvent(), mousePressMMBEvent(), and OnKeyDown().
|
private |
Definition at line 461 of file CPImageCtrl.h.
Referenced by DrawSelectionRectangle(), and mouseReleaseRMBEvent().
|
private |
Definition at line 468 of file CPImageCtrl.h.
Referenced by clearCtrlPointList(), isOccupied(), mouseMoveEvent(), mousePressLMBEvent(), mouseReleaseLMBEvent(), OnDraw(), OnKey(), selectPoint(), and setCtrlPoint().
|
private |
Definition at line 459 of file CPImageCtrl.h.
Referenced by applyRot(), applyRotInv(), GetRealImageSize(), mouseMoveEvent(), mousePressLMBEvent(), mousePressRMBEvent(), mouseReleaseLMBEvent(), mouseReleaseRMBEvent(), rescaleImage(), and showSearchArea().
|
private |
true, if in control point tab the same image is selected 2 times in this case a special treatment for creating line control points is activated
Definition at line 481 of file CPImageCtrl.h.
Referenced by Init(), mousePressLMBEvent(), setImage(), and setSameImage().
|
private |
Definition at line 471 of file CPImageCtrl.h.
|
private |
Definition at line 504 of file CPImageCtrl.h.
Referenced by OnDraw(), and showSearchArea().
|
private |
Definition at line 492 of file CPImageCtrl.h.
Referenced by getSecondInvTrans(), and setTransforms().
|
private |
Definition at line 476 of file CPImageCtrl.h.
Referenced by mouseMoveEvent(), mousePressLMBEvent(), mouseReleaseLMBEvent(), and OnDraw().
|
private |
Definition at line 466 of file CPImageCtrl.h.
Referenced by IsShowingLines(), and ShowLines().
|
private |
Definition at line 503 of file CPImageCtrl.h.
Referenced by mouseMoveEvent(), OnDraw(), and showSearchArea().
|
private |
Definition at line 509 of file CPImageCtrl.h.
Referenced by OnDraw(), and showTemplateArea().
|
private |
Definition at line 510 of file CPImageCtrl.h.
Referenced by OnDraw(), and showTemplateArea().
|
private |
Definition at line 525 of file CPImageCtrl.h.
Referenced by mousePressLMBEvent(), mouseReleaseLMBEvent(), and OnKey().
|
private |
Definition at line 477 of file CPImageCtrl.h.
Referenced by getNewPoint(), mouseMoveEvent(), mousePressLMBEvent(), mouseReleaseLMBEvent(), OnDraw(), OnKey(), and setNewPoint().
|
private |
Definition at line 498 of file CPImageCtrl.h.
Referenced by setCtrlPoint().
|
private |
Definition at line 484 of file CPImageCtrl.h.
Referenced by mouseMoveEvent(), mousePressRMBEvent(), and mouseReleaseRMBEvent().
|
private |
Definition at line 500 of file CPImageCtrl.h.
Referenced by getScale(), getScaleFactor(), rescaleImage(), and setScale().
|
private |
Definition at line 474 of file CPImageCtrl.h.
Referenced by clearCtrlPointList(), mouseMoveEvent(), mousePressLMBEvent(), mouseReleaseLMBEvent(), OnDraw(), OnKey(), and selectPoint().
|
private |
Definition at line 499 of file CPImageCtrl.h.
Referenced by setCtrlPoint().