Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
f541d280
Commit
f541d280
authored
11 years ago
by
tebjan
Browse files
Options
Download
Email Patches
Plain Diff
changed attribute collection key strings to reflect the original svg attribute name
parent
d0c450d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Source/Basic Shapes/SvgVisualElementStyle.cs
+24
-24
Source/Basic Shapes/SvgVisualElementStyle.cs
Source/SvgElement.cs
+5
-5
Source/SvgElement.cs
Source/Text/SvgText.cs
+2
-2
Source/Text/SvgText.cs
with
31 additions
and
31 deletions
+31
-31
Source/Basic Shapes/SvgVisualElementStyle.cs
+
24
-
24
View file @
f541d280
...
...
@@ -32,8 +32,8 @@ namespace Svg
[
SvgAttribute
(
"fill"
)]
public
virtual
SvgPaintServer
Fill
{
get
{
return
(
this
.
Attributes
[
"
F
ill"
]
==
null
)
?
SvgColourServer
.
NotSet
:
(
SvgPaintServer
)
this
.
Attributes
[
"
F
ill"
];
}
set
{
this
.
Attributes
[
"
F
ill"
]
=
value
;
}
get
{
return
(
this
.
Attributes
[
"
f
ill"
]
==
null
)
?
SvgColourServer
.
NotSet
:
(
SvgPaintServer
)
this
.
Attributes
[
"
f
ill"
];
}
set
{
this
.
Attributes
[
"
f
ill"
]
=
value
;
}
}
/// <summary>
...
...
@@ -42,15 +42,15 @@ namespace Svg
[
SvgAttribute
(
"stroke"
)]
public
virtual
SvgPaintServer
Stroke
{
get
{
return
(
this
.
Attributes
[
"
S
troke"
]
==
null
)
?
null
:
(
SvgPaintServer
)
this
.
Attributes
[
"
S
troke"
];
}
set
{
this
.
Attributes
[
"
S
troke"
]
=
value
;
}
get
{
return
(
this
.
Attributes
[
"
s
troke"
]
==
null
)
?
null
:
(
SvgPaintServer
)
this
.
Attributes
[
"
s
troke"
];
}
set
{
this
.
Attributes
[
"
s
troke"
]
=
value
;
}
}
[
SvgAttribute
(
"fill-rule"
)]
public
virtual
SvgFillRule
FillRule
{
get
{
return
(
this
.
Attributes
[
"
F
ill
R
ule"
]
==
null
)
?
SvgFillRule
.
NonZero
:
(
SvgFillRule
)
this
.
Attributes
[
"
F
ill
R
ule"
];
}
set
{
this
.
Attributes
[
"
F
ill
R
ule"
]
=
value
;
}
get
{
return
(
this
.
Attributes
[
"
f
ill
-r
ule"
]
==
null
)
?
SvgFillRule
.
NonZero
:
(
SvgFillRule
)
this
.
Attributes
[
"
f
ill
-r
ule"
];
}
set
{
this
.
Attributes
[
"
f
ill
-r
ule"
]
=
value
;
}
}
/// <summary>
...
...
@@ -59,8 +59,8 @@ namespace Svg
[
SvgAttribute
(
"fill-opacity"
)]
public
virtual
float
FillOpacity
{
get
{
return
(
this
.
Attributes
[
"
F
ill
O
pacity"
]
==
null
)
?
this
.
Opacity
:
(
float
)
this
.
Attributes
[
"
F
ill
O
pacity"
];
}
set
{
this
.
Attributes
[
"
F
ill
O
pacity"
]
=
FixOpacityValue
(
value
);
}
get
{
return
(
this
.
Attributes
[
"
f
ill
-o
pacity"
]
==
null
)
?
this
.
Opacity
:
(
float
)
this
.
Attributes
[
"
f
ill
-o
pacity"
];
}
set
{
this
.
Attributes
[
"
f
ill
-o
pacity"
]
=
FixOpacityValue
(
value
);
}
}
/// <summary>
...
...
@@ -69,43 +69,43 @@ namespace Svg
[
SvgAttribute
(
"stroke-width"
)]
public
virtual
SvgUnit
StrokeWidth
{
get
{
return
(
this
.
Attributes
[
"
S
troke
W
idth"
]
==
null
)
?
new
SvgUnit
(
1.0f
)
:
(
SvgUnit
)
this
.
Attributes
[
"
S
troke
W
idth"
];
}
set
{
this
.
Attributes
[
"
S
troke
W
idth"
]
=
value
;
}
get
{
return
(
this
.
Attributes
[
"
s
troke
-w
idth"
]
==
null
)
?
new
SvgUnit
(
1.0f
)
:
(
SvgUnit
)
this
.
Attributes
[
"
s
troke
-w
idth"
];
}
set
{
this
.
Attributes
[
"
s
troke
-w
idth"
]
=
value
;
}
}
[
SvgAttribute
(
"stroke-linecap"
)]
public
virtual
SvgStrokeLineCap
StrokeLineCap
{
get
{
return
(
this
.
Attributes
[
"
S
troke
L
ine
C
ap"
]
==
null
)
?
SvgStrokeLineCap
.
Butt
:
(
SvgStrokeLineCap
)
this
.
Attributes
[
"
S
troke
L
ine
C
ap"
];
}
set
{
this
.
Attributes
[
"
S
troke
L
ine
C
ap"
]
=
value
;
}
get
{
return
(
this
.
Attributes
[
"
s
troke
-l
ine
c
ap"
]
==
null
)
?
SvgStrokeLineCap
.
Butt
:
(
SvgStrokeLineCap
)
this
.
Attributes
[
"
s
troke
-l
ine
c
ap"
];
}
set
{
this
.
Attributes
[
"
s
troke
-l
ine
c
ap"
]
=
value
;
}
}
[
SvgAttribute
(
"stroke-linejoin"
)]
public
virtual
SvgStrokeLineJoin
StrokeLineJoin
{
get
{
return
(
this
.
Attributes
[
"
S
troke
L
ine
J
oin"
]
==
null
)
?
SvgStrokeLineJoin
.
Miter
:
(
SvgStrokeLineJoin
)
this
.
Attributes
[
"
S
troke
L
ine
J
oin"
];
}
set
{
this
.
Attributes
[
"
S
troke
L
ine
J
oin"
]
=
value
;
}
get
{
return
(
this
.
Attributes
[
"
s
troke
-l
ine
j
oin"
]
==
null
)
?
SvgStrokeLineJoin
.
Miter
:
(
SvgStrokeLineJoin
)
this
.
Attributes
[
"
s
troke
-l
ine
j
oin"
];
}
set
{
this
.
Attributes
[
"
s
troke
-l
ine
j
oin"
]
=
value
;
}
}
[
SvgAttribute
(
"stroke-miterlimit"
)]
public
virtual
float
StrokeMiterLimit
{
get
{
return
(
this
.
Attributes
[
"
S
troke
M
iter
L
imit"
]
==
null
)
?
4.0f
:
(
float
)
this
.
Attributes
[
"
S
troke
M
iter
L
imit"
];
}
set
{
this
.
Attributes
[
"
S
troke
M
iter
L
imit"
]
=
value
;
}
get
{
return
(
this
.
Attributes
[
"
s
troke
-m
iter
l
imit"
]
==
null
)
?
4.0f
:
(
float
)
this
.
Attributes
[
"
s
troke
-m
iter
l
imit"
];
}
set
{
this
.
Attributes
[
"
s
troke
-m
iter
l
imit"
]
=
value
;
}
}
[
SvgAttribute
(
"stroke-dasharray"
)]
public
virtual
SvgUnitCollection
StrokeDashArray
{
get
{
return
this
.
Attributes
[
"
S
troke
D
ash
A
rray"
]
as
SvgUnitCollection
;
}
set
{
this
.
Attributes
[
"
S
troke
D
ash
A
rray"
]
=
value
;
}
get
{
return
this
.
Attributes
[
"
s
troke
-d
ash
a
rray"
]
as
SvgUnitCollection
;
}
set
{
this
.
Attributes
[
"
s
troke
-d
ash
a
rray"
]
=
value
;
}
}
[
SvgAttribute
(
"stroke-dashoffset"
)]
public
virtual
SvgUnit
StrokeDashOffset
{
get
{
return
(
this
.
Attributes
[
"
S
troke
D
ash
O
ffset"
]
==
null
)
?
SvgUnit
.
Empty
:
(
SvgUnit
)
this
.
Attributes
[
"
S
troke
D
ash
O
ffset"
];
}
set
{
this
.
Attributes
[
"
S
troke
D
ash
O
ffset"
]
=
value
;
}
get
{
return
(
this
.
Attributes
[
"
s
troke
-d
ash
o
ffset"
]
==
null
)
?
SvgUnit
.
Empty
:
(
SvgUnit
)
this
.
Attributes
[
"
s
troke
-d
ash
o
ffset"
];
}
set
{
this
.
Attributes
[
"
s
troke
-d
ash
o
ffset"
]
=
value
;
}
}
/// <summary>
...
...
@@ -114,8 +114,8 @@ namespace Svg
[
SvgAttribute
(
"stroke-opacity"
)]
public
virtual
float
StrokeOpacity
{
get
{
return
(
this
.
Attributes
[
"
S
troke
O
pacity"
]
==
null
)
?
this
.
Opacity
:
(
float
)
this
.
Attributes
[
"
S
troke
O
pacity"
];
}
set
{
this
.
Attributes
[
"
S
troke
O
pacity"
]
=
FixOpacityValue
(
value
);
}
get
{
return
(
this
.
Attributes
[
"
s
troke
-o
pacity"
]
==
null
)
?
this
.
Opacity
:
(
float
)
this
.
Attributes
[
"
s
troke
-o
pacity"
];
}
set
{
this
.
Attributes
[
"
s
troke
-o
pacity"
]
=
FixOpacityValue
(
value
);
}
}
/// <summary>
...
...
@@ -124,8 +124,8 @@ namespace Svg
[
SvgAttribute
(
"opacity"
)]
public
virtual
float
Opacity
{
get
{
return
(
this
.
Attributes
[
"
O
pacity"
]
==
null
)
?
1.0f
:
(
float
)
this
.
Attributes
[
"
O
pacity"
];
}
set
{
this
.
Attributes
[
"
O
pacity"
]
=
FixOpacityValue
(
value
);
}
get
{
return
(
this
.
Attributes
[
"
o
pacity"
]
==
null
)
?
1.0f
:
(
float
)
this
.
Attributes
[
"
o
pacity"
];
}
set
{
this
.
Attributes
[
"
o
pacity"
]
=
FixOpacityValue
(
value
);
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Source/SvgElement.cs
+
5
-
5
View file @
f541d280
...
...
@@ -238,14 +238,14 @@ namespace Svg
[
SvgAttribute
(
"transform"
)]
public
SvgTransformCollection
Transforms
{
get
{
return
(
this
.
Attributes
.
GetAttribute
<
SvgTransformCollection
>(
"
T
ransform
s
"
));
}
get
{
return
(
this
.
Attributes
.
GetAttribute
<
SvgTransformCollection
>(
"
t
ransform"
));
}
set
{
var
old
=
this
.
Transforms
;
if
(
old
!=
null
)
old
.
TransformChanged
-=
Attributes_AttributeChanged
;
value
.
TransformChanged
+=
Attributes_AttributeChanged
;
this
.
Attributes
[
"
T
ransform
s
"
]
=
value
;
this
.
Attributes
[
"
t
ransform"
]
=
value
;
}
}
...
...
@@ -256,7 +256,7 @@ namespace Svg
[
SvgAttribute
(
"id"
)]
public
string
ID
{
get
{
return
this
.
Attributes
.
GetAttribute
<
string
>(
"
ID
"
);
}
get
{
return
this
.
Attributes
.
GetAttribute
<
string
>(
"
id
"
);
}
set
{
SetAndFixID
(
value
,
false
);
...
...
@@ -276,7 +276,7 @@ namespace Svg
this
.
OwnerDocument
.
IdManager
.
Remove
(
this
);
}
this
.
Attributes
[
"
ID
"
]
=
value
;
this
.
Attributes
[
"
id
"
]
=
value
;
if
(
this
.
OwnerDocument
!=
null
)
{
...
...
@@ -290,7 +290,7 @@ namespace Svg
/// <param name="newID"></param>
internal
void
FixID
(
string
newID
)
{
this
.
Attributes
[
"
ID
"
]
=
newID
;
this
.
Attributes
[
"
id
"
]
=
newID
;
}
/// <summary>
...
...
This diff is collapsed.
Click to expand it.
Source/Text/SvgText.cs
+
2
-
2
View file @
f541d280
...
...
@@ -213,8 +213,8 @@ namespace Svg
/// <value>The fill.</value>
public
override
SvgPaintServer
Fill
{
get
{
return
(
this
.
Attributes
[
"
F
ill"
]
==
null
)
?
new
SvgColourServer
(
Color
.
Black
)
:
(
SvgPaintServer
)
this
.
Attributes
[
"Fill"
];
}
set
{
this
.
Attributes
[
"
F
ill"
]
=
value
;
}
get
{
return
(
this
.
Attributes
[
"
f
ill"
]
==
null
)
?
new
SvgColourServer
(
Color
.
Black
)
:
(
SvgPaintServer
)
this
.
Attributes
[
"Fill"
];
}
set
{
this
.
Attributes
[
"
f
ill"
]
=
value
;
}
}
/// <summary>
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help