AddEllipseTo() public method

public AddEllipseTo ( Vector2 p, float r1, float r2, float angle ) : void
p Vector2
r1 float
r2 float
angle float
return void
Beispiel #1
0
    public void Ellipse(Vector2 p, float rx, float ry, float angle, float width)
    {
        if ((int)width == 1)
        {
            Ellipse(p, rx, ry, angle);
        }
        else
        {
            int r1 = (int)(width / 2f);
            int r2 = (int)width - r1;

            //Vector2[] _points = new Vector2[1] { p };

            SVGGraphicsPath _graphicsPath = new SVGGraphicsPath();
            _graphicsPath.AddEllipseTo(p, rx + r1, ry + r1, angle);
            _graphicsPath.AddEllipseTo(p, rx - r2, ry - r2, angle);

            _graphics.FillPath(_graphicsPath, p);
        }
    }
Beispiel #2
0
    //-----
    public void Ellipse(Vector2 p, float rx, float ry, float angle, float width)
    {
        if ((int) width == 1)
        {
            Ellipse(p, rx, ry, angle);
        }
        else
        {
            int r1 = (int) (width/2f);
            int r2 = (int) width - r1;

            //Vector2[] _points = new Vector2[1] { p };

            SVGGraphicsPath _graphicsPath = new SVGGraphicsPath();
            _graphicsPath.AddEllipseTo(p, rx + r1, ry + r1, angle);
            _graphicsPath.AddEllipseTo(p, rx - r2, ry - r2, angle);

            _graphics.FillPath(_graphicsPath, p);
        }
    }
Beispiel #3
0
    //-----
    public void Ellipse(SVGPoint p, float rx, float ry, float angle, float width)
    {
        if((int)width == 1) {
          Ellipse(p, rx, ry, angle);
        } 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.AddEllipseTo(p, rx + r1, ry + r1, angle);
          _graphicsPath.AddEllipseTo(p, rx - r2, ry - r2, angle);

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