Parallel draw->AddLine() for fill area without ImDrawFlags_StrokeLegacy alters colour #9585

Closed
opened 2026-10-15 10:44:38 +00:00 by inflex · 0 comments
inflex commented 2026-10-15 10:44:38 +00:00 (Migrated from github.com)

Version/Branch of Dear ImGui:

1.93.0

Back-ends:

imgui_impl_SDL3

Compiler, OS:

Ubuntu 26, g++

Full config/build information:

No response

Details:

After migrating to ImGui 1.93.0 my line-scan (odd/even) polygon fill algorithm generated notably paler fills.

If I draw the lines with;

			draw->AddLine(as, bs, color, 1.0f, ImDrawFlags_StrokeLegacy );

the colour reverts back to what is expected; so I'm presuming that the AA/blending/etc is creating a fringe around the line which is overlapping and causing the fill to seem faded.

*NOTE: I don't believe this to be a bug as such, it's a limitation of how I am using the AddLine() call.

( yes, I'm aware there's other general/concave polygon fill algorithms but I use the linescan one because of certain complexities including holes )

Demonstrating the proper colour, using the Legacy flag
Image

Without the legacy flag
Image

### Version/Branch of Dear ImGui: 1.93.0 ### Back-ends: imgui_impl_SDL3 ### Compiler, OS: Ubuntu 26, g++ ### Full config/build information: _No response_ ### Details: After migrating to ImGui 1.93.0 my line-scan (odd/even) polygon fill algorithm generated notably paler fills. If I draw the lines with; ``` draw->AddLine(as, bs, color, 1.0f, ImDrawFlags_StrokeLegacy ); ``` the colour reverts back to what is expected; so I'm presuming that the AA/blending/etc is creating a fringe around the line which is overlapping and causing the fill to seem faded. *NOTE: I don't believe this to be a bug as such, it's a limitation of how **I** am using the AddLine() call. ( yes, I'm aware there's other general/concave polygon fill algorithms but I use the linescan one because of certain complexities including holes ) Demonstrating the proper colour, using the Legacy flag <img width="2181" height="1306" alt="Image" src="https://github.com/user-attachments/assets/4af5917f-4f40-4f52-a0d2-532b84ecb360" /> Without the legacy flag <img width="1918" height="1015" alt="Image" src="https://github.com/user-attachments/assets/be7ff1fe-b65f-4677-8e5a-0562b58ac2de" />
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ocornut/imgui#9585
No description provided.