Arc added

This commit is contained in:
Uwe Rathmann 2022-10-07 14:32:55 +02:00
parent 1c98c90e8c
commit f175f2b721
2 changed files with 18 additions and 0 deletions

View File

@ -150,6 +150,23 @@ QPainterPath SkinnyShapeFactory::shapePath( Shape shape, const QSizeF& size )
path.addPolygon( hexagon );
break;
}
case Arc:
{
path.arcMoveTo( rect, -60 );
path.arcTo( rect, -60, 300 );
const double w = 0.25 * rect.width();
const auto r = rect.adjusted( w, w, -w, -w );
QPainterPath innerPath;
innerPath.arcMoveTo( r, 240 );
innerPath.arcTo( r, 240, -300 );
path.connectPath( innerPath );
break;
}
default:
return QPainterPath();

View File

@ -25,6 +25,7 @@ namespace SkinnyShapeFactory
Ring,
Star,
Hexagon,
Arc,
ShapeCount
};