本文整理汇总了C++中KoPathShape::arcTo方法的典型用法代码示例。如果您正苦于以下问题:C++ KoPathShape::arcTo方法的具体用法?C++ KoPathShape::arcTo怎么用?C++ KoPathShape::arcTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KoPathShape
的用法示例。
在下文中一共展示了KoPathShape::arcTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createEllipseShape
KoShape* KisShapeToolHelper::createEllipseShape(const QRectF& rect)
{
KoShape* shape;
KoShapeFactoryBase *rectFactory = KoShapeRegistry::instance()->value("EllipseShape");
if (rectFactory) {
shape = rectFactory->createDefaultShape();
shape->setSize(rect.size());
shape->setPosition(rect.topLeft());
} else {
//Fallback if the plugin wasn't found
KoPathShape* path = new KoPathShape();
path->setShapeId(KoPathShapeId);
QPointF rightMiddle = QPointF(rect.left() + rect.width(), rect.top() + rect.height() / 2);
path->moveTo(rightMiddle);
path->arcTo(rect.width() / 2, rect.height() / 2, 0, 360.0);
path->close();
path->normalize();
shape = path;
}
return shape;
}