Commit 909fc1f8 authored by Ritch Melton's avatar Ritch Melton
Browse files

minor flog

parent 0d6779d5
...@@ -296,10 +296,10 @@ namespace Svg ...@@ -296,10 +296,10 @@ namespace Svg
public override GraphicsPath Path(ISvgRenderer renderer) 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!) //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) var nodes = GetContentNodes().Where(x => x is SvgContentNode &&
.Select(n => !string.IsNullOrEmpty(n.Content.Trim(new[] {'\r', '\n', '\t'}))); string.IsNullOrEmpty(x.Content.Trim(new[] {'\r', '\n', '\t'})));
if (_path == null || IsPathDirty || nodes.Any()) if (_path == null || IsPathDirty || nodes.Count() == 1)
{ {
renderer = (renderer ?? SvgRenderer.FromNull()); renderer = (renderer ?? SvgRenderer.FromNull());
SetPath(new TextDrawingState(renderer, this)); SetPath(new TextDrawingState(renderer, this));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment