void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { ....... float c = 180*angleAt(_x0, _y0)/M_PI; painter->rotate(c); ....... QPainterPath path; p1.addRect(0, 0, width, height); painter->drawPath(path); ....... }
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { ....... QPainterPath path; p1.addRect(0, 0, width, height); painter->drawPath(path); ....... }
bool contains(const QPointF &p) const { return pointIntesectLine(_x0, _y0, 0, 0, p.x(), p.y(), 1); }