| 4173 | //------------------------------------------------------------------------------ |
| 4174 | |
| 4175 | void 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 | |
| 4188 | void ClipperOffset::DoMiter(int j, int k, double r) |