Fix radius spline control point.
--HG-- branch : feature
This commit is contained in:
parent
d7cbeeadbe
commit
970d4d1f00
|
@ -36,10 +36,11 @@
|
||||||
VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position,
|
VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position,
|
||||||
const QPointF &controlPoint, const QPointF &splinePoint,
|
const QPointF &controlPoint, const QPointF &splinePoint,
|
||||||
QGraphicsItem *parent)
|
QGraphicsItem *parent)
|
||||||
:QGraphicsEllipseItem(parent), radius(qApp->toPixel(1.5)), controlLine(nullptr), indexSpline(indexSpline),
|
:QGraphicsEllipseItem(parent), radius(0), controlLine(nullptr), indexSpline(indexSpline),
|
||||||
position(position)
|
position(position)
|
||||||
{
|
{
|
||||||
//create circle
|
//create circle
|
||||||
|
radius = (1.5/*mm*/ / 25.4) * VApplication::PrintDPI;
|
||||||
QRectF rec = QRectF(0, 0, radius*2, radius*2);
|
QRectF rec = QRectF(0, 0, radius*2, radius*2);
|
||||||
rec.translate(-rec.center().x(), -rec.center().y());
|
rec.translate(-rec.center().x(), -rec.center().y());
|
||||||
this->setRect(rec);
|
this->setRect(rec);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user