本文整理汇总了C++中BezierCurve::setC1方法的典型用法代码示例。如果您正苦于以下问题:C++ BezierCurve::setC1方法的具体用法?C++ BezierCurve::setC1怎么用?C++ BezierCurve::setC1使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BezierCurve
的用法示例。
在下文中一共展示了BezierCurve::setC1方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: transformed
BezierCurve BezierCurve::transformed(QTransform transformation)
{
BezierCurve transformedCurve = *this; // copy the curve
if (isSelected(-1)) { transformedCurve.setOrigin(transformation.map(origin)); }
for(int i=0; i< vertex.size(); i++)
{
if (isSelected(i-1)) { transformedCurve.setC1(i, transformation.map(c1.at(i))); }
if (isSelected(i))
{
transformedCurve.setC2(i, transformation.map(c2.at(i)));
transformedCurve.setVertex(i, transformation.map(vertex.at(i)));
}
}
//transformedCurve.smoothCurve();
/*QPointF newOrigin = origin;
if (isSelected(-1)) { newOrigin = transformation.map(newOrigin); }
transformedCurve.setOrigin( newOrigin );
for(int i=0; i< vertex.size(); i++) {
QPointF newC1 = c1.at(i);
QPointF newC2 = c2.at(i);
QPointF newVertex = vertex.at(i);
if (isSelected(i-1)) { newC1 = transformation.map(newC1); }
if (isSelected(i)) { newC2 = transformation.map(newC2); newVertex = transformation.map(newVertex); }
transformedCurve.appendCubic( newC1, newC2, newVertex, pressure.at(i) );
if (isSelected(i)) { transformedCurve.setSelected(i, true); }
}
transformedCurve.setWidth( width);
transformedCurve.setVariableWidth( variableWidth );
//transformedCurve.setSelected(true); // or select only the selected elements of the orginal curve?
*/
return transformedCurve;
}