MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / SetCircleTessellationMaxError

Method SetCircleTessellationMaxError

KBotExt/imgui/imgui_draw.cpp:370–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370void ImDrawListSharedData::SetCircleTessellationMaxError(float max_error)
371{
372 if (CircleSegmentMaxError == max_error)
373 return;
374
375 IM_ASSERT(max_error > 0.0f);
376 CircleSegmentMaxError = max_error;
377 for (int i = 0; i < IM_ARRAYSIZE(CircleSegmentCounts); i++)
378 {
379 const float radius = (float)i;
380 CircleSegmentCounts[i] = (ImU8)((i > 0) ? IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC(radius, CircleSegmentMaxError) : IM_DRAWLIST_ARCFAST_SAMPLE_MAX);
381 }
382 ArcFastRadiusCutoff = IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC_R(IM_DRAWLIST_ARCFAST_SAMPLE_MAX, CircleSegmentMaxError);
383}
384
385// Initialize before use in a new frame. We always have a command ready in the buffer.
386void ImDrawList::_ResetForNewFrame()

Callers 1

NewFrameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected