AddCircleTo() public method

public AddCircleTo ( Vector2 p, float r ) : void
p Vector2
r float
return void
示例#1
0
    public void Circle(Vector2 p, float r, float width)
    {
        if ((int)width == 1)
        {
            Circle(p, r);
        }
        else
        {
            int r1 = (int)(width / 2f);
            int r2 = (int)width - r1;

            //Vector2[] _points = new Vector2[1];
            //_points[0] = new Vector2(p.x, p.y);

            SVGGraphicsPath _graphicsPath = new SVGGraphicsPath();
            _graphicsPath.AddCircleTo(p, r + r1);
            _graphicsPath.AddCircleTo(p, r - r2);

            _graphics.FillPath(_graphicsPath, p);
        }
    }
示例#2
0
    //-----
    public void Circle(Vector2 p, float r, float width)
    {
        if ((int) width == 1)
        {
            Circle(p, r);
        }
        else
        {
            int r1 = (int) (width/2f);
            int r2 = (int) width - r1;

            //Vector2[] _points = new Vector2[1];
            //_points[0] = new Vector2(p.x, p.y);

            SVGGraphicsPath _graphicsPath = new SVGGraphicsPath();
            _graphicsPath.AddCircleTo(p, r + r1);
            _graphicsPath.AddCircleTo(p, r - r2);

            _graphics.FillPath(_graphicsPath, p);
        }
    }
示例#3
0
    //-----
    public void Circle(SVGPoint p, float r, float width)
    {
        if((int)width == 1) {
          Circle(p, r);
        } else {
          int r1 = (int)(width / 2f);
          int r2 = (int)width - r1;

          SVGPoint[] _points = new SVGPoint[1];
          _points[0] = new SVGPoint(p.x, p.y);

          SVGGraphicsPath _graphicsPath = new SVGGraphicsPath();
          _graphicsPath.AddCircleTo(p, r + r1);
          _graphicsPath.AddCircleTo(p, r - r2);

          this._graphics.FillPath(_graphicsPath, _points);
        }
    }