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
f03ac5bd
Commit
f03ac5bd
authored
Mar 28, 2014
by
tebjan
Browse files
avg fragment now fires attribute changed events
parent
4d631e7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/Document Structure/SvgFragment.cs
View file @
f03ac5bd
...
...
@@ -14,11 +14,6 @@ namespace Svg
[
SvgElement
(
"svg"
)]
public
class
SvgFragment
:
SvgElement
,
ISvgViewPort
{
private
SvgUnit
_width
;
private
SvgUnit
_height
;
private
SvgViewBox
_viewBox
;
private
SvgAspectRatio
_aspect
;
/// <summary>
/// Gets the SVG namespace string.
/// </summary>
...
...
@@ -31,8 +26,8 @@ namespace Svg
[
SvgAttribute
(
"width"
)]
public
SvgUnit
Width
{
get
{
return
this
.
_
width
;
}
set
{
this
.
_
width
=
value
;
}
get
{
return
this
.
Attributes
.
GetAttribute
<
SvgUnit
>(
"
width
"
)
;
}
set
{
this
.
Attributes
[
"
width
"
]
=
value
;
}
}
/// <summary>
...
...
@@ -42,8 +37,8 @@ namespace Svg
[
SvgAttribute
(
"height"
)]
public
SvgUnit
Height
{
get
{
return
this
.
_
height
;
}
set
{
this
.
_
height
=
value
;
}
get
{
return
this
.
Attributes
.
GetAttribute
<
SvgUnit
>(
"
height
"
)
;
}
set
{
this
.
Attributes
[
"
height
"
]
=
value
;
}
}
[
SvgAttribute
(
"overflow"
)]
...
...
@@ -60,8 +55,8 @@ namespace Svg
[
SvgAttribute
(
"viewBox"
)]
public
SvgViewBox
ViewBox
{
get
{
return
this
.
_
viewBox
;
}
set
{
this
.
_
viewBox
=
value
;
}
get
{
return
this
.
Attributes
.
GetAttribute
<
SvgViewBox
>(
"
viewBox
"
)
;
}
set
{
this
.
Attributes
[
"
viewBox
"
]
=
value
;
}
}
/// <summary>
...
...
@@ -71,8 +66,8 @@ namespace Svg
[
SvgAttribute
(
"preserveAspectRatio"
)]
public
SvgAspectRatio
AspectRatio
{
get
{
return
this
.
_aspect
;
}
set
{
this
.
_aspect
=
value
;
}
get
{
return
this
.
Attributes
.
GetAttribute
<
SvgAspectRatio
>(
"preserveAspectRatio"
)
;
}
set
{
this
.
Attributes
[
"preserveAspectRatio"
]
=
value
;
}
}
/// <summary>
...
...
@@ -117,7 +112,6 @@ namespace Svg
{
return
this
.
Path
.
GetBounds
();
}
}
/// <summary>
...
...
@@ -125,8 +119,8 @@ namespace Svg
/// </summary>
public
SvgFragment
()
{
this
.
_h
eight
=
new
SvgUnit
(
SvgUnitType
.
Percentage
,
100.0f
);
this
.
_w
idth
=
new
SvgUnit
(
SvgUnitType
.
Percentage
,
100.0f
);
this
.
H
eight
=
new
SvgUnit
(
SvgUnitType
.
Percentage
,
100.0f
);
this
.
W
idth
=
new
SvgUnit
(
SvgUnitType
.
Percentage
,
100.0f
);
this
.
ViewBox
=
SvgViewBox
.
Empty
;
this
.
AspectRatio
=
new
SvgAspectRatio
(
SvgPreserveAspectRatio
.
None
);
}
...
...
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