示例#1
0
 //-----
 public void FillPath(SVGLinearGradientBrush linearGradientBrush, SVGColor?strokePathColor, SVGGraphicsPath graphicsPath)
 {
     BeginSubBuffer();
     graphicsPath.RenderPath(this, true);
     if (strokePathColor != null)
     {
         EndSubBuffer(linearGradientBrush, strokePathColor);
     }
     else
     {
         EndSubBuffer(linearGradientBrush);
     }
 }
示例#2
0
 public void EndSubBuffer(SVGLinearGradientBrush linearGradientBrush)
 {
     PreEndSubBuffer();
     for (int i = inZoneL; i < subW + inZoneL; i++)
     {
         for (int j = inZoneT; j < subH + inZoneT; j++)
         {
             if (flag[i, j] == 0)
             {
                 Color _color = linearGradientBrush.GetColor(i, j);
                 graphics.SetColor(_color);
                 graphics.SetPixel(i, j);
             }
         }
     }
 }
示例#3
0
 //Fill Linear Gradient, no fill Stroke
 public void EndSubBuffer(SVGLinearGradientBrush linearGradientBrush)
 {
     PreEndSubBuffer();
     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] == 0)
             {
                 Color _color = linearGradientBrush.GetColor(i, j);
                 this._graphics.SetColor(_color);
                 this._graphics.SetPixel(i, j);
             }
         }
     }
 }
示例#4
0
        public void Render()
        {
            CreateGraphicsPath();
            _render.SetStrokeLineCap(_paintable.strokeLineCap);
            _render.SetStrokeLineJoin(_paintable.strokeLineJoin);
            switch (_paintable.GetPaintType())
            {
            case SVGPaintMethod.SolidGradientFill:
            {
                _render.FillPath(_paintable.fillColor.Value, _graphicsPath);
                Draw();
                break;
            }

            case SVGPaintMethod.LinearGradientFill:
            {
                SVGLinearGradientBrush _linearGradBrush =
                    _paintable.GetLinearGradientBrush(_graphicsPath);

                if (_linearGradBrush != null)
                {
                    _render.FillPath(_linearGradBrush, _graphicsPath);
                }
                Draw();
                break;
            }

            case SVGPaintMethod.RadialGradientFill:
            {
                SVGRadialGradientBrush _radialGradBrush =
                    _paintable.GetRadialGradientBrush(_graphicsPath);

                if (_radialGradBrush != null)
                {
                    _render.FillPath(_radialGradBrush, _graphicsPath);
                }
                Draw();
                break;
            }

            case SVGPaintMethod.PathDraw:
            {
                Draw();
                break;
            }
            }
        }
示例#5
0
    public void EndSubBuffer(SVGLinearGradientBrush linearGradientBrush, SVGColor?strokePathColor)
    {
        PreEndSubBuffer();

        for (int i = inZoneL; i < subW + inZoneL; i++)
        {
            for (int j = inZoneT; j < subH + inZoneT; j++)
            {
                if (flag[i, j] != FILL_FLAG)
                {
                    Color _color = linearGradientBrush.GetColor(i, j);
                    graphics.SetColor(_color);
                    graphics.SetPixel(i, j);
                }
            }
        }

        graphics.SetColor(strokePathColor.Value.color);

        FillInZone();
    }
示例#6
0
    //Fill Linear Gradient, with fill Stroke
    public void EndSubBuffer(SVGLinearGradientBrush linearGradientBrush, SVGColor?strokePathColor)
    {
        PreEndSubBuffer();

        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)
                {
                    Color _color = linearGradientBrush.GetColor(i, j);
                    this._graphics.SetColor(_color);
                    this._graphics.SetPixel(i, j);
                }
            }
        }

        this._graphics.SetColor(strokePathColor.Value.color);

        FillInZone();
    }
示例#7
0
    //Fill khong co Stroke, va ve stroke sau
    public void FillPath(SVGLinearGradientBrush linearGradientBrush,
                         SVGColor?strokePathColor,
                         float width,
                         SVGGraphicsPath graphicsPath)
    {
        graphicsFill.FillPath(linearGradientBrush, strokePathColor, graphicsPath);

        if ((int)width == 1)
        {
            graphicsFill.FillPath(linearGradientBrush, strokePathColor, graphicsPath);
        }
        else
        {
            graphicsFill.FillPath(linearGradientBrush, graphicsPath);
        }

        if (strokePathColor == null)
        {
            return;
        }
        SetColor(strokePathColor.Value.color);
    }
示例#8
0
 //================================================================================
 //--------------------------------------------------------------------------------
 //Path Linear Gradient Fill
 //--------------------------------------------------------------------------------
 //Fill khong to Stroke
 public void FillPath(SVGLinearGradientBrush linearGradientBrush,
                             SVGGraphicsPath graphicsPath)
 {
     this._graphicsFill.FillPath(linearGradientBrush, graphicsPath);
 }
