Пример #1
0
    //stroke-linecap
    //stroke-linejoin
    //stroke-dasharray

    public SVGStroke(Dictionary <string, string> _attrList)
    {
        _color = new SVGColor(_attrList["stroke"]);

        if (_attrList.ContainsKey("stroke-width"))
        {
            float.TryParse(_attrList["stroke-width"], out _width);
        }
        if (_attrList.ContainsKey("stroke-opacity"))
        {
            float.TryParse(_attrList["stroke-opacity"], out _opacity);
        }
        if (_attrList.ContainsKey("stroke-linecap"))
        {
            Debug.LogWarning("stroke-linecap not implemented");
        }
        if (_attrList.ContainsKey("stroke-linejoin"))
        {
            Debug.LogWarning("stroke-linejoin not implemented");
        }
        if (_attrList.ContainsKey("stroke-dasharray"))
        {
            Debug.LogWarning("stroke-dasharray not implemented");
        }
    }
Пример #2
0
 //-----
 public void Circle(Vector2 p, float r, SVGColor? strokeColor)
 {
     if(strokeColor != null) {
       SetColor(strokeColor.Value.color);
     }
     Circle(p, r);
 }
Пример #3
0
 protected Color GetColor(SVGColor svgColor)
 {
     if (svgColor.color.a != 1)
     {
         _alphaBlended = true;
     }
     return(svgColor.color);
 }
Пример #4
0
 //-----
 public void RoundedRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p5, Vector2 p6, Vector2 p7, Vector2 p8, float r1, float r2,
                         float angle, SVGColor fillColor, SVGColor?strokeColor)
 {
     SetColor(fillColor.color);
     PreRoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2,
                    angle);
     EndSubBuffer(strokeColor);
 }
Пример #5
0
 public void FillRoundedRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4,
                             Vector2 p5, Vector2 p6, Vector2 p7, Vector2 p8,
                             float r1, float r2, float angle,
                             SVGColor fillColor, SVGColor?strokeColor)
 {
     graphicsFill.RoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2, angle,
                              fillColor, strokeColor);
 }
 protected Color GetColor(SVGColor svgColor)
 {
     if(svgColor.color.a != 1)
     {
         _alphaBlended = true;
     }
     return svgColor.color;
 }
Пример #7
0
 public SVGStopElement(Dictionary<string, string> attrList)
 {
     _stopColor = new SVGColor(attrList.GetValue("stop-color"));
     string temp = attrList.GetValue("offset").Trim();
     if(temp != "") {
       if(temp.EndsWith("%"))
     _offset = float.Parse(temp.TrimEnd(new[] { '%' }), System.Globalization.CultureInfo.InvariantCulture);
       else
     _offset = float.Parse(temp, System.Globalization.CultureInfo.InvariantCulture) * 100;
     }
 }
Пример #8
0
 /***************************************************************************/
 public SVGStopElement(AttributeList attrList)
 {
     _stopColor = new SVGColor(attrList.GetValue("stop-color"));
     string temp = attrList.GetValue("offset").Trim();
     if(temp != "") {
       if(temp.EndsWith("%")) {
     _offset = float.Parse(temp.TrimEnd(new char[1] { '%' }), System.Globalization.CultureInfo.InvariantCulture);
       } else {
     _offset = float.Parse(temp, System.Globalization.CultureInfo.InvariantCulture)* 100;
       }
     }
 }
Пример #9
0
 /***************************************************************************/
 public SVGStopElement(AttributeList attrList)
 {
     _stopColor = new SVGColor(attrList.GetValue("stop-color"));
     string temp = attrList.GetValue("offset").Trim();
     if(temp != "") {
       if(temp.EndsWith("%")) {
     _offset = SVGNumber.ParseToFloat(temp.TrimEnd(new char[1]{'%'}));
       } else {
     _offset = SVGNumber.ParseToFloat(temp)* 100;
       }
     }
 }
Пример #10
0
 public void FillPath(SVGColor fillColor, SVGColor?strokePathColor, SVGGraphicsPath graphicsPath)
 {
     ResetSubBuffer();
     graphicsPath.RenderPath(this, true);
     if (strokePathColor != null)
     {
         EndSubBuffer(strokePathColor);
     }
     else
     {
         EndSubBuffer();
     }
 }
