Engauge Digitizer 2
Loading...
Searching...
No Matches
GraphicsArcItem Class Reference

Draw an arc as an ellipse but without lines from the center to the start and end points. More...

#include <GraphicsArcItem.h>

Inheritance diagram for GraphicsArcItem:
Inheritance graph
Collaboration diagram for GraphicsArcItem:
Collaboration graph

Public Member Functions

 GraphicsArcItem ()
 Default constructor. This needs, at a minimum, a later call to setRect.
 GraphicsArcItem (double x, double y, double width, double height, QGraphicsItem *parent=0)
 Constructor with individual coordinates. Also sets transform origin point.
 GraphicsArcItem (const QRectF &rect, QGraphicsItem *parent=0)
 Constructor with coordinates specified as rectangle.
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 Paint without interior fill.

Detailed Description

Draw an arc as an ellipse but without lines from the center to the start and end points.

Use within GraphicsArcItemRelay when there is a possibility that geometry updates would be done while an event handler is executing

This class probably requires the circumscribed rectangle used to construct the ellipse to be normalized to prevent QTBUG-80937

Definition at line 19 of file GraphicsArcItem.h.

Constructor & Destructor Documentation

◆ GraphicsArcItem() [1/3]

GraphicsArcItem::GraphicsArcItem ( )

Default constructor. This needs, at a minimum, a later call to setRect.

Definition at line 12 of file GraphicsArcItem.cpp.

12 :
13 QGraphicsEllipseItem ()
14{
15}

◆ GraphicsArcItem() [2/3]

GraphicsArcItem::GraphicsArcItem ( double x,
double y,
double width,
double height,
QGraphicsItem * parent = 0 )

Constructor with individual coordinates. Also sets transform origin point.

Definition at line 17 of file GraphicsArcItem.cpp.

21 :
22 QGraphicsEllipseItem(x,
23 y,
24 width,
25 height,
26 parent)
27{
28}

◆ GraphicsArcItem() [3/3]

GraphicsArcItem::GraphicsArcItem ( const QRectF & rect,
QGraphicsItem * parent = 0 )

Constructor with coordinates specified as rectangle.

Definition at line 30 of file GraphicsArcItem.cpp.

31 :
32 QGraphicsEllipseItem (rect,
33 parent)
34{
35}

Member Function Documentation

◆ paint()

void GraphicsArcItem::paint ( QPainter * painter,
const QStyleOptionGraphicsItem * option,
QWidget * widget )
virtual

Paint without interior fill.

Definition at line 37 of file GraphicsArcItem.cpp.

40{
41 double start = startAngle ();
42 double span = spanAngle ();
43
44 painter->setPen (pen ());
45 painter->drawArc (rect(),
46 start,
47 span);
48}

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