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
bd93be68
Commit
bd93be68
authored
Mar 24, 2014
by
Bigous
Browse files
BugFix: When an Text element was empty, with no text inside, an InvalidArgumentException rised.
parent
cecce654
Changes
6
Show whitespace changes
Inline
Side-by-side
Source/Basic Shapes/SvgVisualElement.cs
View file @
bd93be68
...
...
@@ -91,7 +91,7 @@ namespace Svg
/// <summary>
/// Renders the <see cref="SvgElement"/> and contents to the specified <see cref="Graphics"/> object.
/// </summary>
/// <param name="
graphics
">The <see cref="SvgRenderer"/> object to render to.</param>
/// <param name="
renderer
">The <see cref="SvgRenderer"/> object to render to.</param>
protected
override
void
Render
(
SvgRenderer
renderer
)
{
if
(
this
.
Path
!=
null
&&
this
.
Visible
)
...
...
Source/Clipping and Masking/SvgClipPath.cs
View file @
bd93be68
...
...
@@ -98,7 +98,7 @@ namespace Svg
/// <summary>
/// Called by the underlying <see cref="SvgElement"/> when an element has been removed from the
/// <see cref="Children"/> collection.
/// <see cref="
SvgElement.
Children"/> collection.
/// </summary>
/// <param name="child">The <see cref="SvgElement"/> that has been removed.</param>
protected
override
void
RemoveElement
(
SvgElement
child
)
...
...
Source/Painting/SvgGradientServer.cs
View file @
bd93be68
...
...
@@ -100,7 +100,7 @@ namespace Svg
}
/// <summary>
/// Gets a <see cref="Colo
u
rBlend"/> representing the <see cref="SvgGradientServer"/>'s gradient stops.
/// Gets a <see cref="ColorBlend"/> representing the <see cref="SvgGradientServer"/>'s gradient stops.
/// </summary>
/// <param name="owner">The parent <see cref="SvgVisualElement"/>.</param>
/// <param name="opacity">The opacity of the colour blend.</param>
...
...
Source/Painting/SvgPatternServer.cs
View file @
bd93be68
...
...
@@ -105,7 +105,7 @@ namespace Svg
/// <summary>
/// Gets a <see cref="Brush"/> representing the current paint server.
/// </summary>
/// <param name="
styleOwner
">The owner <see cref="SvgVisualElement"/>.</param>
/// <param name="
renderingElement
">The owner <see cref="SvgVisualElement"/>.</param>
/// <param name="opacity">The opacity of the brush.</param>
public
override
Brush
GetBrush
(
SvgVisualElement
renderingElement
,
float
opacity
)
{
...
...
Source/SvgElementIdManager.cs
View file @
bd93be68
...
...
@@ -97,6 +97,7 @@ namespace Svg
/// Ensures that the specified ID is valid within the containing <see cref="SvgDocument"/>.
/// </summary>
/// <param name="id">A <see cref="string"/> containing the ID to validate.</param>
/// <param name="autoForceUniqueID">Creates a new unique id <see cref="string"/>.</param>
/// <exception cref="SvgException">
/// <para>The ID cannot start with a digit.</para>
/// <para>An element with the same ID already exists within the containing <see cref="SvgDocument"/>.</para>
...
...
Source/Text/SvgText.cs
View file @
bd93be68
...
...
@@ -270,9 +270,10 @@ namespace Svg
get
{
// Make sure the path is always null if there is no text
//
if (string.IsNullOr
Empty
(this.Text))
//
_path = null;
if
(
string
.
IsNullOr
WhiteSpace
(
this
.
Text
))
return
_path
=
null
;
//NOT SURE WHAT THIS IS ABOUT - Path gets created again anyway - WTF?
// When an empty string is passed to GraphicsPath, it rises an InvalidArgumentException...
if
(
_path
==
null
||
this
.
IsPathDirty
)
{
...
...
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