Пример #11
0
 public void FillEllipse(Vector2 p, float rx, float ry, float angle,
                         SVGColor fillColor, SVGColor?strokeColor, float width)
 {
     if ((int)width == 1)
     {
         FillEllipse(p, rx, ry, angle, strokeColor);
         return;
     }
     SetColor(fillColor.color);
     FillEllipse(p, rx, ry, angle);
     if (strokeColor == null)
     {
         return;
     }
     SetColor(strokeColor.Value.color);
     Ellipse(p, rx, ry, angle, width);
 }
Пример #12
0
 public void FillCircle(Vector2 p, float r,
                        SVGColor fillColor, SVGColor?strokeColor, float width)
 {
     if ((int)width == 1)
     {
         FillCircle(p, r, strokeColor);
         return;
     }
     SetColor(fillColor.color);
     FillCircle(p, r);
     if (strokeColor == null)
     {
         return;
     }
     SetColor(strokeColor.Value.color);
     Circle(p, r, strokeColor, width);
 }
Пример #13
0
 public void FillRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4,
                      SVGColor fillColor, SVGColor?strokeColor, float width)
 {
     if ((int)width == 1)
     {
         FillRect(p1, p2, p3, p4, fillColor, strokeColor);
         return;
     }
     SetColor(fillColor.color);
     FillRect(p1, p2, p3, p4);
     if (strokeColor == null)
     {
         return;
     }
     SetColor(strokeColor.Value.color);
     Rect(p1, p2, p3, p4, strokeColor, width);
 }
Пример #14
0
    public SVGStopElement(Dictionary <string, string> attrList)
    {
        _stopColor = new SVGColor(attrList.GetValue("stop-color"));
        string temp = attrList.GetValue("offset").Trim();

        if (temp != "")
        {
            if (temp.EndsWith("%"))
            {
                _offset = float.Parse(temp.TrimEnd(new[] { '%' }), System.Globalization.CultureInfo.InvariantCulture);
            }
            else
            {
                _offset = float.Parse(temp, System.Globalization.CultureInfo.InvariantCulture) * 100;
            }
        }
    }
Пример #15
0
 public void FillPolygon(Vector2[] points,
                         SVGColor fillColor, SVGColor?strokeColor, float width)
 {
     if ((int)width == 1)
     {
         FillPolygon(points, strokeColor);
         return;
     }
     SetColor(fillColor.color);
     FillPolygon(points);
     if (strokeColor == null)
     {
         return;
     }
     SetColor(strokeColor.Value.color);
     Polygon(points, width);
 }
Пример #16
0
 public void FillRoundedRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4,
                             Vector2 p5, Vector2 p6, Vector2 p7, Vector2 p8,
                             float r1, float r2, float angle,
                             SVGColor fillColor, SVGColor?strokeColor, float width)
 {
     if ((int)width == 1)
     {
         FillRoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2, angle, strokeColor);
         return;
     }
     SetColor(fillColor.color);
     graphicsFill.RoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2, angle);
     if (strokeColor == null)
     {
         return;
     }
     SetColor(strokeColor.Value.color);
     RoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2, angle, strokeColor);
 }
Пример #17
0
    //Fill khong co Stroke, va ve stroke sau
    public void FillPath(SVGColor fillColor, SVGColor?strokePathColor,
                         float width,
                         SVGGraphicsPath graphicsPath)
    {
        graphicsFill.FillPath(fillColor, strokePathColor, graphicsPath);
        if ((int)width == 1)
        {
            graphicsFill.FillPath(fillColor, strokePathColor, graphicsPath);
        }
        else
        {
            graphicsFill.FillPath(fillColor, graphicsPath);
        }

        if (strokePathColor == null)
        {
            return;
        }
        SetColor(strokePathColor.Value.color);
    }
    private Texture2D DrawSVG(uint texWidth, uint texHeight, SVGColor clearColor, bool fastUpload)
    {
        SVGSurface surface;
        Texture2D  texture = null;

        // create a drawing surface, with the same texture dimensions
        surface = SVGAssets.CreateSurface(texWidth, texHeight);
        if (surface == null)
        {
            return(null);
        }
        // draw the SVG document onto the surface
        if (surface.Draw(this.m_SvgDoc, clearColor, SVGRenderingQuality.Better))
        {
            // create a 2D texture compatible with the drawing surface
            texture = surface.CreateCompatibleTexture(true, false);
            if (texture != null)
            {
                texture.hideFlags = HideFlags.HideAndDontSave;
                // copy the surface content into the texture
                if (fastUpload && Application.isPlaying)
                {
                    surface.CopyAndDestroy(texture);
                }
                else
                {
                    if (surface.Copy(texture))
                    {
                        // call Apply() so it's actually uploaded to the GPU
                        texture.Apply(false, true);
                    }
                }
            }
        }
        // destroy SVG surface and document
        surface.Dispose();
        // return the created texture
        return(texture);
    }
