Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
b2f12f81
Commit
b2f12f81
authored
10 years ago
by
Ritch Melton
Browse files
Options
Download
Email Patches
Plain Diff
Precondition test simplification
parent
1bc4c0f3
master
netstandard2
nuget2.4.2
nuget2.4.1
nuget2.4
nuget2.3
nuget2.2.2
nuget2.2.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/Text/SvgTextBase.cs
+2
-2
Source/Text/SvgTextBase.cs
with
2 additions
and
2 deletions
+2
-2
Source/Text/SvgTextBase.cs
+
2
-
2
View file @
b2f12f81
...
@@ -333,11 +333,11 @@ namespace Svg
...
@@ -333,11 +333,11 @@ namespace Svg
/// Gets the <see cref="GraphicsPath"/> for this element.
/// Gets the <see cref="GraphicsPath"/> for this element.
/// </summary>
/// </summary>
/// <value></value>
/// <value></value>
public
override
System
.
Drawing
.
Drawing2D
.
GraphicsPath
Path
(
SvgRenderer
renderer
)
public
override
GraphicsPath
Path
(
SvgRenderer
renderer
)
{
{
// Make sure the path is always null if there is no text
// Make sure the path is always null if there is no text
//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!)
if
((
string
.
IsNullOrEmpty
(
this
.
Text
)
||
this
.
Text
.
Trim
().
Length
<
1
)
&&
this
.
Children
.
Where
(
x
=>
x
is
SvgTextSpan
).
Select
(
x
=>
x
a
s
SvgTextSpan
)
.
Count
()
==
0
)
if
((
string
.
IsNullOrEmpty
(
Text
.
Trim
()))
&&
!
Children
.
Any
(
x
=>
x
i
s
SvgTextSpan
))
return
_path
=
null
;
return
_path
=
null
;
//NOT SURE WHAT THIS IS ABOUT - Path gets created again anyway - WTF?
//NOT SURE WHAT THIS IS ABOUT - Path gets created again anyway - WTF?
// When an empty string is passed to GraphicsPath, it rises an InvalidArgumentException...
// When an empty string is passed to GraphicsPath, it rises an InvalidArgumentException...
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help