Engauge Digitizer
2
Loading...
Searching...
No Matches
Graphics
GraphicsArcItem.cpp
Go to the documentation of this file.
1
/******************************************************************************************************
2
* (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3
* under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4
* LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5
******************************************************************************************************/
6
7
#include "
GraphicsArcItem.h
"
8
#include <QDebug>
9
#include <QPainter>
10
#include <QGraphicsScene>
11
12
GraphicsArcItem::GraphicsArcItem
() :
13
QGraphicsEllipseItem ()
14
{
15
}
16
17
GraphicsArcItem::GraphicsArcItem
(
double
x,
18
double
y,
19
double
width,
20
double
height,
21
QGraphicsItem *parent) :
22
QGraphicsEllipseItem(x,
23
y,
24
width,
25
height,
26
parent)
27
{
28
}
29
30
GraphicsArcItem::GraphicsArcItem
(
const
QRectF &rect,
31
QGraphicsItem *parent) :
32
QGraphicsEllipseItem (rect,
33
parent)
34
{
35
}
36
37
void
GraphicsArcItem::paint
(QPainter *painter,
38
const
QStyleOptionGraphicsItem *
/* option */
,
39
QWidget *
/* widget */
)
40
{
41
double
start = startAngle ();
42
double
span = spanAngle ();
43
44
painter->setPen (pen ());
45
painter->drawArc (rect(),
46
start,
47
span);
48
}
49
GraphicsArcItem.h
GraphicsArcItem::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Paint without interior fill.
Definition
GraphicsArcItem.cpp:37
GraphicsArcItem::GraphicsArcItem
GraphicsArcItem()
Default constructor. This needs, at a minimum, a later call to setRect.
Definition
GraphicsArcItem.cpp:12
Generated on
for Engauge Digitizer by
1.14.0