Skip to content

Commit 7aee48c

Browse files
committed
corrected drawRing being polygonized
1 parent a62e1fb commit 7aee48c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

viewer/vibesgraphicsitem.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,7 +1923,7 @@ bool VibesGraphicsPoint::computeProjection(int dimX, int dimY)
19231923
// Get arrow color (or default if not specified)
19241924

19251925

1926-
// VibesGraphicsPie has JSON type "arrow"
1926+
// VibesGraphicsPoint has JSON type "point"
19271927
Q_ASSERT(json["type"].toString() == "point");
19281928
// "bounds" is a matrix
19291929
QJsonArray point = json["point"].toArray();
@@ -1970,7 +1970,7 @@ bool VibesGraphicsPoints::parseJsonGraphics(const QJsonObject& json)
19701970
// Retrieve type
19711971
QString type = json["type"].toString();
19721972

1973-
// VibesGraphicsPie has JSON type "arrow"
1973+
// VibesGraphicsPoints has JSON type "points"
19741974
if (type == "points")
19751975
{
19761976
QJsonArray centers = json["centers"].toArray();
@@ -2016,7 +2016,7 @@ bool VibesGraphicsPoints::computeProjection(int dimX, int dimY)
20162016
// Now process shape-specific properties
20172017
// (we can only update properties of a shape, but mutation into another type is not supported)
20182018
Q_ASSERT(json.contains("type"));
2019-
// VibesGraphicsRing has JSON type "ring"
2019+
// VibesGraphicscPoints has JSON type "points"
20202020
Q_ASSERT(json["type"].toString() == "points");
20212021

20222022
// Before update, we first remove all existing points
@@ -2086,7 +2086,7 @@ bool VibesGraphicsRing::parseJsonGraphics(const QJsonObject& json)
20862086
// Retrieve type
20872087
QString type = json["type"].toString();
20882088

2089-
// VibesGraphicsPie has JSON type "arrow"
2089+
// VibesGraphicsRing has JSON type "ring"
20902090
if (type == "ring" && json.contains("center") && json.contains("rho"))
20912091
{
20922092
QJsonArray center = json["center"].toArray();
@@ -2139,10 +2139,9 @@ bool VibesGraphicsRing::computeProjection(int dimX, int dimY)
21392139
path.addEllipse(boundingBoxP);
21402140

21412141
QRectF boundingBoxM(cx - rho_m, cy - rho_m, 2 * rho_m, 2 * rho_m);
2142-
QPainterPath pathM;
2143-
pathM.addEllipse(boundingBoxM);
2142+
path.addEllipse(boundingBoxM);
21442143

2145-
path = path.subtracted(pathM);
2144+
// path = path.subtracted(pathM);
21462145

21472146

21482147
// Draw with the new properties
@@ -2188,7 +2187,7 @@ bool VibesGraphicsRaster::computeProjection(int dimX, int dimY)
21882187
// Now process shape-specific properties
21892188
// (we can only update properties of a shape, but mutation into another type is not supported)
21902189
Q_ASSERT(json.contains("type"));
2191-
// VibesGraphicsRing has JSON type "ring"
2190+
// VibesGraphicsRaster has JSON type "raster"
21922191
Q_ASSERT(json["type"].toString() == "raster");
21932192

21942193

0 commit comments

Comments
 (0)