Skip to content
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

AddCircleFilled AddCircle in ImDrawList bug. #3738

Closed
1aam2am1 opened this issue Jan 21, 2021 · 1 comment
Closed

AddCircleFilled AddCircle in ImDrawList bug. #3738

1aam2am1 opened this issue Jan 21, 2021 · 1 comment

Comments

@1aam2am1
Copy link

Dear ImGui 1.80 WIP (17906)
--------------------------------
sizeof(size_t): 4, sizeof(ImDrawIdx): 4, sizeof(ImDrawVert): 20
define: __cplusplus=201703
define: IMGUI_DISABLE_OBSOLETE_FUNCTIONS
define: _WIN32
define: __MINGW32__
define: __GNUC__=10
define: IMGUI_HAS_VIEWPORT
define: IMGUI_HAS_DOCK
--------------------------------
io.BackendPlatformName: imgui_impl_sfml
io.BackendRendererName: SFML
io.ConfigFlags: 0x00000040
 DockingEnable
io.ConfigViewportsNoDecoration
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.ConfigWindowsMoveFromTitleBarOnly
io.ConfigMemoryCompactTimer = 60.0
io.BackendFlags: 0x00000007
 HasGamepad
 HasMouseCursors
 HasSetMousePos
--------------------------------
io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,512
io.DisplaySize: 1200.00,800.00
io.DisplayFramebufferScale: 1.00,1.00
--------------------------------
style.WindowPadding: 8.00,8.00
style.WindowBorderSize: 1.00
style.FramePadding: 4.00,3.00
style.FrameRounding: 0.00
style.FrameBorderSize: 0.00
style.ItemSpacing: 8.00,4.00
style.ItemInnerSpacing: 4.00,4.00

Back-ends: imgui_SFML
Compiler: msys2 mingw32 32bit
Operating System: Windows 10

There is bug in functions. As we can set radius to be smaller than 1 but bigger than 0, with num_segments == 0. Exist problem with getting precompiled data of how many num_segments we need to draw circle.

image

const int radius_idx = (int) radius - 1;

@ocornut
Copy link
Owner

ocornut commented Jan 25, 2021

Fixed by f144c67, thank you!

@ocornut ocornut closed this as completed Jan 25, 2021
ocornut added a commit that referenced this issue Jan 25, 2021
…h (rad > 0.0f && rad < 1.0f && num_segments == 0). (#3738)

Amend 051ce07. Maximum cached count becomes 63 instead of 64.
ocornut added a commit that referenced this issue Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants