Skip to content

Commit 0010e77

Browse files
Update DrawNode.h - add const (#2394)
1 parent 528660e commit 0010e77

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

core/2d/DrawNode.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ void DrawNode::drawSegment(const Vec2& from,
577577
_drawSegment(from, to, color, thickness, etStart, etEnd);
578578
}
579579

580-
void DrawNode::drawPolygon(Vec2* verts,
580+
void DrawNode::drawPolygon(const Vec2* verts,
581581
int count,
582582
const Color4B& fillColor,
583583
float thickness,
@@ -592,7 +592,7 @@ void DrawNode::drawPolygon(Vec2* verts,
592592
_drawPolygon(verts, count, fillColor, borderColor, true, thickness, isconvex);
593593
}
594594

595-
void DrawNode::drawPolygon(Vec2* verts, int count, float thickness, const Color4B& borderColor, bool isconvex)
595+
void DrawNode::drawPolygon(const Vec2* verts, int count, float thickness, const Color4B& borderColor, bool isconvex)
596596
{
597597
if (thickness < 0.0f)
598598
{
@@ -602,7 +602,7 @@ void DrawNode::drawPolygon(Vec2* verts, int count, float thickness, const Color4
602602
_drawPolygon(verts, count, Color4B::TRANSPARENT, borderColor, true, thickness, isconvex);
603603
}
604604

605-
void DrawNode::drawSolidPolygon(Vec2* verts,
605+
void DrawNode::drawSolidPolygon(const Vec2* verts,
606606
int count,
607607
const Color4B& fillColor,
608608
float thickness,

core/2d/DrawNode.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,16 +478,16 @@ class AX_DLL DrawNode : public Node
478478
* @param borderColor The border of line color.
479479
* @js NA
480480
*/
481-
void drawPolygon(Vec2* verts,
481+
void drawPolygon(const Vec2* verts,
482482
int count,
483483
const Color4B& fillColor,
484484
float thickness,
485485
const Color4B& borderColor,
486486
bool isconvex = false);
487487

488-
void drawPolygon(Vec2* verts, int count, float thickness, const Color4B& borderColor, bool isconvex = false);
488+
void drawPolygon(const Vec2* verts, int count, float thickness, const Color4B& borderColor, bool isconvex = false);
489489

490-
void drawSolidPolygon(Vec2* verts,
490+
void drawSolidPolygon(const Vec2* verts,
491491
int count,
492492
const Color4B& fillColor,
493493
float thickness,

0 commit comments

Comments
 (0)