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
a2c56086
Commit
a2c56086
authored
Nov 18, 2013
by
Tebjan Halm
Browse files
Merge pull request #32 from biggik/master
CLS complience
parents
7fb9941a
80e1ae99
Changes
21
Show whitespace changes
Inline
Side-by-side
Source/Basic Shapes/SvgCircle.cs
View file @
a2c56086
...
@@ -96,6 +96,10 @@ namespace Svg
...
@@ -96,6 +96,10 @@ namespace Svg
}
}
return
_path
;
return
_path
;
}
}
protected
set
{
_path
=
value
;
}
}
}
/// <summary>
/// <summary>
...
...
Source/Basic Shapes/SvgEllipse.cs
View file @
a2c56086
...
@@ -95,6 +95,10 @@ namespace Svg
...
@@ -95,6 +95,10 @@ namespace Svg
}
}
return
_path
;
return
_path
;
}
}
protected
set
{
_path
=
value
;
}
}
}
/// <summary>
/// <summary>
...
...
Source/Basic Shapes/SvgImage.cs
View file @
a2c56086
...
@@ -84,6 +84,9 @@ namespace Svg
...
@@ -84,6 +84,9 @@ namespace Svg
{
{
return
null
;
return
null
;
}
}
protected
set
{
}
}
}
/// <summary>
/// <summary>
...
...
Source/Basic Shapes/SvgLine.cs
View file @
a2c56086
...
@@ -75,6 +75,10 @@ namespace Svg
...
@@ -75,6 +75,10 @@ namespace Svg
}
}
return
this
.
_path
;
return
this
.
_path
;
}
}
protected
set
{
_path
=
value
;
}
}
}
public
override
System
.
Drawing
.
RectangleF
Bounds
public
override
System
.
Drawing
.
RectangleF
Bounds
...
...
Source/Basic Shapes/SvgPolygon.cs
View file @
a2c56086
...
@@ -14,8 +14,8 @@ namespace Svg
...
@@ -14,8 +14,8 @@ namespace Svg
[
SvgElement
(
"polygon"
)]
[
SvgElement
(
"polygon"
)]
public
class
SvgPolygon
:
SvgVisualElement
public
class
SvgPolygon
:
SvgVisualElement
{
{
pr
otec
te
d
GraphicsPath
_path
;
pr
iva
te
GraphicsPath
_path
;
pr
otec
te
d
SvgUnitCollection
_points
;
pr
iva
te
SvgUnitCollection
_points
;
/// <summary>
/// <summary>
/// The points that make up the SvgPolygon
/// The points that make up the SvgPolygon
...
@@ -68,6 +68,10 @@ namespace Svg
...
@@ -68,6 +68,10 @@ namespace Svg
}
}
return
this
.
_path
;
return
this
.
_path
;
}
}
protected
set
{
_path
=
value
;
}
}
}
public
override
RectangleF
Bounds
public
override
RectangleF
Bounds
...
...
Source/Basic Shapes/SvgPolyline.cs
View file @
a2c56086
...
@@ -17,24 +17,24 @@ namespace Svg
...
@@ -17,24 +17,24 @@ namespace Svg
{
{
get
get
{
{
if
(
this
.
_p
ath
==
null
||
this
.
IsPathDirty
)
if
(
P
ath
==
null
||
this
.
IsPathDirty
)
{
{
this
.
_p
ath
=
new
GraphicsPath
();
P
ath
=
new
GraphicsPath
();
try
try
{
{
for
(
int
i
=
0
;
i
<
this
.
_p
oints
.
Count
;
i
+=
2
)
for
(
int
i
=
0
;
i
<
P
oints
.
Count
;
i
+=
2
)
{
{
PointF
endPoint
=
new
PointF
(
this
.
_p
oints
[
i
].
ToDeviceValue
(
this
),
this
.
_p
oints
[
i
+
1
].
ToDeviceValue
(
this
));
PointF
endPoint
=
new
PointF
(
P
oints
[
i
].
ToDeviceValue
(
this
),
P
oints
[
i
+
1
].
ToDeviceValue
(
this
));
// TODO: Remove unrequired first line
// TODO: Remove unrequired first line
if
(
_p
ath
.
PointCount
==
0
)
if
(
P
ath
.
PointCount
==
0
)
{
{
_p
ath
.
AddLine
(
endPoint
,
endPoint
);
P
ath
.
AddLine
(
endPoint
,
endPoint
);
}
}
else
else
{
{
_p
ath
.
AddLine
(
_p
ath
.
GetLastPoint
(),
endPoint
);
P
ath
.
AddLine
(
P
ath
.
GetLastPoint
(),
endPoint
);
}
}
}
}
}
}
...
@@ -44,7 +44,7 @@ namespace Svg
...
@@ -44,7 +44,7 @@ namespace Svg
}
}
this
.
IsPathDirty
=
false
;
this
.
IsPathDirty
=
false
;
}
}
return
this
.
_p
ath
;
return
P
ath
;
}
}
}
}
}
}
...
...
Source/Basic Shapes/SvgRectangle.cs
View file @
a2c56086
...
@@ -247,6 +247,10 @@ namespace Svg
...
@@ -247,6 +247,10 @@ namespace Svg
}
}
return
_path
;
return
_path
;
}
}
protected
set
{
_path
=
value
;
}
}
}
/// <summary>
/// <summary>
...
...
Source/Basic Shapes/SvgVisualElement.cs
View file @
a2c56086
...
@@ -22,7 +22,7 @@ namespace Svg
...
@@ -22,7 +22,7 @@ namespace Svg
/// <summary>
/// <summary>
/// Gets the <see cref="GraphicsPath"/> for this element.
/// Gets the <see cref="GraphicsPath"/> for this element.
/// </summary>
/// </summary>
public
abstract
GraphicsPath
Path
{
get
;
}
public
abstract
GraphicsPath
Path
{
get
;
protected
set
;
}
/// <summary>
/// <summary>
/// Gets the bounds of the element.
/// Gets the bounds of the element.
/// </summary>
/// </summary>
...
...
Source/DataTypes/SvgFontWeight.cs
View file @
a2c56086
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Text
;
namespace
Svg.DataTypes
namespace
Svg.DataTypes
{
{
...
...
Source/DataTypes/SvgUnit.cs
View file @
a2c56086
...
@@ -100,7 +100,7 @@ namespace Svg
...
@@ -100,7 +100,7 @@ namespace Svg
// http://www.w3.org/TR/SVG11/coords.html#Units
// http://www.w3.org/TR/SVG11/coords.html#Units
const
float
cmInInch
=
2.54f
;
const
float
cmInInch
=
2.54f
;
int
ppi
=
SvgDocument
.
P
PI
;
int
ppi
=
SvgDocument
.
P
ointsPerInch
;
switch
(
this
.
Type
)
switch
(
this
.
Type
)
{
{
...
...
Source/Document Structure/SvgGroup.cs
View file @
a2c56086
...
@@ -27,12 +27,13 @@ namespace Svg
...
@@ -27,12 +27,13 @@ namespace Svg
{
{
get
get
{
{
var
path
=
new
GraphicsPath
();
//var path = new GraphicsPath();
//AddPaths(this, path);
//AddPaths(this, path);
return
GetPaths
(
this
);
return
GetPaths
(
this
);
}
}
protected
set
{
}
}
}
/// <summary>
/// <summary>
...
...
Source/Document Structure/SvgUse.cs
View file @
a2c56086
...
@@ -58,6 +58,8 @@ namespace Svg
...
@@ -58,6 +58,8 @@ namespace Svg
SvgVisualElement
element
=
(
SvgVisualElement
)
this
.
OwnerDocument
.
IdManager
.
GetElementById
(
this
.
ReferencedElement
);
SvgVisualElement
element
=
(
SvgVisualElement
)
this
.
OwnerDocument
.
IdManager
.
GetElementById
(
this
.
ReferencedElement
);
return
(
element
!=
null
)
?
element
.
Path
:
null
;
return
(
element
!=
null
)
?
element
.
Path
:
null
;
}
}
protected
set
{
}
}
}
public
override
System
.
Drawing
.
RectangleF
Bounds
public
override
System
.
Drawing
.
RectangleF
Bounds
...
...
Source/Painting/SvgMarker.cs
View file @
a2c56086
...
@@ -70,6 +70,10 @@ namespace Svg
...
@@ -70,6 +70,10 @@ namespace Svg
return
(
path
as
SvgPath
).
Path
;
return
(
path
as
SvgPath
).
Path
;
return
null
;
return
null
;
}
}
protected
set
{
// No-op
}
}
}
public
override
System
.
Drawing
.
RectangleF
Bounds
public
override
System
.
Drawing
.
RectangleF
Bounds
...
...
Source/Paths/SvgPath.cs
View file @
a2c56086
...
@@ -89,6 +89,10 @@ namespace Svg
...
@@ -89,6 +89,10 @@ namespace Svg
}
}
return
_path
;
return
_path
;
}
}
protected
set
{
_path
=
value
;
}
}
}
internal
void
OnPathUpdated
()
internal
void
OnPathUpdated
()
...
...
Source/Properties/AssemblyInfo.cs
View file @
a2c56086
using
System.Reflection
;
using
System
;
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
using
System.Runtime.CompilerServices
;
using
System.Runtime.InteropServices
;
using
System.Runtime.InteropServices
;
...
@@ -32,4 +33,6 @@ using System.Runtime.InteropServices;
...
@@ -32,4 +33,6 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
// by using the '*' as shown below:
[
assembly
:
AssemblyVersion
(
"1.0.1.*"
)]
[
assembly
:
AssemblyVersion
(
"1.0.1.*"
)]
[
assembly
:
AssemblyFileVersion
(
"1.0.1.*"
)]
//[assembly: AssemblyFileVersion("1.0.1.*")]
[
assembly
:
CLSCompliant
(
true
)]
Source/Svg.csproj
View file @
a2c56086
...
@@ -54,7 +54,9 @@
...
@@ -54,7 +54,9 @@
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
<CodeAnalysisRuleSet>
AllRules.ruleset
</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>
AllRules.ruleset
</CodeAnalysisRuleSet>
<DebugSymbols>
true
</DebugSymbols>
<DebugSymbols>
true
</DebugSymbols>
<DocumentationFile>
..\..\vvvv\public\common\src\thirdparty\Svg.XML
</DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<TreatWarningsAsErrors>
true
</TreatWarningsAsErrors>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<DebugType>
PdbOnly
</DebugType>
<DebugType>
PdbOnly
</DebugType>
...
...
Source/SvgAttributeCollection.cs
View file @
a2c56086
...
@@ -108,7 +108,7 @@ namespace Svg
...
@@ -108,7 +108,7 @@ namespace Svg
/// </summary>
/// </summary>
public
event
EventHandler
<
AttributeEventArgs
>
AttributeChanged
;
public
event
EventHandler
<
AttributeEventArgs
>
AttributeChanged
;
pr
otec
te
d
void
OnAttributeChanged
(
string
attribute
,
object
value
)
pr
iva
te
void
OnAttributeChanged
(
string
attribute
,
object
value
)
{
{
var
handler
=
AttributeChanged
;
var
handler
=
AttributeChanged
;
if
(
handler
!=
null
)
if
(
handler
!=
null
)
...
@@ -164,7 +164,7 @@ namespace Svg
...
@@ -164,7 +164,7 @@ namespace Svg
/// </summary>
/// </summary>
public
event
EventHandler
<
AttributeEventArgs
>
AttributeChanged
;
public
event
EventHandler
<
AttributeEventArgs
>
AttributeChanged
;
pr
otec
te
d
void
OnAttributeChanged
(
string
attribute
,
object
value
)
pr
iva
te
void
OnAttributeChanged
(
string
attribute
,
object
value
)
{
{
var
handler
=
AttributeChanged
;
var
handler
=
AttributeChanged
;
if
(
handler
!=
null
)
if
(
handler
!=
null
)
...
...
Source/SvgDocument.cs
View file @
a2c56086
...
@@ -16,7 +16,7 @@ namespace Svg
...
@@ -16,7 +16,7 @@ namespace Svg
/// </summary>
/// </summary>
public
class
SvgDocument
:
SvgFragment
,
ITypeDescriptorContext
public
class
SvgDocument
:
SvgFragment
,
ITypeDescriptorContext
{
{
public
static
readonly
int
P
PI
=
96
;
public
static
readonly
int
P
ointsPerInch
=
96
;
private
SvgElementIdManager
_idManager
;
private
SvgElementIdManager
_idManager
;
...
...
Source/SvgElement.cs
View file @
a2c56086
...
@@ -31,9 +31,8 @@ namespace Svg
...
@@ -31,9 +31,8 @@ namespace Svg
}
}
//reflection cache
//reflection cache
protected
IEnumerable
<
PropertyAttributeTuple
>
_svgPropertyAttributes
;
private
IEnumerable
<
PropertyAttributeTuple
>
_svgPropertyAttributes
;
protected
IEnumerable
<
EventAttributeTuple
>
_svgEventAttributes
;
private
IEnumerable
<
EventAttributeTuple
>
_svgEventAttributes
;
internal
SvgElement
_parent
;
internal
SvgElement
_parent
;
private
string
_elementName
;
private
string
_elementName
;
...
...
Source/Text/SvgText.cs
View file @
a2c56086
...
@@ -275,6 +275,10 @@ namespace Svg
...
@@ -275,6 +275,10 @@ namespace Svg
}
}
return
_path
;
return
_path
;
}
}
protected
set
{
_path
=
value
;
}
}
}
private
static
string
ValidateFontFamily
(
string
fontFamilyList
)
private
static
string
ValidateFontFamily
(
string
fontFamilyList
)
...
...
Prev
1
2
Next
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