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


C++ PointArray::clear方法代码示例

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


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

示例1: initPoints

void ShapeManager::initPoints()
{
    // 기본 값으로 position setting.
    clearAllPositions();

    // BIG_REV_TRI
    PointArray points;
    points.push_back(Point(240, 360));
    points.push_back(Point(1040, 360));
    points.push_back(Point(640, 700));
    _triangles[BIG_REV_TRI].setPoints(points);
    points.clear();

    // MID_REV_TRI
    points.push_back(Point(340, 360));
    points.push_back(Point(940, 360));
    points.push_back(Point(640, 600));
    _triangles[MID_REV_TRI].setPoints(points);
    points.clear();

    // SMALL_REV_TRI
    points.push_back(Point(440, 360));
    points.push_back(Point(840, 360));
    points.push_back(Point(640, 500));
    _triangles[SMALL_REV_TRI].setPoints(points);
    points.clear();

    // MINI_REV_TRI
    points.push_back(Point(404, 500));
    points.push_back(Point(876, 500));
    points.push_back(Point(640, 700));
    _triangles[MINI_REV_TRI].setPoints(points);
    points.clear();

    // MICRO_REV_TRI
    points.push_back(Point(514, 500));
    points.push_back(Point(764, 500));
    points.push_back(Point(640, 600));
    _triangles[MICRO_REV_TRI].setPoints(points);
    points.clear();

    // PIES
    points.push_back(Point(240, 20));
    points.push_back(Point(1040, 700));
    Angle angle;
    angle = std::make_pair(180.0F, 180.0F);
    _pies[BIG_CENTER_PIE].setPoints(points);
    _pies[BIG_CENTER_PIE].setAngle(angle);

    points.push_back(Point(240, 20));
    points.push_back(Point(1040, 700));
    angle = std::make_pair(180.0F, 40.0F);
    _pies[BIG_LEFT_PIE].setPoints(points);
    _pies[BIG_LEFT_PIE].setAngle(angle);
    points.clear();

    points.push_back(Point(240, 20));
    points.push_back(Point(1040, 700));
    angle = std::make_pair(320.0F, 40.0F);
    _pies[BIG_RIGHT_PIE].setPoints(points);
    _pies[BIG_RIGHT_PIE].setAngle(angle);
    points.clear();

    points.push_back(Point(340, 120));
    points.push_back(Point(940, 600));
    angle = std::make_pair(180.0F, 180.0F);
    _pies[MID_PIE].setPoints(points);
    _pies[MID_PIE].setAngle(angle);
    points.clear();

    points.push_back(Point(440, 220));
    points.push_back(Point(840, 500));
    angle = std::make_pair(180.0F, 180.0F);
    _pies[SMALL_PIE].setPoints(points);
    _pies[SMALL_PIE].setAngle(angle);
    points.clear();

    // RECTANGLES
    points = makeRectanglePoints(280, 160, 50, 50);
    _rectangles[OUT_LEFT_RECT].setPoints(points);

    points = makeRectanglePoints(615, 30, 50, 50);
    _rectangles[OUT_CENTER_RECT].setPoints(points);

    points = makeRectanglePoints(950, 160, 50, 50);
    _rectangles[OUT_RIGHT_RECT].setPoints(points);

    points = makeRectanglePoints(430, 180, 40, 40);
    _rectangles[MID_LEFT_RECT].setPoints(points);

    points = makeRectanglePoints(810, 180, 40, 40);
    _rectangles[MID_RIGHT_RECT].setPoints(points);

    points = makeRectanglePoints(480, 290, 40, 40);
    _rectangles[IN_LEFT_RECT].setPoints(points);

    points = makeRectanglePoints(800, 290, 40, 40);
    _rectangles[IN_RIGHT_RECT].setPoints(points);

    points = makeRectanglePoints(620, 550, 40, 40);
//.........这里部分代码省略.........
开发者ID:jjangminkim,项目名称:AmsongApp,代码行数:101,代码来源:ShapeManager.cpp


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