Svg.SvgTextBase.Path C# (CSharp) Method

Path() public method

Gets the GraphicsPath for this element.
public Path ( ISvgRenderer renderer ) : GraphicsPath
renderer ISvgRenderer
return System.Drawing.Drawing2D.GraphicsPath
        public override GraphicsPath Path(ISvgRenderer renderer)
        {
            //if there is a TSpan inside of this text element then path should not be null (even if this text is empty!)
            var nodes = GetContentNodes().Where(x => x is SvgContentNode &&
                                                     string.IsNullOrEmpty(x.Content.Trim(new[] { '\r', '\n', '\t' })));

            if (_path == null || IsPathDirty || nodes.Count() == 1)
            {
                renderer = (renderer ?? SvgRenderer.FromNull());
                SetPath(new TextDrawingState(renderer, this));
            }
            return _path;
        }