26 #include "hugin_config.h"
34 #include <OpenGL/gl.h>
71 vigra::Rect2D roi = opts->
getROI();
72 double width = (double) roi.width(),
73 height = (double) roi.height(),
74 margin = (width > height ? height : width) / 4.0;
75 top = (double) roi.top() + margin;
76 bottom = (double) roi.bottom() - margin;
77 left = (double) roi.left() + margin;
78 right = (double) roi.right() - margin;
85 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
86 glColor4f(1.0f, 1.0f, 1.0f, 0.38197f);
90 glVertex2d(roi.left(),
top); glVertex2d(
left,
top);
95 glVertex2d(
right,
top); glVertex2d(roi.right(),
top);
101 glVertex2d(
left, roi.top()); glVertex2d(
left,
top);
109 glEnable(GL_TEXTURE_2D);
161 if (movingCounter == 4 && wxGetKeyState(WXK_SHIFT))
165 if (std::abs(left_d) < std::abs(top_d))
178 if (movingCounter == 2 && wxGetKeyState(WXK_COMMAND))
181 ratio = 1.0f * roi.width() / roi.height();
185 if ((movingCounter == 1 || movingCounter == 2) && wxGetKeyState(WXK_SHIFT))
207 roi.setUpperLeft(vigra::Point2D(roi.left() - left_d, roi.top() - top_d));
208 roi.setLowerRight(vigra::Point2D(roi.right() - right_d, roi.bottom() - bottom_d));
211 const vigra::Size2D oldSize = roi.size();
214 roi.setSize(roi.width(), roi.width() / ratio);
218 roi.setSize(roi.height() * ratio, roi.height());
223 roi.moveBy(oldSize.width() - roi.width(), oldSize.height() - roi.height());
227 if((roi.top()<roi.bottom())&&(roi.left()<roi.right()))
271 if (changes == 5) changes = 0;
286 if (e.GetButton() == wxMOUSE_BTN_LEFT)
void DisableTexture(bool maskOnly=false)
include file for the hugin project
void ForceRequireRedraw()
HuginBase::PanoramaOptions * GetOptions()
const vigra::Rect2D & getROI() const
TextureManager * GetTextureManager()
wxwindows specific panorama commands
static GlobalCmdHist & getInstance()
void addCommand(PanoCommand *command, bool execute=true)
Adds a command to the history.
void setROI(const vigra::Rect2D &val)
ViewState * getViewState()
include file for the hugin project
void SetOptions(const HuginBase::PanoramaOptions *new_opts)