Пример #19
0
 //-----
 public void FillPolygon(Vector2[] points,
         SVGColor fillColor, SVGColor? strokeColor, float width)
 {
     if((int)width == 1) {
       FillPolygon(points, strokeColor);
       return;
     }
     SetColor(fillColor.color);
     FillPolygon(points);
     if(strokeColor == null)return;
     SetColor(strokeColor.Value.color);
     Polygon(points, width);
 }
Пример #20
0
 //-----
 public void FillRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4,
                   SVGColor fillColor, SVGColor? strokeColor, float width)
 {
     if((int)width == 1) {
       FillRect(p1, p2, p3, p4, fillColor, strokeColor);
       return;
     }
     SetColor(fillColor.color);
     FillRect(p1, p2, p3, p4);
     if(strokeColor == null)return;
     SetColor(strokeColor.Value.color);
     Rect(p1, p2, p3, p4, strokeColor, width);
 }
Пример #21
0
    //-----
    //Fill khong co Stroke, va ve stroke sau
    public void FillPath(SVGRadialGradientBrush radialGradientBrush,
                              SVGColor? strokePathColor,
                              float width,
                              SVGGraphicsPath graphicsPath)
    {
        this._graphicsFill.FillPath(radialGradientBrush, strokePathColor, graphicsPath);
        if((int)width == 1)
          this._graphicsFill.FillPath(radialGradientBrush, strokePathColor, graphicsPath);
        else this._graphicsFill.FillPath(radialGradientBrush, graphicsPath);

        if(strokePathColor == null)return;
        SetColor(strokePathColor.Value.color);
        //graphicsPath.RenderPath(this, width, false);
    }
Пример #22
0
    //-----
    //Fill khong co Stroke, va ve stroke sau
    public void FillPath(SVGColor fillColor, SVGColor? strokePathColor,
                              float width,
                              SVGGraphicsPath graphicsPath)
    {
        this._graphicsFill.FillPath(fillColor, strokePathColor, graphicsPath);
        if((int)width == 1)this._graphicsFill.FillPath(fillColor, strokePathColor, graphicsPath);
        else this._graphicsFill.FillPath(fillColor, graphicsPath);

        if(strokePathColor == null)return;
        SetColor(strokePathColor.Value.color);
    }
Пример #23
0
 //-----
 public void FillEllipse(Vector2 p, float rx, float ry, float angle,
             SVGColor fillColor, SVGColor? strokeColor)
 {
     this._graphicsFill.Ellipse(p, rx, ry, angle, fillColor, strokeColor);
 }
Пример #24
0
 //-----
 //Fill co Stroke trong do luon
 public void FillPath(SVGLinearGradientBrush linearGradientBrush,
                           SVGColor? strokePathColor,
                           SVGGraphicsPath graphicsPath)
 {
     this._graphicsFill.FillPath(linearGradientBrush, strokePathColor, graphicsPath);
 }
Пример #25
0
 public void FillEllipse(Vector2 p, float rx, float ry, float angle,
                         SVGColor fillColor, SVGColor?strokeColor)
 {
     graphicsFill.Ellipse(p, rx, ry, angle, fillColor, strokeColor);
 }
Пример #26
0
 public void FillPolygon(Vector2[] points, SVGColor fillColor, SVGColor?strokeColor)
 {
     graphicsFill.Polygon(points, fillColor, strokeColor);
 }
Пример #27
0
 public void Polygon(Vector2[] points, SVGColor fillColor, SVGColor?strokeColor)
 {
     SetColor(fillColor.color);
     PrePolygon(points);
     EndSubBuffer(strokeColor);
 }
