Ejemplo n.º 1
0
    //--------------------------------------------------------------------------------
    //Method: Polygon.
    //--------------------------------------------------------------------------------
    private void PrePolygon(SVGPoint[] points)
    {
        if((points != null) && (points.GetLength(0) > 0)) {
          BeginSubBuffer();
          ExpandBounds(points);

          this._basicDraw.MoveTo(points[0]);
          int _length = points.GetLength(0);
          for(int i = 1; i < _length; i++)
        this._basicDraw.LineTo(points[i]);
          this._basicDraw.LineTo(points[0]);
        }
    }
Ejemplo n.º 2
0
    //-----
    public void Polyline(SVGPoint[] points, float width)
    {
        if((int)width == 1) {
          Polygon(points);
          return;
        }
        int _length = points.GetLength(0);
        if(_length > 1) {
          if(_length >= 2) {
        Line(points[0], points[1], width);
        StrokeLineCapLeft(points[0], points[1], width);
        StrokeLineCapRight(points[_length - 2], points[_length - 1], width);

        for(int i = 1; i < _length - 1; i++) {
          StrokeLineJoin(points[i - 1], points[i], points[i + 1], width);
          Line(points[i], points[i + 1], width);
        }
          }
        }
    }
Ejemplo n.º 3
0
    //Fill Solid color, No fill Stroke
    public void EndSubBuffer(SVGPoint[] points)
    {
        PreEndSubBuffer();

        for(int i = 0; i < points.GetLength(0); i++)
          Fill(points[i].x, points[i].y);
        for(int i = this._inZoneL; i < this._subW + this._inZoneL; i++)
          for(int j = this._inZoneT; j < this._subH + this._inZoneT; j++)
        if(this._flag[i, j] != -1)
          this._graphics.SetPixel(i, j);
    }
Ejemplo n.º 4
0
    //--------------------------------------------------------------------------------
    //Methods: Polyline
    //--------------------------------------------------------------------------------
    public void Polyline(SVGPoint[] points)
    {
        if((this.isUseWidth) && ((int)this._width > 1)) {
          Polyline(points, this._width);
          return;
        }

        int _length = points.GetLength(0);
        if(_length > 1) {
          this._basicDraw.MoveTo(points[0]);
          for(int i = 1; i < _length; i++)
        this._basicDraw.LineTo(points[i]);
        }
    }