mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-25 13:07:01 +00:00
Fixed lines clockwiseness to be consistent with other primitives.
This commit is contained in:
parent
ee3355fe8e
commit
c97636aef4
@ -5292,8 +5292,8 @@ void ImDrawList::AddVtxLine(const ImVec2& a, const ImVec2& b, ImU32 col)
|
|||||||
{
|
{
|
||||||
const float offset = GImGui.IO.PixelCenterOffset;
|
const float offset = GImGui.IO.PixelCenterOffset;
|
||||||
const ImVec2 hn = (b - a) * (0.50f / ImLength(b - a)); // half normal
|
const ImVec2 hn = (b - a) * (0.50f / ImLength(b - a)); // half normal
|
||||||
const ImVec2 hp0 = ImVec2(offset - hn.y, offset + hn.x); // half perpendiculars + user offset
|
const ImVec2 hp0 = ImVec2(offset + hn.y, offset - hn.x); // half perpendiculars + user offset
|
||||||
const ImVec2 hp1 = ImVec2(offset + hn.y, offset - hn.x);
|
const ImVec2 hp1 = ImVec2(offset - hn.y, offset + hn.x);
|
||||||
|
|
||||||
// Two triangles makes up one line. Using triangles allows us to make draw calls.
|
// Two triangles makes up one line. Using triangles allows us to make draw calls.
|
||||||
AddVtx(a + hp0, col);
|
AddVtx(a + hp0, col);
|
||||||
|
Loading…
Reference in New Issue
Block a user