Пример #28
0
 public void FillPath(SVGColor fillColor, SVGGraphicsPath graphicsPath)
 {
     SetColor(fillColor.color);
     FillPath(graphicsPath);
 }
Пример #29
0
 public void Ellipse(Vector2 p, float rx, float ry, float angle, SVGColor fillColor, SVGColor?strokeColor)
 {
     SetColor(fillColor.color);
     PreEllipse(p, rx, ry, angle);
     EndSubBuffer(strokeColor);
 }
Пример #30
0
 public void Circle(Vector2 p, float r, SVGColor fillColor, SVGColor?strokeColor)
 {
     SetColor(fillColor.color);
     PreCircle(p, r);
     EndSubBuffer();
 }
Пример #31
0
 public void Rect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, SVGColor fillColor, SVGColor?strokeColor)
 {
     SetColor(fillColor.color);
     PreRect(p1, p2, p3, p4);
     EndSubBuffer(strokeColor);
 }
Пример #32
0
 //-----
 public void FillRoundedRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4,
     Vector2 p5, Vector2 p6, Vector2 p7, Vector2 p8,
     float r1, float r2, float angle,
     SVGColor fillColor, SVGColor? strokeColor, float width)
 {
     if((int)width == 1) {
       FillRoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2, angle, strokeColor);
       return;
     }
     SetColor(fillColor.color);
     this._graphicsFill.RoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2, angle);
     if(strokeColor == null)return;
     SetColor(strokeColor.Value.color);
     RoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2, angle, strokeColor);
 }
Пример #33
0
 public void FillCircle(Vector2 p, float r, SVGColor fillColor, SVGColor?strokeColor)
 {
     graphicsFill.Circle(p, r, fillColor, strokeColor);
 }
Пример #34
0
 //-----
 public void Polygon(Vector2[] points, SVGColor? strokeColor, float width)
 {
     if(strokeColor != null) {
       SetColor(strokeColor.Value.color);
     }
     Polygon(points, width);
 }
Пример #35
0
 public void Rect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, SVGColor fillColor, SVGColor? strokeColor)
 {
     SetColor(fillColor.color);
     PreRect(p1, p2, p3, p4);
     EndSubBuffer(strokeColor);
 }
Пример #36
0
 //-----
 public void FillCircle(Vector2 p, float r,
           SVGColor fillColor, SVGColor? strokeColor, float width)
 {
     if((int)width == 1) {
       FillCircle(p, r, strokeColor);
       return;
     }
     SetColor(fillColor.color);
     FillCircle(p, r);
     if(strokeColor == null)return;
     SetColor(strokeColor.Value.color);
     Circle(p, r, strokeColor, width);
 }
Пример #37
0
 //-----
 public void Rect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4,
                          SVGColor? strokeColor, float width)
 {
     if(strokeColor != null) {
       SetColor(strokeColor.Value.color);
     }
     Rect(p1, p2, p3, p4, width);
 }
Пример #38
0
 //-----
 public void FillEllipse(Vector2 p, float rx, float ry, float angle,
             SVGColor fillColor, SVGColor? strokeColor, float width)
 {
     if((int)width == 1) {
       FillEllipse(p, rx, ry, angle, strokeColor);
       return;
     }
     SetColor(fillColor.color);
     FillEllipse(p, rx, ry, angle);
     if(strokeColor == null)return;
     SetColor(strokeColor.Value.color);
     Ellipse(p, rx, ry, angle, width);
 }
Пример #39
0
 public void FillRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4,
                      SVGColor fillColor, SVGColor?strokeColor)
 {
     graphicsFill.Rect(p1, p2, p3, p4, fillColor, strokeColor);
 }
Пример #40
0
 //-----
 //Fill co Stroke trong do luon
 public void FillPath(SVGRadialGradientBrush radialGradientBrush,
                           SVGColor? strokePathColor,
                           SVGGraphicsPath graphicsPath)
 {
     this._graphicsFill.FillPath(radialGradientBrush, strokePathColor, graphicsPath);
 }
Пример #41
0
        public SVGStopElement(AttributeList attrList)
        {
            string colorString  = attrList.GetValue("stop-color");
            string offsetString = attrList.GetValue("offset");
            string stopOpacity  = attrList.GetValue("stop-opacity");

            string styleValue = attrList.GetValue("style");

            if (styleValue != null)
            {
                string[] styleValues = styleValue.Split(';');
                for (int i = 0; i < styleValues.Length; i++)
                {
                    if (styleValues[i].Contains("stop-color"))
                    {
                        colorString = styleValues[i].Split(':')[1];
                    }
                    else if (styleValues[i].Contains("stop-opacity"))
                    {
                        stopOpacity = styleValues[i].Split(':')[1];
                    }
                    else if (styleValues[i].Contains("offset"))
                    {
                        offsetString = styleValues[i].Split(':')[1];
                    }
                }
            }

            if (colorString == null)
            {
                colorString = "black";
            }

            if (offsetString == null)
            {
                offsetString = "0%";
            }

            _stopColor = new SVGColor(colorString);

            if (!string.IsNullOrEmpty(stopOpacity))
            {
                if (stopOpacity.EndsWith("%"))
                {
                    _stopColor.color.a = float.Parse(stopOpacity.TrimEnd(new char[1] {
                        '%'
                    }), System.Globalization.CultureInfo.InvariantCulture) * 0.01f;
                }
                else
                {
                    _stopColor.color.a = float.Parse(stopOpacity, System.Globalization.CultureInfo.InvariantCulture);
                }
            }

            string temp = offsetString.Trim();

            if (temp != "")
            {
                if (temp.EndsWith("%"))
                {
                    _offset = float.Parse(temp.TrimEnd(new char[1] {
                        '%'
                    }), System.Globalization.CultureInfo.InvariantCulture);
                }
                else
                {
                    _offset = float.Parse(temp, System.Globalization.CultureInfo.InvariantCulture) * 100;
                }
            }

//            Debug.Log("StopColor: "+_stopColor.color+", offset: "+_offset);
        }
Пример #42
0
 //-----
 //Fill co Stroke trong do luon
 public void FillPath(SVGColor fillColor, SVGColor? strokePathColor,
                           SVGGraphicsPath graphicsPath)
 {
     this._graphicsFill.FillPath(fillColor, strokePathColor, graphicsPath);
 }
Пример #43
0
        protected SVGElement(Dictionary <string, string> _attrList)
        {
            attrList = _attrList;

            stroke = null;

            fillColor      = null;
            strokeColor    = null;
            fillOpacity    = 1.0f;
            strokeOpacity  = 1.0f;
            strokeWidth    = 0;
            hasFill        = true;
            hasStroke      = false;
            visible        = true;
            element_number = SVGGenerals.getElementId();
            if (attrList.ContainsKey("id"))
            {
                name = attrList["id"];
            }
            else
            {
                name = this.ToString() + "-" + element_number;
            }


            foreach (KeyValuePair <string, string> attr in attrList)
            {
                switch (attr.Key)
                {
                case "transform":
                    transformlist = new SVGTransformList();
                    transformlist.ParseAttributes(attr.Value);
                    break;

                case "fill":
                    if (String.Compare(attr.Value, "none") == 0)
                    {
                        hasFill = false;
                    }
                    else if (String.Compare(attr.Value, "transparent") == 0)
                    {
                        hasFill = false;
                    }
                    else
                    {
                        hasFill   = true;
                        fillColor = new SVGColor(attr.Value);
                    }
                    break;

                case "opacity":
                    fillOpacity   = StringParser.StringAttrFloat(attr.Value);
                    strokeOpacity = fillOpacity;
                    break;

                case "fill-opacity":
                    fillOpacity = StringParser.StringAttrFloat(attr.Value);
                    break;

                case "stroke":
                    if (String.Compare(attr.Value, "none") == 0)
                    {
                        hasStroke = false;
                    }
                    else
                    {
                        hasStroke   = true;
                        strokeColor = new SVGColor(attr.Value);
                    }
                    break;

                case "stroke-width":
                    strokeWidth = StringParser.StringAttrFloat(attr.Value);
                    break;

                case "stroke-opacity":
                    strokeOpacity = StringParser.StringAttrFloat(attr.Value);
                    break;

                case "display":
                    if (String.Compare(attr.Value, "none") == 0)
                    {
                        visible = false;
                    }
                    else
                    {
                        visible = true;
                    }
                    break;

                case "style":
                    //ParseStyle(value);
                    Debug.Log("Attributo style no implementado aun:" + attr.Value);
                    break;

                default:
                    //Debug.Log("Attributo no implementado: " + attr.Key);
                    break;
                }
            }

            if (hasStroke)
            {
                stroke = new SVGStroke(strokeColor, strokeWidth, strokeOpacity);
            }
        }
