MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / DoSquare

Method DoSquare

TheForceEngine/TFE_Polygon/clipper.cpp:4175–4185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4173//------------------------------------------------------------------------------
4174
4175void ClipperOffset::DoSquare(int j, int k)
4176{
4177 double dx = std::tan(std::atan2(m_sinA,
4178 m_normals[k].X * m_normals[j].X + m_normals[k].Y * m_normals[j].Y) / 4);
4179 m_destPoly.push_back(IntPoint(
4180 Round(m_srcPoly[j].X + m_delta * (m_normals[k].X - m_normals[k].Y * dx)),
4181 Round(m_srcPoly[j].Y + m_delta * (m_normals[k].Y + m_normals[k].X * dx))));
4182 m_destPoly.push_back(IntPoint(
4183 Round(m_srcPoly[j].X + m_delta * (m_normals[j].X + m_normals[j].Y * dx)),
4184 Round(m_srcPoly[j].Y + m_delta * (m_normals[j].Y - m_normals[j].X * dx))));
4185}
4186//------------------------------------------------------------------------------
4187
4188void ClipperOffset::DoMiter(int j, int k, double r)

Callers

nothing calls this directly

Calls 3

IntPointClass · 0.85
RoundFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected