MCPcopy Create free account
hub / github.com/axmolengine/axmol / _drawLine

Method _drawLine

core/2d/DrawNode.cpp:1201–1212  ·  view source on GitHub ↗

Internal function _drawLine => thickness is always 1 (fastes way to draw a line)

Source from the content-addressed store, hash-verified

1199}
1200// Internal function _drawLine => thickness is always 1 (fastes way to draw a line)
1201void DrawNode::_drawLine(const Vec2& from, const Vec2& to, const Color4F& color)
1202{
1203 Vec2 vertices[2] = {from, to};
1204 applyTransform(vertices, vertices, 2);
1205
1206
1207 auto line = expandBufferAndGetPointer(_lines, 2);
1208 _linesDirty = true;
1209
1210 line[0] = {vertices[0], color, Vec2::ZERO};
1211 line[1] = {vertices[1], color, Vec2::ZERO};
1212}
1213
1214void DrawNode::_drawDot(const Vec2& pos, float radius, const Color4F& color)
1215{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected