CanvasCV: canvascv::Ellipse Class Reference
CanvasCV  1.0.0
canvascv::Ellipse Class Reference

The Ellipse class. More...

#include <ellipse.h>

Inheritance diagram for canvascv::Ellipse:
canvascv::Rectangle canvascv::CompoundShape canvascv::Shape

Public Member Functions

virtual const char * getType () const
 getType is always implemented by derived to return the same static pointer per shape. More...
 
- Public Member Functions inherited from canvascv::Rectangle
cv::RotatedRect getRect () const
 get the OpenCV representation of this shape
 
void setRect (const cv::RotatedRect &rect)
 set this shape from the OpenCV representation
 
virtual bool keyPressed (int &key)
 keyPressed will be called by Canvas for active shapes More...
 
bool isPointInRectangle (cv::Point pos)
 returns true if pos is in the rectangle representated by this shape
 
virtual bool isAtPos (const cv::Point &pos)
 returns true if shape is at pos, false otherwise
 
virtual std::list< Handle * > getConnectionTargets ()
 getConnectionTargets More...
 
- Public Member Functions inherited from canvascv::CompoundShape
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< ShapegetShape (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...
 
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
 
int getThickness () const
 get line thickness to use when drawing
 
int getLineType () const
 get the line type (LINE_4, LINE_8, LINE_AA)
 
int getId ()
 return a unique id for this shape
 

Additional Inherited Members

- Public Types inherited from canvascv::Shape
typedef std::function< void(Shape *, Event)> CBPerShape
 signature of a callback which gets the Event
 
- Protected Member Functions inherited from canvascv::Rectangle
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...
 
- Protected Member Functions inherited from canvascv::CompoundShape
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
 

Detailed Description

Allows you to draw a rotatable ellipse by mouse or from code

Examples:
example_shapes_widgets.cpp.

Member Function Documentation

virtual const char* canvascv::Ellipse::getType ( ) const
virtual
Returns
const char * pointer to string with shape type name

Reimplemented from canvascv::Rectangle.


The documentation for this class was generated from the following file:
  • CanvasCV-doxygen/src/canvascv/shapes/ellipse.h