1 か月前 · Jul 20, 2026 1:08 AM
How to render ultra-smooth, anti-aliased FOV circles without jagged pixel edges:
CPP
void DrawFOVCircle(ImVec2 center, float radius, ImU32 color, float thickness) {
ImDrawList* dl = ImGui::GetBackgroundDrawList();
// Set segment count to 128 for perfectly round circle
dl->AddCircle(center, radius, color, 128, thickness);
// Optional: Draw subtle glow aura around circumference
dl->AddCircle(center, radius + 1.0f, (color & 0x00FFFFFF) | 0x33000000, 128, 2.0f);
}128 segments ensures the circle remains butter-smooth on 4K monitors.