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

Method drawRect

core/2d/DrawNode.cpp:556–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

554}
555
556void DrawNode::drawRect(const Vec2& p1,
557 const Vec2& p2,
558 const Vec2& p3,
559 const Vec2& p4,
560 const Color4F& color,
561 float thickness)
562{
563 if (thickness <= 0.0f)
564 {
565 AXLOGW("{}: thickness <= 0", __FUNCTION__);
566 return;
567 }
568
569 Vec2 line[5] = {p1, p2, p3, p4, p1};
570 _drawPoly(line, 5, false, color, thickness, true);
571}
572
573void DrawNode::drawRect(const Vec2& origin, const Vec2& destination, const Color4F& color, float thickness)
574{

Callers 5

initMethod · 0.45
playDepthMethod · 0.45
updateMethod · 0.45
drawAllMethod · 0.45
drawAllv2Method · 0.45

Calls 1

Vec2Class · 0.70

Tested by 3

updateMethod · 0.36
drawAllMethod · 0.36
drawAllv2Method · 0.36