| 1428 | } |
| 1429 | |
| 1430 | DrawNodeBaseTest::DrawNodeBaseTest() |
| 1431 | { |
| 1432 | auto director = Director::getInstance(); |
| 1433 | director->setClearColor(Color4F(0, 0, 0, 0)); |
| 1434 | |
| 1435 | origin = director->getVisibleOrigin(); |
| 1436 | size = director->getVisibleSize(); |
| 1437 | center = Vec2(origin.x + size.width / 2, origin.y + size.height / 2); |
| 1438 | |
| 1439 | screen = Director::getInstance()->getVisibleSize(); |
| 1440 | sixth = Vec2(screen.width / 6, screen.height / 6); |
| 1441 | sixth.y; |
| 1442 | |
| 1443 | defY = (int)(center.y + sixth.y); |
| 1444 | defY2 = (int)(center.y - sixth.y); |
| 1445 | dev = sixth.y; |
| 1446 | |
| 1447 | pts = PointArray::create(n); |
| 1448 | pts2 = PointArray::create(n); |
| 1449 | pts->retain(); |
| 1450 | pts2->retain(); |
| 1451 | for (int i = 0; i < n; ++i) |
| 1452 | { |
| 1453 | pts->insertControlPoint(Vec2(0, 0), i); |
| 1454 | pts2->insertControlPoint(Vec2(0, 0), i); |
| 1455 | } |
| 1456 | |
| 1457 | generateDataPoints(); |
| 1458 | |
| 1459 | if (!drawNode) |
| 1460 | { |
| 1461 | drawNode = DrawNode::create(); |
| 1462 | drawNode->properties.setTransform(true); |
| 1463 | addChild(drawNode); |
| 1464 | } |
| 1465 | } |
| 1466 | |
| 1467 | void DrawNodeBaseTest::generateDataPoints() |
| 1468 | { |
nothing calls this directly
no test coverage detected