|
Public Types |
| enum | ImageRotation { ROT0 = 0,
ROT90,
ROT180,
ROT270
} |
| | image rotation. More...
|
Public Member Functions |
| | MaskImageCtrl () |
| | ctor.
|
| 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 (MaskEditorPanel *parent) |
| void | setPreviewOnly () |
| | if called, the mouse handlers are deactivated
|
| void | setImage (const std::string &filename, HuginBase::MaskPolygonVector newMask, ImageRotation rot) |
| | set the current image and mask list, this loads also the image from cache
|
| void | setNewMasks (HuginBase::MaskPolygonVector newMasks) |
| | updates masks for currently selected image
|
| void | setActiveMask (unsigned int newMask, bool doUpdate=true) |
| | mark mask with image as beeing editing
|
| HuginBase::MaskPolygonVector | getNewMask () const |
| | returns the vector of all mask (including new created mask)
|
| void | selectAllMarkers () |
| | select all points of active mask
|
| void | mouseMoveEvent (wxMouseEvent &mouse) |
| | event handler when mouse is moving
|
| void | mousePressLMBEvent (wxMouseEvent &mouse) |
| | event handler when left mouse button is pressed
|
| void | mouseReleaseLMBEvent (wxMouseEvent &mouse) |
| | event handler when right mouse button is released
|
| void | mouseDblClickLeftEvent (wxMouseEvent &mouse) |
| | event handler for left double click
|
| void | mousePressRMBEvent (wxMouseEvent &mouse) |
| | event handler when right mouse button is pressed
|
| void | mouseReleaseRMBEvent (wxMouseEvent &mouse) |
| | event handler when right mouse button is released
|
| void | OnKeyUp (wxKeyEvent &e) |
| | event handler for keyboard
|
| void | OnCaptureLost (wxMouseCaptureLostEvent &e) |
| | event handler, when mouse capture is lost, e.g.
|
| void | OnKillFocus (wxFocusEvent &e) |
| | event handler, when editor lost focus, mainly cancels creating new polygon
|
| void | startNewPolygon () |
| | starts creating a new polygon
|
| wxSize | DoGetBestSize () const |
| | returns size of currently scaled image
|
| void | setScale (double factor) |
| | set the scaling factor for mask editing display.
|
| double | getScale () |
| | return scale factor, 0 for autoscale
|
| ImageRotation | getCurrentRotation () |
| | returns the current rotation of displayed image
|
| void | update () |
| | initiate redraw
|
| void | SetUserColourPolygonNegative (wxColour newColour) |
| | sets the colour for different parts
|
| void | SetUserColourPolygonPositive (wxColour newColour) |
| void | SetUserColourPointSelected (wxColour newColour) |
| void | SetUserColourPointUnselected (wxColour newColour) |
Protected Member Functions |
| void | OnDraw (wxDC &dc) |
| | drawing routine
|
| void | OnSize (wxSizeEvent &e) |
| | handler called when size of control was changed
|
| double | getScaleFactor () const |
| | get scale factor (calculates factor when fit to window is active)
|
| double | calcAutoScaleFactor (wxSize size) |
| | calculate new scale factor for this image
|
| void | rescaleImage () |
| | rescale the image
|
This class handles all mask editing.