示例#9
0
 public void FillPath(SVGLinearGradientBrush linearGradientBrush, SVGColor? strokePathColor,
                    SVGGraphicsPath graphicsPath)
 {
     ResetSubBuffer();
     graphicsPath.RenderPath(this, true);
     if(strokePathColor != null)
       EndSubBuffer(linearGradientBrush, strokePathColor);
     else
       EndSubBuffer(linearGradientBrush);
 }
示例#10
0
 public void FillPath(SVGLinearGradientBrush linearGradientBrush, SVGGraphicsPath graphicsPath)
 {
     ResetSubBuffer();
     graphicsPath.RenderPath(this, true);
     EndSubBuffer(linearGradientBrush);
 }
示例#11
0
    public void EndSubBuffer(SVGLinearGradientBrush linearGradientBrush, SVGColor? strokePathColor)
    {
        PreEndSubBuffer();

        for(int i = inZoneL; i < subW + inZoneL; i++) {
          for(int j = inZoneT; j < subH + inZoneT; j++) {
        if(flag[i, j] != FILL_FLAG) {
          Color _color = linearGradientBrush.GetColor(i, j);
          graphics.SetColor(_color);
          graphics.SetPixel(i, j);
        }
          }
        }

        graphics.SetColor(strokePathColor.Value.color);

        FillInZone();
    }
示例#12
0
 public void EndSubBuffer(SVGLinearGradientBrush linearGradientBrush)
 {
     PreEndSubBuffer();
     for(int i = inZoneL; i < subW + inZoneL; i++) {
       for(int j = inZoneT; j < subH + inZoneT; j++) {
     if(flag[i, j] == 0) {
       Color _color = linearGradientBrush.GetColor(i, j);
       graphics.SetColor(_color);
       graphics.SetPixel(i, j);
     }
       }
     }
 }
示例#13
0
    //Fill Linear Gradient, with fill Stroke
    public void EndSubBuffer(SVGLinearGradientBrush linearGradientBrush, SVGColor? strokePathColor)
    {
        PreEndSubBuffer();

        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) {
          Color _color = linearGradientBrush.GetColor(i, j);
          this._graphics.SetColor(_color);
          this._graphics.SetPixel(i, j);
        }
          }
        }

        this._graphics.SetColor(strokePathColor.Value.color);

        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] > 0)
          this._graphics.SetPixel(i, j);
    }
示例#14
0
 //Fill Linear Gradient, no fill Stroke
 public void EndSubBuffer(SVGLinearGradientBrush linearGradientBrush)
 {
     PreEndSubBuffer();
     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] == 0) {
       Color _color = linearGradientBrush.GetColor(i, j);
       this._graphics.SetColor(_color);
       this._graphics.SetPixel(i, j);
     }
       }
     }
 }
示例#15
0
 //-----
 //Fill co Stroke trong do luon
 public void FillPath(SVGLinearGradientBrush linearGradientBrush,
                           SVGColor? strokePathColor,
                           SVGGraphicsPath graphicsPath)
 {
     this._graphicsFill.FillPath(linearGradientBrush, strokePathColor, graphicsPath);
 }
示例#16
0
 //Fill khong to Stroke
 public void FillPath(SVGLinearGradientBrush linearGradientBrush,
                      SVGGraphicsPath graphicsPath)
 {
     graphicsFill.FillPath(linearGradientBrush, graphicsPath);
 }
示例#17
0
 //Fill co Stroke trong do luon
 public void FillPath(SVGLinearGradientBrush linearGradientBrush,
                      SVGColor?strokePathColor,
                      SVGGraphicsPath graphicsPath)
 {
     graphicsFill.FillPath(linearGradientBrush, strokePathColor, graphicsPath);
 }
示例#18
0
    //-----
    //Fill khong co Stroke, va ve stroke sau
    public void FillPath(SVGLinearGradientBrush linearGradientBrush,
                              SVGColor? strokePathColor,
                              float width,
                              SVGGraphicsPath graphicsPath)
    {
        this._graphicsFill.FillPath(linearGradientBrush, strokePathColor, graphicsPath);

        if((int)width == 1)
          this._graphicsFill.FillPath(linearGradientBrush, strokePathColor, graphicsPath);
        else this._graphicsFill.FillPath(linearGradientBrush, graphicsPath);

        if(strokePathColor == null)return;
        SetColor(strokePathColor.Value.color);
    }
示例#19
0
 public void FillPath(SVGLinearGradientBrush linearGradientBrush, SVGGraphicsPath graphicsPath)
 {
     ResetSubBuffer();
     graphicsPath.RenderPath(this, true);
     EndSubBuffer(linearGradientBrush);
 }