| 1383 | } |
| 1384 | |
| 1385 | void DrawNode::_drawPoint(const Vec2& position, |
| 1386 | const float pointSize, |
| 1387 | const Color4F& color, |
| 1388 | const DrawNode::PointType pointType) |
| 1389 | { |
| 1390 | if (properties.drawOrder == true) |
| 1391 | { |
| 1392 | float pointSize4 = pointSize * 0.25f; |
| 1393 | Vec2 vec2Size4 = Vec2(pointSize4, pointSize4); |
| 1394 | |
| 1395 | switch (pointType) |
| 1396 | { |
| 1397 | case PointType::Circle: |
| 1398 | { |
| 1399 | _drawCircle(position, pointSize4, 90, 32, false, 1.0f, 1.0f, Color4F(), color, true); |
| 1400 | break; |
| 1401 | } |
| 1402 | case PointType::Rect: |
| 1403 | { |
| 1404 | Vec2 origin = position - vec2Size4; |
| 1405 | Vec2 destination = position + vec2Size4; |
| 1406 | Vec2 _vertices[] = {origin, Vec2(destination.x, origin.y), destination, Vec2(origin.x, destination.y), |
| 1407 | origin}; |
| 1408 | _drawPolygon(_vertices, 5, color, color, false, 0.0f, true); |
| 1409 | } |
| 1410 | break; |
| 1411 | default: |
| 1412 | break; |
| 1413 | } |
| 1414 | |
| 1415 | return; |
| 1416 | } |
| 1417 | |
| 1418 | if (properties.drawOrder == true) |
| 1419 | { |
| 1420 | float pointSize4 = pointSize * 0.25f; |
| 1421 | Vec2 origin = position - Vec2(pointSize4, pointSize4); |
| 1422 | Vec2 destination = position + Vec2(pointSize4, pointSize4); |
| 1423 | Vec2 _vertices[] = {origin, Vec2(destination.x, origin.y), destination, Vec2(origin.x, destination.y)}; |
| 1424 | _drawPolygon(_vertices, 4, color, color, false, 0.0f, true); |
| 1425 | } |
| 1426 | else |
| 1427 | { |
| 1428 | auto point = expandBufferAndGetPointer(_points, 1); |
| 1429 | _pointsDirty = true; |
| 1430 | |
| 1431 | *point = {position, color, Vec2(pointSize, 0.0f)}; |
| 1432 | } |
| 1433 | } |
| 1434 | |
| 1435 | void DrawNode::_drawPie(const Vec2& center, |
| 1436 | float radius, |
nothing calls this directly
no test coverage detected