public static void DrawCricleMinimap(Vector2 screenPosition, float radius, Color color, float width = 2F, int quality = -1) { if (quality == -1) { quality = (int)(radius / 3 + 15); } Vector2 rad = new Vector2(0, radius); List <MinimapCircleSegment> segments = new List <MinimapCircleSegment>(); bool full = true; for (int i = 0; i <= quality; i++) { Vector2 pos = (screenPosition + rad).RotateAroundPoint(screenPosition, PI2 * i / quality); bool contains = MinimapRectangle.Contains(pos); if (!contains) { full = false; } segments.Add(new MinimapCircleSegment(pos, contains)); } foreach (Vector2[] ar in FindArcs(segments, full)) { Line.DrawLine(color, width, ar); } }
private void DrawCircleMinimap(Vector3 screenPosition, float radius, System.Drawing.Color color, int thickness = 5, int quality = -1) { float PI2 = (float)Math.PI * 2; if (quality == -1) { quality = (int)(radius / 3 + 15); } var rad = new Vector2(0, radius); var segments = new List <MinimapCircleSegment>(); var full = true; for (var i = 0; i <= quality; i++) { var pos = (screenPosition.To2D() + rad).RotateAroundPoint(screenPosition.To2D(), PI2 * i / quality); var contains = MinimapRectangle.Contains(pos); if (!contains) { full = false; } segments.Add(new MinimapCircleSegment(pos, contains)); } foreach (var ar in FindArcs(segments, full)) { EloBuddy.SDK.Rendering.Line.DrawLine(color, thickness, ar); } }