当前位置: 首页>>代码示例>>C++>>正文


C++ KoPathShape::documentToShape方法代码示例

本文整理汇总了C++中KoPathShape::documentToShape方法的典型用法代码示例。如果您正苦于以下问题:C++ KoPathShape::documentToShape方法的具体用法?C++ KoPathShape::documentToShape怎么用?C++ KoPathShape::documentToShape使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KoPathShape的用法示例。


在下文中一共展示了KoPathShape::documentToShape方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: restorePoint

 void restorePoint( KoPathPoint * p )
 {
     KoPathShape * shape = p->parent();
     p->setPoint( shape->documentToShape( oldNode ) );
     if( p->activeControlPoint1() )
         p->setControlPoint1( shape->documentToShape( oldControlPoint1 ) );
     if( p->activeControlPoint2() )
         p->setControlPoint2( shape->documentToShape( oldControlPoint2 ) );
 }
开发者ID:JeremiasE,项目名称:KFormula,代码行数:9,代码来源:KarbonWhirlPinchCommand.cpp

示例2: undoChanges

void KoPathPointTypeCommand::undoChanges(const QList<PointData> &data)
{
    QList<PointData>::const_iterator it(data.begin());
    for (; it != data.end(); ++it) {
        KoPathShape *pathShape = it->m_pointData.pathShape;
        KoPathPoint *point = pathShape->pointByIndex(it->m_pointData.pointIndex);

        point->setProperties(it->m_oldProperties);
        if (it->m_hadControlPoint1)
            point->setControlPoint1(pathShape->documentToShape(it->m_oldControlPoint1));
        else
            point->removeControlPoint1();
        if (it->m_hadControlPoint2)
            point->setControlPoint2(pathShape->documentToShape(it->m_oldControlPoint2));
        else
            point->removeControlPoint2();
    }
}
开发者ID:NavyZhao1978,项目名称:QCalligra,代码行数:18,代码来源:KoPathPointTypeCommand.cpp

示例3: undo

void KoSubpathJoinCommand::undo()
{
    KUndo2Command::undo();
    KoPathShape * pathShape = m_pointData1.pathShape;
    pathShape->update();
    if (m_pointData1.pointIndex.first == m_pointData2.pointIndex.first) {
        pathShape->openSubpath(m_pointData1.pointIndex);
    } else {
        pathShape->breakAfter(m_splitIndex);
        pathShape->moveSubpath(m_pointData1.pointIndex.first + 1, m_pointData2.pointIndex.first);

        if (m_reverse & ReverseSecond) {
            pathShape->reverseSubpath(m_pointData2.pointIndex.first);
        }
        if (m_reverse & ReverseFirst) {
            pathShape->reverseSubpath(m_pointData1.pointIndex.first);
        }
    }
    KoPathPoint * point1 = pathShape->pointByIndex(m_pointData1.pointIndex);
    KoPathPoint * point2 = pathShape->pointByIndex(m_pointData2.pointIndex);

    // restore the old end points
    if (m_reverse & ReverseFirst)
        point1->setControlPoint1(pathShape->documentToShape(m_oldControlPoint1));
    else
        point1->setControlPoint2(pathShape->documentToShape(m_oldControlPoint1));

    point1->setProperties(m_oldProperties1);

    if (m_reverse & ReverseSecond)
        point2->setControlPoint1(pathShape->documentToShape(m_oldControlPoint2));
    else
        point2->setControlPoint2(pathShape->documentToShape(m_oldControlPoint2));

    point2->setProperties(m_oldProperties2);

    pathShape->normalize();
    pathShape->update();
}
开发者ID:AninaRJ,项目名称:krita,代码行数:39,代码来源:KoSubpathJoinCommand.cpp


注:本文中的KoPathShape::documentToShape方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。