Skip to content

Commit

Permalink
Merge pull request #133 from godardma/master
Browse files Browse the repository at this point in the history
[viewer] centered point drawing
  • Loading branch information
SimonRohou authored Oct 16, 2024
2 parents ad1cb42 + b1179f1 commit dcb440f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions viewer/vibesgraphicsitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,7 @@ bool VibesGraphicsPoint::computeProjection(int dimX, int dimY)
rad = json["Radius"].toDouble(0.01);
}

this->setRect(0, 0, 2 * rad, 2 * rad);
this->setRect(-rad, -rad, 2 * rad, 2 * rad);

this->setPos(cx, cy);

Expand Down Expand Up @@ -1752,7 +1752,7 @@ bool VibesGraphicsPoints::computeProjection(int dimX, int dimY)
double r = radiusesExist ? radiuses[i].toDouble() : radius;

// Draw with the new properties
QGraphicsEllipseItem * disk = new QGraphicsEllipseItem(0, 0, 2 * r, 2 * r);
QGraphicsEllipseItem * disk = new QGraphicsEllipseItem(-r, -r, 2 * r, 2 * r);
disk->setPos(x, y);

disk->setPen(pen);
Expand Down

0 comments on commit dcb440f

Please sign in to comment.