1

I'm drawing different shapes with drawPolygon function. The following code snippet draws a hexagon as the picture shows (yes, it's partially transparent):

std::vector<Vec2> polyCoords = {
        Vec2(75, 7),
        Vec2(25, 7),
        Vec2(0, 50),
        Vec2(25, 93),
        Vec2(75, 93),
        Vec2(100, 50)
    };
DrawNode* poly = DrawNode::create();
poly->setPosition(Vec2(500, 500));
poly->drawPolygon(polyCoords.data(), polyCoords.size(), Color4F(1,0,0,0.8), 10, Color4F(0,1,0,0.4));

enter image description here

As you can see the border is centered. I'd like to set the border to appear only outside the polygon area. It wouldn't be a problem if I were using solid colors, but in my case it's noticeable. Is there a way to remove the inner part of the border?

Zoltán
  • 678
  • 4
  • 15

0 Answers0