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
f541d280
"vscode:/vscode.git/clone" did not exist on "3987f2818319eb2cdbffcafbb5cecac6f21186f0"
Commit
f541d280
authored
Mar 11, 2014
by
tebjan
Browse files
changed attribute collection key strings to reflect the original svg attribute name
parent
d0c450d0
Changes
3
Show whitespace changes
Inline
Side-by-side
Source/Basic Shapes/SvgVisualElementStyle.cs
View file @
f541d280
...
@@ -32,8 +32,8 @@ namespace Svg
...
@@ -32,8 +32,8 @@ namespace Svg
[
SvgAttribute
(
"fill"
)]
[
SvgAttribute
(
"fill"
)]
public
virtual
SvgPaintServer
Fill
public
virtual
SvgPaintServer
Fill
{
{
get
{
return
(
this
.
Attributes
[
"
F
ill"
]
==
null
)
?
SvgColourServer
.
NotSet
:
(
SvgPaintServer
)
this
.
Attributes
[
"
F
ill"
];
}
get
{
return
(
this
.
Attributes
[
"
f
ill"
]
==
null
)
?
SvgColourServer
.
NotSet
:
(
SvgPaintServer
)
this
.
Attributes
[
"
f
ill"
];
}
set
{
this
.
Attributes
[
"
F
ill"
]
=
value
;
}
set
{
this
.
Attributes
[
"
f
ill"
]
=
value
;
}
}
}
/// <summary>
/// <summary>
...
@@ -42,15 +42,15 @@ namespace Svg
...
@@ -42,15 +42,15 @@ namespace Svg
[
SvgAttribute
(
"stroke"
)]
[
SvgAttribute
(
"stroke"
)]
public
virtual
SvgPaintServer
Stroke
public
virtual
SvgPaintServer
Stroke
{
{
get
{
return
(
this
.
Attributes
[
"
S
troke"
]
==
null
)
?
null
:
(
SvgPaintServer
)
this
.
Attributes
[
"
S
troke"
];
}
get
{
return
(
this
.
Attributes
[
"
s
troke"
]
==
null
)
?
null
:
(
SvgPaintServer
)
this
.
Attributes
[
"
s
troke"
];
}
set
{
this
.
Attributes
[
"
S
troke"
]
=
value
;
}
set
{
this
.
Attributes
[
"
s
troke"
]
=
value
;
}
}
}
[
SvgAttribute
(
"fill-rule"
)]
[
SvgAttribute
(
"fill-rule"
)]
public
virtual
SvgFillRule
FillRule
public
virtual
SvgFillRule
FillRule
{
{
get
{
return
(
this
.
Attributes
[
"
F
ill
R
ule"
]
==
null
)
?
SvgFillRule
.
NonZero
:
(
SvgFillRule
)
this
.
Attributes
[
"
F
ill
R
ule"
];
}
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
;
}
set
{
this
.
Attributes
[
"
f
ill
-r
ule"
]
=
value
;
}
}
}
/// <summary>
/// <summary>
...
@@ -59,8 +59,8 @@ namespace Svg
...
@@ -59,8 +59,8 @@ namespace Svg
[
SvgAttribute
(
"fill-opacity"
)]
[
SvgAttribute
(
"fill-opacity"
)]
public
virtual
float
FillOpacity
public
virtual
float
FillOpacity
{
{
get
{
return
(
this
.
Attributes
[
"
F
ill
O
pacity"
]
==
null
)
?
this
.
Opacity
:
(
float
)
this
.
Attributes
[
"
F
ill
O
pacity"
];
}
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
);
}
set
{
this
.
Attributes
[
"
f
ill
-o
pacity"
]
=
FixOpacityValue
(
value
);
}
}
}
/// <summary>
/// <summary>
...
@@ -69,43 +69,43 @@ namespace Svg
...
@@ -69,43 +69,43 @@ namespace Svg
[
SvgAttribute
(
"stroke-width"
)]
[
SvgAttribute
(
"stroke-width"
)]
public
virtual
SvgUnit
StrokeWidth
public
virtual
SvgUnit
StrokeWidth
{
{
get
{
return
(
this
.
Attributes
[
"
S
troke
W
idth"
]
==
null
)
?
new
SvgUnit
(
1.0f
)
:
(
SvgUnit
)
this
.
Attributes
[
"
S
troke
W
idth"
];
}
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
;
}
set
{
this
.
Attributes
[
"
s
troke
-w
idth"
]
=
value
;
}
}
}
[
SvgAttribute
(
"stroke-linecap"
)]
[
SvgAttribute
(
"stroke-linecap"
)]
public
virtual
SvgStrokeLineCap
StrokeLineCap
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"
];
}
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
;
}
set
{
this
.
Attributes
[
"
s
troke
-l
ine
c
ap"
]
=
value
;
}
}
}
[
SvgAttribute
(
"stroke-linejoin"
)]
[
SvgAttribute
(
"stroke-linejoin"
)]
public
virtual
SvgStrokeLineJoin
StrokeLineJoin
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"
];
}
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
;
}
set
{
this
.
Attributes
[
"
s
troke
-l
ine
j
oin"
]
=
value
;
}
}
}
[
SvgAttribute
(
"stroke-miterlimit"
)]
[
SvgAttribute
(
"stroke-miterlimit"
)]
public
virtual
float
StrokeMiterLimit
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"
];
}
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
;
}
set
{
this
.
Attributes
[
"
s
troke
-m
iter
l
imit"
]
=
value
;
}
}
}
[
SvgAttribute
(
"stroke-dasharray"
)]
[
SvgAttribute
(
"stroke-dasharray"
)]
public
virtual
SvgUnitCollection
StrokeDashArray
public
virtual
SvgUnitCollection
StrokeDashArray
{
{
get
{
return
this
.
Attributes
[
"
S
troke
D
ash
A
rray"
]
as
SvgUnitCollection
;
}
get
{
return
this
.
Attributes
[
"
s
troke
-d
ash
a
rray"
]
as
SvgUnitCollection
;
}
set
{
this
.
Attributes
[
"
S
troke
D
ash
A
rray"
]
=
value
;
}
set
{
this
.
Attributes
[
"
s
troke
-d
ash
a
rray"
]
=
value
;
}
}
}
[
SvgAttribute
(
"stroke-dashoffset"
)]
[
SvgAttribute
(
"stroke-dashoffset"
)]
public
virtual
SvgUnit
StrokeDashOffset
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"
];
}
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
;
}
set
{
this
.
Attributes
[
"
s
troke
-d
ash
o
ffset"
]
=
value
;
}
}
}
/// <summary>
/// <summary>
...
@@ -114,8 +114,8 @@ namespace Svg
...
@@ -114,8 +114,8 @@ namespace Svg
[
SvgAttribute
(
"stroke-opacity"
)]
[
SvgAttribute
(
"stroke-opacity"
)]
public
virtual
float
StrokeOpacity
public
virtual
float
StrokeOpacity
{
{
get
{
return
(
this
.
Attributes
[
"
S
troke
O
pacity"
]
==
null
)
?
this
.
Opacity
:
(
float
)
this
.
Attributes
[
"
S
troke
O
pacity"
];
}
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
);
}
set
{
this
.
Attributes
[
"
s
troke
-o
pacity"
]
=
FixOpacityValue
(
value
);
}
}
}
/// <summary>
/// <summary>
...
@@ -124,8 +124,8 @@ namespace Svg
...
@@ -124,8 +124,8 @@ namespace Svg
[
SvgAttribute
(
"opacity"
)]
[
SvgAttribute
(
"opacity"
)]
public
virtual
float
Opacity
public
virtual
float
Opacity
{
{
get
{
return
(
this
.
Attributes
[
"
O
pacity"
]
==
null
)
?
1.0f
:
(
float
)
this
.
Attributes
[
"
O
pacity"
];
}
get
{
return
(
this
.
Attributes
[
"
o
pacity"
]
==
null
)
?
1.0f
:
(
float
)
this
.
Attributes
[
"
o
pacity"
];
}
set
{
this
.
Attributes
[
"
O
pacity"
]
=
FixOpacityValue
(
value
);
}
set
{
this
.
Attributes
[
"
o
pacity"
]
=
FixOpacityValue
(
value
);
}
}
}
}
}
}
}
\ No newline at end of file
Source/SvgElement.cs
View file @
f541d280
...
@@ -238,14 +238,14 @@ namespace Svg
...
@@ -238,14 +238,14 @@ namespace Svg
[
SvgAttribute
(
"transform"
)]
[
SvgAttribute
(
"transform"
)]
public
SvgTransformCollection
Transforms
public
SvgTransformCollection
Transforms
{
{
get
{
return
(
this
.
Attributes
.
GetAttribute
<
SvgTransformCollection
>(
"
T
ransform
s
"
));
}
get
{
return
(
this
.
Attributes
.
GetAttribute
<
SvgTransformCollection
>(
"
t
ransform"
));
}
set
set
{
{
var
old
=
this
.
Transforms
;
var
old
=
this
.
Transforms
;
if
(
old
!=
null
)
if
(
old
!=
null
)
old
.
TransformChanged
-=
Attributes_AttributeChanged
;
old
.
TransformChanged
-=
Attributes_AttributeChanged
;
value
.
TransformChanged
+=
Attributes_AttributeChanged
;
value
.
TransformChanged
+=
Attributes_AttributeChanged
;
this
.
Attributes
[
"
T
ransform
s
"
]
=
value
;
this
.
Attributes
[
"
t
ransform"
]
=
value
;
}
}
}
}
...
@@ -256,7 +256,7 @@ namespace Svg
...
@@ -256,7 +256,7 @@ namespace Svg
[
SvgAttribute
(
"id"
)]
[
SvgAttribute
(
"id"
)]
public
string
ID
public
string
ID
{
{
get
{
return
this
.
Attributes
.
GetAttribute
<
string
>(
"
ID
"
);
}
get
{
return
this
.
Attributes
.
GetAttribute
<
string
>(
"
id
"
);
}
set
set
{
{
SetAndFixID
(
value
,
false
);
SetAndFixID
(
value
,
false
);
...
@@ -276,7 +276,7 @@ namespace Svg
...
@@ -276,7 +276,7 @@ namespace Svg
this
.
OwnerDocument
.
IdManager
.
Remove
(
this
);
this
.
OwnerDocument
.
IdManager
.
Remove
(
this
);
}
}
this
.
Attributes
[
"
ID
"
]
=
value
;
this
.
Attributes
[
"
id
"
]
=
value
;
if
(
this
.
OwnerDocument
!=
null
)
if
(
this
.
OwnerDocument
!=
null
)
{
{
...
@@ -290,7 +290,7 @@ namespace Svg
...
@@ -290,7 +290,7 @@ namespace Svg
/// <param name="newID"></param>
/// <param name="newID"></param>
internal
void
FixID
(
string
newID
)
internal
void
FixID
(
string
newID
)
{
{
this
.
Attributes
[
"
ID
"
]
=
newID
;
this
.
Attributes
[
"
id
"
]
=
newID
;
}
}
/// <summary>
/// <summary>
...
...
Source/Text/SvgText.cs
View file @
f541d280
...
@@ -213,8 +213,8 @@ namespace Svg
...
@@ -213,8 +213,8 @@ namespace Svg
/// <value>The fill.</value>
/// <value>The fill.</value>
public
override
SvgPaintServer
Fill
public
override
SvgPaintServer
Fill
{
{
get
{
return
(
this
.
Attributes
[
"
F
ill"
]
==
null
)
?
new
SvgColourServer
(
Color
.
Black
)
:
(
SvgPaintServer
)
this
.
Attributes
[
"Fill"
];
}
get
{
return
(
this
.
Attributes
[
"
f
ill"
]
==
null
)
?
new
SvgColourServer
(
Color
.
Black
)
:
(
SvgPaintServer
)
this
.
Attributes
[
"Fill"
];
}
set
{
this
.
Attributes
[
"
F
ill"
]
=
value
;
}
set
{
this
.
Attributes
[
"
f
ill"
]
=
value
;
}
}
}
/// <summary>
/// <summary>
...
...
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