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