Build list of points which can be used to draw polygons so it appears to be a thick line.

You can find more information in comments below.

bool MakeThickPath( // Calculate points required to draw thick path 
    const std::vector<PointF> &path, // Path points. Should have at least 2 points 
    const bool loop, // Whether the path should be closed one(last point is connected to first one). Can only be used when path has 3 and more points 
    const float width, // Path width. If middle is false the positive and negative width can be specified, When positive, the path will be thickened outward(in direction of normal). When negative it will be thickened inward(in direction opposite to normal) 
    const bool middle, // Whether the path will be thickened equally in both direction(inward and outward) by half width 
    std::vector<std::pair<PointF, PointF>> &points); // Resulting points which can be used to draw polygons. The polygon can be constructed using as { points[i][0], points[i + 1][0], points[i + 1][1], points[i][1] }. This argument will have the same size as path array
Namespace: nitisa
Include: Nitisa/Render/Utils.h