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

Method drawSolidRect

core/2d/DrawNode.cpp:640–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638}
639
640void DrawNode::drawSolidRect(const Vec2& origin,
641 const Vec2& destination,
642 const Color4F& fillColor,
643 float thickness,
644 const Color4F& borderColor)
645{
646 if (thickness < 0.0f)
647 {
648 AXLOGW("{}: thickness < 0, changed to 0", __FUNCTION__);
649 thickness = 0.0f;
650 }
651 Vec2 _vertices[] = {origin, Vec2(destination.x, origin.y), destination, Vec2(origin.x, destination.y), origin};
652 _drawPolygon(_vertices, 5, fillColor, borderColor, true, thickness, true);
653}
654
655void DrawNode::drawSolidPoly(const Vec2* poli,
656 unsigned int numberOfPoints,

Callers 7

drawDebugRectsMethod · 0.80
updateMethod · 0.80
drawAllMethod · 0.80
drawAllv2Method · 0.80
addChildStencilsMethod · 0.80

Calls 1

Vec2Class · 0.70

Tested by 4

updateMethod · 0.64
drawAllMethod · 0.64
drawAllv2Method · 0.64
addChildStencilsMethod · 0.64