Skip to content
GitLab
Menu
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
"Tests/vscode:/vscode.git/clone" did not exist on "7894ea9e54ae2783ff8759da2b0cce5440c4bf9d"
Commit
b2f12f81
authored
Sep 15, 2014
by
Ritch Melton
Browse files
Precondition test simplification
parent
1bc4c0f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Source/Text/SvgTextBase.cs
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...
...
...
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