Arc added
This commit is contained in:
parent
1c98c90e8c
commit
f175f2b721
@ -150,6 +150,23 @@ QPainterPath SkinnyShapeFactory::shapePath( Shape shape, const QSizeF& size )
|
|||||||
path.addPolygon( hexagon );
|
path.addPolygon( hexagon );
|
||||||
break;
|
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:
|
default:
|
||||||
return QPainterPath();
|
return QPainterPath();
|
||||||
|
@ -25,6 +25,7 @@ namespace SkinnyShapeFactory
|
|||||||
Ring,
|
Ring,
|
||||||
Star,
|
Star,
|
||||||
Hexagon,
|
Hexagon,
|
||||||
|
Arc,
|
||||||
|
|
||||||
ShapeCount
|
ShapeCount
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user