4 #include "compoundshape.h" 20 cv::RotatedRect
getRect()
const;
23 void setRect(
const cv::RotatedRect &rect);
30 std::vector<Point> pts(4);
35 return cv::pointPolygonTest(pts, pos,
false) >= 0;
38 virtual bool isAtPos(
const cv::Point &pos)
45 virtual void translate(
const cv::Point &offset);
47 virtual const char *
getType()
const;
49 static const char * type;
57 virtual void draw(cv::Mat &canvas);
58 virtual bool mousePressed(
const cv::Point &pos,
bool onCreate =
false);
61 virtual const string &getEditStatusMsg()
const;
64 void recalcRect(
const cv::Point &pos,
bool rotated =
false,
float offset = 0);
84 virtual void writeInternals(cv::FileStorage &fs)
const;
85 virtual void readInternals(
const cv::FileNode &node);
87 virtual void reloadPointers(
const std::list<Shape*> &lst, std::list<Shape*>::const_iterator &i);
The ShapeFactory class.
Definition: shapefactory.h:24
virtual bool mouseMoved(const cv::Point &pos)
mouseMoved
virtual bool mouseReleased(const cv::Point &pos)
mouseReleased
The CompoundShape class.
Definition: compoundshape.h:20
The ShapeFactoryT class.
Definition: shapefactory.h:45
void setRect(const cv::RotatedRect &rect)
set this shape from the OpenCV representation
This namespace holds all the classes of the CanvasCV library.
Definition: canvas.h:20
virtual bool isAtPos(const cv::Point &pos)
returns true if shape is at pos, false otherwise
Definition: rectangle.h:38
The Rectangle class.
Definition: rectangle.h:15
virtual bool keyPressed(int &key)
keyPressed will be called by Canvas for active shapes
virtual bool mousePressed(const cv::Point &pos, bool onCreate=false)
mousePressed
bool isPointInRectangle(cv::Point pos)
returns true if pos is in the rectangle representated by this shape
Definition: rectangle.h:28
cv::RotatedRect getRect() const
get the OpenCV representation of this shape
virtual const char * getType() const
getType is always implemented by derived to return the same static pointer per shape.
virtual std::list< Handle * > getConnectionTargets()
getConnectionTargets
virtual void draw(cv::Mat &canvas)
draw shape on the canvas
The Handle class.
Definition: handle.h:19