7 #include "shapefactory.h" 27 const std::string &
getName()
const;
30 void setName(
const std::string &value)
const;
32 int getArrowMagnitude()
const;
34 void setArrowMagnitude(
int mag);
36 const cv::Point &getTail()
const;
38 const cv::Point &getHead()
const;
74 virtual bool isAtPos(
const cv::Point &pos)
80 virtual const char *
getType()
const;
81 static const char * type;
89 virtual void draw(cv::Mat &canvas);
90 virtual bool mousePressed(
const cv::Point &pos,
bool onCreate =
false);
98 cv::Point middlePoint();
100 bool isMiddlePoint(
const cv::Point &pos,
int threshold=3);
102 void arrowTailHead(cv::Point &tail, cv::Point &head);
104 virtual void writeInternals(cv::FileStorage &fs)
const;
105 virtual void readInternals(
const cv::FileNode &node);
107 virtual void reloadPointers(
const std::list<Shape*> &lst, std::list<Shape*>::const_iterator &i);
109 virtual const std::string &getEditStatusMsg()
const;
111 int cross_z(
const Point &pt)
const;
112 int cross_z(
const Point &lineStart,
const Point &lineEnd,
int direction,
const Point &pt)
const;
128 #endif // LINECROSSING_H The ShapeFactory class.
Definition: shapefactory.h:24
bool wasCrossed(const Point &pt) const
wasCrossed
virtual bool mousePressed(const cv::Point &pos, bool onCreate=false)
mousePressed
The Line class.
Definition: line.h:18
The LineCrossing class.
Definition: linecrossing.h:19
virtual bool isAtPos(const cv::Point &pos)
returns true if shape is at pos, false otherwise
Definition: line.h:88
TextBox * getTextBox()
getter to internal TextBox
virtual std::list< Handle * > getConnectionTargets()
getConnectionTargets
The CompoundShape class.
Definition: compoundshape.h:20
Line * getLine()
getter to internal Line
void setName(const std::string &value) const
sets the text in the attached TextBox
int isCrossedBySegment(const Point &lineStart, const Point &lineEnd) const
isCrossedBy
The ShapeFactoryT class.
Definition: shapefactory.h:45
virtual const char * getType() const
getType is always implemented by derived to return the same static pointer per shape.
virtual void draw(cv::Mat &canvas)
draw shape on the canvas
This namespace holds all the classes of the CanvasCV library.
Definition: canvas.h:20
const std::string & getName() const
gets the text from the attached TextBox
The TextBox class.
Definition: textbox.h:19
int getDirection() const
-1 or 1
The Arrow class.
Definition: arrow.h:14
Arrow * getArrow()
getter to internal Arrow
virtual bool isAtPos(const cv::Point &pos)
returns true if shape is at pos, false otherwise
Definition: linecrossing.h:74