Пример #44
0
 //-----
 public void FillPolygon(Vector2[] points, SVGColor fillColor, SVGColor? strokeColor)
 {
     this._graphicsFill.Polygon(points, fillColor, strokeColor);
 }
Пример #45
0
 public SVGStroke(SVGColor color, float width, float opacity)
 {
     _color   = color;
     _width   = width;
     _opacity = opacity;
 }
Пример #46
0
 //-----
 public void FillRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4,
                       SVGColor fillColor, SVGColor? strokeColor)
 {
     this._graphicsFill.Rect(p1, p2, p3, p4, fillColor, strokeColor);
 }
Пример #47
0
 //-----
 //Fill khong co Stroke, va ve stroke sau
 public void DrawPath(SVGGraphicsPath graphicsPath, float width, SVGColor? strokePathColor)
 {
     if(strokePathColor == null)return;
     SetColor(strokePathColor.Value.color);
     this._graphicsStroke.DrawPath(graphicsPath, width);
 }
Пример #48
0
 //-----
 public void FillRoundedRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4,
     Vector2 p5, Vector2 p6, Vector2 p7, Vector2 p8,
     float r1, float r2, float angle,
     SVGColor fillColor, SVGColor? strokeColor)
 {
     this._graphicsFill.RoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2, angle,
                                   fillColor, strokeColor);
 }
Пример #49
0
 //-----
 public void Ellipse(Vector2 p, float rx, float ry, float angle,
                         SVGColor? strokeColor, float width)
 {
     if(strokeColor != null) {
       SetColor(strokeColor.Value.color);
     }
     Ellipse(p, rx, ry, angle, width);
 }
Пример #50
0
 //-----
 public void Line(Vector2 p1, Vector2 p2, SVGColor? strokeColor, float width)
 {
     if(strokeColor != null) {
       SetColor(strokeColor.Value.color);
     }
     Line(p1, p2, width);
 }
Пример #51
0
 //-----
 public void FillCircle(Vector2 p, float r, SVGColor fillColor, SVGColor? strokeColor)
 {
     this._graphicsFill.Circle(p, r, fillColor, strokeColor);
 }
Пример #52
0
 public void Circle(Vector2 p, float r, SVGColor? strokeColor)
 {
     PreCircle(p, r);
     EndSubBuffer(strokeColor);
 }
Пример #53
0
 //Fill co Stroke trong do luon
 public void FillPath(SVGColor fillColor, SVGColor?strokePathColor,
                      SVGGraphicsPath graphicsPath)
 {
     graphicsFill.FillPath(fillColor, strokePathColor, graphicsPath);
 }
Пример #54
0
 //-----
 public void RoundedRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4,
   Vector2 p5, Vector2 p6, Vector2 p7, Vector2 p8,
   float r1, float r2, float angle, SVGColor? strokeColor, float width)
 {
     if(strokeColor != null) {
       SetColor(strokeColor.Value.color);
     }
     RoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2, angle, width);
 }
Пример #55
0
 public void Circle(Vector2 p, float r, SVGColor fillColor, SVGColor? strokeColor)
 {
     SetColor(fillColor.color);
     PreCircle(p, r);
     EndSubBuffer();
 }
Пример #56
0
 public void RoundedRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p5, Vector2 p6, Vector2 p7, Vector2 p8,
                       float r1, float r2,
                       float angle, SVGColor fillColor, SVGColor? strokeColor)
 {
     SetColor(fillColor.color);
     PreRoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2,
                angle);
     EndSubBuffer(strokeColor);
 }
Пример #57
0
 //Fill khong to Stroke
 public void FillPath(SVGColor fillColor, SVGGraphicsPath graphicsPath)
 {
     _graphicsFill.FillPath(fillColor, graphicsPath);
 }