The CompoundShape class. More...
#include <compoundshape.h>

Public Member Functions | |
| virtual void | setOutlineColor (const cv::Scalar &value) |
| set the outline color | |
| virtual void | setFillColor (const cv::Scalar &value) |
| set the fill color (fill color is not very useful for shapes right now) | |
| virtual void | setThickness (int value) |
| set line thickness to use when drawing | |
| virtual void | setLineType (int value) |
| set the line type (LINE_4, LINE_8, LINE_AA) | |
| virtual void | setLocked (bool value) |
| set the shape lock state (can/can't be moved/edited) | |
| virtual void | setVisible (bool value) |
| set the shape visible state | |
| virtual std::shared_ptr< Shape > | getShape (int id) |
| getShape More... | |
Public Member Functions inherited from canvascv::Shape | |
| Shape () | |
| constructor | |
| Shape (const Shape &other) | |
| copy constructor | |
| virtual | ~Shape () |
| virtual destructor | |
| void | notifyOnEvent (CBPerShape cb) |
| used to register for notifications on shape More... | |
| virtual std::list< Handle * > | getConnectionTargets ()=0 |
| getConnectionTargets More... | |
| cv::Scalar | getOutlineColor () const |
| get the outline color | |
| cv::Scalar | getFillColor () const |
| get the fill color (fill color is not very useful for shapes right now) | |
| bool | getLocked () const |
| is the shape locked (can't be moved/edited) | |
| bool | getVisible () const |
| is the shape visible | |
| virtual const char * | getType () const =0 |
| getType is always implemented by derived to return the same static pointer per shape. More... | |
| int | getThickness () const |
| get line thickness to use when drawing | |
| int | getLineType () const |
| get the line type (LINE_4, LINE_8, LINE_AA) | |
| virtual bool | isAtPos (const cv::Point &pos)=0 |
| returns true if shape is at pos, false otherwise | |
| int | getId () |
| return a unique id for this shape | |
Protected Member Functions | |
| virtual void | draw (cv::Mat &canvas) |
| draw shape on the canvas More... | |
| virtual bool | mousePressed (const cv::Point &pos, bool onCreate=false) |
| mousePressed More... | |
| virtual bool | mouseMoved (const cv::Point &pos) |
| mouseMoved More... | |
| virtual bool | mouseReleased (const cv::Point &pos) |
| mouseReleased More... | |
| virtual bool | keyPressed (int &key) |
| keyPressed will be called by Canvas for active shapes More... | |
| virtual void | lostFocus () |
| lostFocus is called by Canvas if we're in it and just became non-active | |
Protected Member Functions inherited from canvascv::Shape | |
| void | drawHelper (cv::Mat &canvas, Shape *other) |
| helper method for non compund shapes to draw their members | |
Additional Inherited Members | |
Public Types inherited from canvascv::Shape | |
| typedef std::function< void(Shape *, Event)> | CBPerShape |
| signature of a callback which gets the Event | |
Detailed Description
A utility class used by shapes which are the combination of other shapes
Member Function Documentation
|
protectedvirtual |
- Parameters
-
canvas
Implements canvascv::Shape.
Reimplemented in canvascv::Line, canvascv::LineCrossing, canvascv::Polygon, canvascv::Rectangle, and canvascv::Arrow.
|
virtual |
Get internal shapes, which Canvas doesn't know of.
- Parameters
-
id
- Returns
- internal sub shape with requested id
Reimplemented from canvascv::Shape.
|
protectedvirtual |
- Parameters
-
key was pressed. You must set it to -1 if you consumed it.
- Returns
- true if we want to stay in focus and false otherwise
Reimplemented from canvascv::Shape.
Reimplemented in canvascv::Line, canvascv::Polygon, and canvascv::Rectangle.
|
protectedvirtual |
- Was a mouse moved over this shape?
- If shape is during edit, then these are the mouse position.
- Parameters
-
pos
- Returns
- true if a mouse moved over this shape, or it is during edit. false otherwise.
Implements canvascv::Shape.
Reimplemented in canvascv::Line, canvascv::Polygon, and canvascv::Rectangle.
|
protectedvirtual |
- Parameters
-
pos onCreate is true if this is the mouse press which cerated this shape
- Returns
- true for keep in focus, false for leave focus
Implements canvascv::Shape.
Reimplemented in canvascv::Line, canvascv::LineCrossing, canvascv::ShapesConnector, canvascv::Polygon, and canvascv::Rectangle.
|
protectedvirtual |
- Parameters
-
pos
- Returns
- true for keep in focus, false for leave focus
Implements canvascv::Shape.
Reimplemented in canvascv::Line, canvascv::ShapesConnector, canvascv::Polygon, and canvascv::Rectangle.
The documentation for this class was generated from the following file:
- CanvasCV-doxygen/src/canvascv/shapes/compoundshape.h
Generated by
1.8.11

Public Member Functions inherited from
Facebook
Linkedin
Google+