-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent width of PathArcTo strokes #4993
Labels
Comments
thedmd
added a commit
to thedmd/imgui
that referenced
this issue
Feb 8, 2022
I got it fixed in 775b9e4. Translated example: if (ImGui::Begin("test"))
{
static float _testRadius = 1.0f;
static float _thickness = 1.0f;
ImGui::DragFloat("radius", &_testRadius, 0.1f);
ImGui::DragFloat("thickness", &_thickness, 1.0f);
const float Pi = 3.141592f;
auto drawList = ImGui::GetWindowDrawList();
auto center = ImVec2(300, 400) + ImGui::GetCursorScreenPos();
auto max = 100;
//_testRadius = max - 20;
for (float i = _testRadius; i < max; i += 20)
{
auto radius = 10 + i;
drawList->PathClear();
drawList->PathArcTo(center + ImVec2(0, -100), max - radius, 1.5f * Pi, Pi);
drawList->PathArcTo(center + ImVec2(-max, 10), radius, 0, Pi * 0.5f);
drawList->PathLineTo(center + ImVec2(-max - 100, 10 + radius));
drawList->AddPolyline(drawList->_Path.Data, drawList->_Path.Size, IM_COL32_WHITE, ImDrawFlags_None, _thickness + 2.0);
drawList->PathStroke(IM_COL32(169, 169, 169, 255), ImDrawFlags_None, _thickness);
}
ImGui::End();
} |
Wow! That's incredible. One more thing... I noticed that ImGui.net v1.84 can cause division/0 exceptions for |
ocornut
pushed a commit
that referenced
this issue
Feb 8, 2022
edvn0
pushed a commit
to edvn0/imgui
that referenced
this issue
Feb 24, 2022
sergeyn
pushed a commit
to sergeyn/imgui
that referenced
this issue
Mar 19, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version/Branch of Dear ImGui:
Version: 1.83
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends imgui .net
Operating System: windows 10
My Issue/Question:
After upgrading from 1.77 to 1.86 there seem to appear rendering glitches for paths that include PathArcTo() with a small radius.
It's not unlikely that I'm not using the API correctly. But the effect only appeared recently and might be a regression of some optimization.
Screenshots/Video
As screenshot highlighting some issues.
Here is a capture of the code below...
https://user-images.githubusercontent.com/1732545/152852430-57253e47-46aa-4239-bcd4-939993eb1bef.mp4
Standalone, minimal, complete and verifiable example: (see #2261)
Sorry. c# only... 🙈
The text was updated successfully, but these errors were encountered: