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
80e1ae99
Commit
80e1ae99
authored
Nov 17, 2013
by
Birgir Kristmannsson
Browse files
Forked and commited as per the request in
https://github.com/vvvv/SVG/issues/23#issuecomment-25747963
parent
7fb9941a
Changes
21
Show whitespace changes
Inline
Side-by-side
Source/Basic Shapes/SvgCircle.cs
View file @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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 @
80e1ae99
...
@@ -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