LabelMe
Public Member Functions | Public Attributes | List of all members
My::Rectangle Class Reference

代表矩形形状,继承Shape2D类 More...

#include <Rectangle.h>

Inheritance diagram for My::Rectangle:
My::Shape2D My::Shape

Public Member Functions

 Rectangle ()
 
virtual void draw (QWidget *w)
 绘制形状函数 More...
 
virtual bool isInShape (QPointF p, QWidget *w)
 判断是否在形状内函数 More...
 
virtual void offset (float xOffset, float yOffset)
 偏移形状函数 More...
 
- Public Member Functions inherited from My::Shape2D
 Shape2D (My::Shape::Type t)
 
virtual ~Shape2D ()=0
 
- Public Member Functions inherited from My::Shape
 Shape (Type t)
 
virtual ~Shape ()=0
 

Public Attributes

float width
 存储矩形的宽 More...
 
float height
 存储矩形的高 More...
 
- Public Attributes inherited from My::Shape2D
QVector< QPointF > points
 存储标注形状的像素点位 More...
 
- Public Attributes inherited from My::Shape
const Type type
 标注类型 More...
 
QString label
 标注对应的标签文字 More...
 
QColor color =QColor(100,255,0,100)
 默认标注颜色 More...
 
bool isFill =false
 是否填充内部 More...
 
bool isHide =false
 是否隐藏标注 More...
 
bool isHover =false
 是否悬浮 More...
 

Additional Inherited Members

- Public Types inherited from My::Shape
enum  Type {
  Brush, Rectangle, Polygons, Circle,
  Curve, Rectangle3D, Brush3D
}
 标注形状的类型 More...
 

Detailed Description

代表矩形形状,继承Shape2D类

Constructor & Destructor Documentation

◆ Rectangle()

My::Rectangle::Rectangle ( )
inline

Member Function Documentation

◆ draw()

void My::Rectangle::draw ( QWidget *  w)
virtual

绘制形状函数

绘制矩形

Reimplemented from My::Shape2D.

◆ isInShape()

bool My::Rectangle::isInShape ( QPointF  p,
QWidget *  w 
)
virtual

判断是否在形状内函数

判断是否在矩形内部

Reimplemented from My::Shape2D.

◆ offset()

void My::Rectangle::offset ( float  xOffset,
float  yOffset 
)
virtual

偏移形状函数

偏移标注

Reimplemented from My::Shape2D.

Member Data Documentation

◆ height

float My::Rectangle::height

存储矩形的高

◆ width

float My::Rectangle::width

存储矩形的宽


The documentation for this class was generated from the following files: