AntiAliasedLines=true;// Enable anti-aliasing on lines/borders. Disable if you are really short on CPU/GPU.
AntiAliasedFill=true;// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
CurveTessellationTol=1.25f;// Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.
CircleSegmentMaxError=0.75f;// Maximum error (in pixels) allowed when using AddCircle()/AddCircleFilled() or drawing rounded corner rectangles with no explicit segment count specified. Decrease for higher quality but more geometry.
CircleSegmentMaxError=1.60f;// Maximum error (in pixels) allowed when using AddCircle()/AddCircleFilled() or drawing rounded corner rectangles with no explicit segment count specified. Decrease for higher quality but more geometry.
IMGUI_APIvoidAddCircle(constImVec2¢er,floatradius,ImU32col,intnum_segments=12,floatthickness=1.0f);// Draw a circle - use num_segments <= 0 to automatically calculate tessellation (preferred). Use AddNgon() instead if you need a specific segment count.
IMGUI_APIvoidAddCircleFilled(constImVec2¢er,floatradius,ImU32col,intnum_segments=12);// Draw a filled circle - use num_segments <= 0 to automatically calculate tessellation (preferred). Use AddNgonFilled() instead if you need a specific segment count.
IMGUI_APIvoidAddNgon(constImVec2¢er,floatradius,ImU32col,intnum_segments,floatthickness=1.0f);// Draw an n-gon with a specific number of sides. Use AddCircle() instead if you want an actual circle and don't care about the exact side count.
IMGUI_APIvoidAddNgonFilled(constImVec2¢er,floatradius,ImU32col,intnum_segments);// Draw a filled n-gon with a specific number of sides. Use AddCircleFilled() instead if you want an actual circle and don't care about the exact side count.
ImGui::Checkbox("Anti-aliased lines",&style.AntiAliasedLines);ImGui::SameLine();HelpMarker("When disabling anti-aliasing lines, you'll probably want to disable borders in your style as well.");
ImGui::DragFloat("Max circle segment error",&style.CircleSegmentMaxError,0.01f,0.1f,10.0f,"%.2f",1.0f);
ImGui::DragFloat("Circle segment Max Error",&style.CircleSegmentMaxError,0.01f,0.10f,10.0f,"%.2f");
ImGui::DragFloat("Global Alpha",&style.Alpha,0.005f,0.20f,1.0f,"%.2f");// Not exposing zero here so user doesn't "lose" the UI (zero alpha clips all widgets). But application code could have a toggle to switch between zero and non-zero.
// You may want to create your own instance of this if you want to use ImDrawList completely without ImGui. In that case, watch out for future changes to this structure.
structIMGUI_APIImDrawListSharedData
{
ImVec2TexUvWhitePixel;// UV of white pixel in the atlas
ImVec4ClipRectFullscreen;// Value for PushClipRectFullscreen()
ImDrawListFlagsInitialFlags;// Initial flags at the beginning of the frame (it is possible to alter flags on a per-drawlist basis afterwards)
// Const data
// FIXME: Bake rounded corners fill/borders in atlas
ImVec2CircleVtx12[12];
// Cached circle segment counts for the first <n> radii (to avoid calculation overhead)
staticconstintNumCircleSegmentCounts=64;// Number of circle segment counts to cache (i.e. the maximum radius before we calculate dynamically)
intCircleSegmentCounts[NumCircleSegmentCounts];// The segment count for radius (array index + 1)
floatCircleSegmentCountsMaxCircleSegmentError;// The MaxCircleSegmentError used to calculate these counts
voidRecalculateCircleSegmentCounts();// Recalculate circle segment counts based on the current MaxCircleSegmentError
// [Internal] Lookup tables
ImVec2CircleVtx12[12];// FIXME: Bake rounded corners fill/borders in atlas
ImU8CircleSegmentCounts[64];// Precomputed segment count for given radius (array index + 1) before we calculate it dynamically (to avoid calculation overhead)