AddQuadraticCurveTo() public méthode

public AddQuadraticCurveTo ( Vector2 p1, Vector2 p ) : void
p1 Vector2
p Vector2
Résultat void
 //--------------------------------------------------------------------------------
 //Method: Render
 //--------------------------------------------------------------------------------
 public void Render(SVGGraphicsPath _graphicsPath)
 {
     SVGPoint p, p1;
     p = currentPoint;
     p1 = controlPoint1;
     _graphicsPath.AddQuadraticCurveTo(p1, p);
 }
    //--------------------------------------------------------------------------------
    //Method: Render
    //--------------------------------------------------------------------------------
    public void Render(SVGGraphicsPath _graphicsPath)
    {
        Vector2 p, p1;

        p  = currentPoint;
        p1 = controlPoint1;
        _graphicsPath.AddQuadraticCurveTo(p1, p);
    }
Exemple #3
0
    public void QuadraticCurveTo(Vector2 p1, Vector2 p, float width)
    {
        Vector2 _point = Vector2.zero;

        _point = _basicDraw.currentPoint;

        Vector2 _p1 = Vector2.zero;
        Vector2 _p2 = Vector2.zero;
        Vector2 _p3 = Vector2.zero;
        Vector2 _p4 = Vector2.zero;

        _graphics.GetThickLine(_point, p1, width, ref _p1, ref _p2, ref _p3, ref _p4);

        Vector2 _p5 = Vector2.zero;
        Vector2 _p6 = Vector2.zero;
        Vector2 _p7 = Vector2.zero;
        Vector2 _p8 = Vector2.zero;

        _graphics.GetThickLine(p1, p, width, ref _p5, ref _p6, ref _p7, ref _p8);

        Vector2 _cp1, _cp2;

        _cp1 = _graphics.GetCrossPoint(_p1, _p3, _p5, _p7);
        _cp2 = _graphics.GetCrossPoint(_p2, _p4, _p6, _p8);

        SVGGraphicsPath _graphicsPath = new SVGGraphicsPath();

        _graphicsPath.AddMoveTo(_p2);
        _graphicsPath.AddQuadraticCurveTo(_cp2, _p8);
        _graphicsPath.AddLineTo(_p7);
        _graphicsPath.AddQuadraticCurveTo(_cp1, _p1);
        _graphicsPath.AddLineTo(_p2);
        _graphics.FillPath(_graphicsPath);

        MoveTo(p);
    }
Exemple #4
0
    //-----
    public void QuadraticCurveTo(Vector2 p1, Vector2 p, float width)
    {
        Vector2 _point = Vector2.zero;
        _point = _basicDraw.currentPoint;

        Vector2 _p1 = Vector2.zero;
        Vector2 _p2 = Vector2.zero;
        Vector2 _p3 = Vector2.zero;
        Vector2 _p4 = Vector2.zero;

        _graphics.GetThickLine(_point, p1, width, ref _p1, ref _p2, ref _p3, ref _p4);

        Vector2 _p5 = Vector2.zero;
        Vector2 _p6 = Vector2.zero;
        Vector2 _p7 = Vector2.zero;
        Vector2 _p8 = Vector2.zero;

        _graphics.GetThickLine(p1, p, width, ref _p5, ref _p6, ref _p7, ref _p8);

        Vector2 _cp1, _cp2;
        _cp1 = _graphics.GetCrossPoint(_p1, _p3, _p5, _p7);
        _cp2 = _graphics.GetCrossPoint(_p2, _p4, _p6, _p8);

        SVGGraphicsPath _graphicsPath = new SVGGraphicsPath();
        _graphicsPath.AddMoveTo(_p2);
        _graphicsPath.AddQuadraticCurveTo(_cp2, _p8);
        _graphicsPath.AddLineTo(_p7);
        _graphicsPath.AddQuadraticCurveTo(_cp1, _p1);
        _graphicsPath.AddLineTo(_p2);
        _graphics.FillPath(_graphicsPath);

        MoveTo(p);
    }
Exemple #5
0
 public void Render(SVGGraphicsPath _graphicsPath)
 {
     _graphicsPath.AddQuadraticCurveTo(controlPoint1, currentPoint);
 }
Exemple #6
0
    //-----
    public void QuadraticCurveTo(SVGPoint p1, SVGPoint p, float width)
    {
        SVGPoint _point = new SVGPoint(0f, 0f);
        _point.SetValue(this._basicDraw.currentPoint);

        SVGPoint _p1 = new SVGPoint(0f, 0f);
        SVGPoint _p2 = new SVGPoint(0f, 0f);
        SVGPoint _p3 = new SVGPoint(0f, 0f);
        SVGPoint _p4 = new SVGPoint(0f, 0f);

        this._graphics.GetThickLine(_point, p1, width, ref _p1, ref _p2, ref _p3, ref _p4);

        SVGPoint _p5 = new SVGPoint(0f, 0f);
        SVGPoint _p6 = new SVGPoint(0f, 0f);
        SVGPoint _p7 = new SVGPoint(0f, 0f);
        SVGPoint _p8 = new SVGPoint(0f, 0f);

        this._graphics.GetThickLine(p1, p, width, ref _p5, ref _p6, ref _p7, ref _p8);

        SVGPoint _cp1, _cp2;
        _cp1 = this._graphics.GetCrossPoint(_p1, _p3, _p5, _p7);
        _cp2 = this._graphics.GetCrossPoint(_p2, _p4, _p6, _p8);

        SVGGraphicsPath _graphicsPath = new SVGGraphicsPath();
        _graphicsPath.AddMoveTo(_p2);
        _graphicsPath.AddQuadraticCurveTo(_cp2, _p8);
        _graphicsPath.AddLineTo(_p7);
        _graphicsPath.AddQuadraticCurveTo(_cp1, _p1);
        _graphicsPath.AddLineTo(_p2);
        this._graphics.FillPath(_graphicsPath);

        MoveTo(p);
    }
 public void Render(SVGGraphicsPath _graphicsPath)
 {
     _graphicsPath.AddQuadraticCurveTo(controlPoint1, currentPoint);
 }