コード例 #1
0
        private void CircleInternal(RenderTarget target, float x, float y, float radius, uint color = 0, bool fill = false, uint pointCount = 0)
        {
            float       xf    = x - radius;
            float       yf    = y - radius;
            CircleShape shape = new CircleShape(radius);

            if (fill)
            {
                shape.FillColor = new Color(color);
            }
            else
            {
                shape.FillColor = Color.Transparent;
            }
            shape.OutlineThickness = 1.5f;
            shape.OutlineColor     = new Color(color);
            shape.Position         = new Vector2f(xf, yf);
            shape.SetPointCount(pointCount > 0 ? pointCount : shape.GetPointCount() * 2);
            target.Draw(shape);
        }