MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / _CalcCircleAutoSegmentCount

Method _CalcCircleAutoSegmentCount

3rdparty/imgui/src/imgui_draw.cpp:656–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

654}
655
656int ImDrawList::_CalcCircleAutoSegmentCount(float radius) const
657{
658 // Automatic segment count
659 const int radius_idx = (int)(radius + 0.999999f); // ceil to never reduce accuracy
660 if (radius_idx >= 0 && radius_idx < IM_COUNTOF(_Data->CircleSegmentCounts))
661 return _Data->CircleSegmentCounts[radius_idx]; // Use cached value
662 else
663 return IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC(radius, _Data->CircleSegmentMaxError);
664}
665
666// Render-level scissoring. This is passed down to your render function but not used for CPU-side coarse clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling)
667void ImDrawList::PushClipRect(const ImVec2& cr_min, const ImVec2& cr_max, bool intersect_with_current_clip_rect)

Callers 3

RadioButtonMethod · 0.80
ColorPicker4Method · 0.80
ShowStyleEditorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected