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
59051383
Commit
59051383
authored
Mar 20, 2014
by
tebjan
Browse files
some OnAttributeChanged events would not be fired, added changed check for some attributes
parent
18ec8075
Changes
4
Show whitespace changes
Inline
Side-by-side
Source/Basic Shapes/SvgCircle.cs
View file @
59051383
...
@@ -35,9 +35,13 @@ namespace Svg
...
@@ -35,9 +35,13 @@ namespace Svg
{
{
get
{
return
this
.
_centerX
;
}
get
{
return
this
.
_centerX
;
}
set
set
{
if
(
_centerX
!=
value
)
{
{
this
.
_centerX
=
value
;
this
.
_centerX
=
value
;
this
.
IsPathDirty
=
true
;
this
.
IsPathDirty
=
true
;
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"cx"
,
Value
=
value
});
}
}
}
}
}
...
@@ -46,9 +50,13 @@ namespace Svg
...
@@ -46,9 +50,13 @@ namespace Svg
{
{
get
{
return
this
.
_centerY
;
}
get
{
return
this
.
_centerY
;
}
set
set
{
if
(
_centerY
!=
value
)
{
{
this
.
_centerY
=
value
;
this
.
_centerY
=
value
;
this
.
IsPathDirty
=
true
;
this
.
IsPathDirty
=
true
;
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"cy"
,
Value
=
value
});
}
}
}
}
}
...
@@ -56,7 +64,15 @@ namespace Svg
...
@@ -56,7 +64,15 @@ namespace Svg
public
virtual
SvgUnit
Radius
public
virtual
SvgUnit
Radius
{
{
get
{
return
this
.
_radius
;
}
get
{
return
this
.
_radius
;
}
set
{
this
.
_radius
=
value
;
this
.
IsPathDirty
=
true
;
}
set
{
if
(
_radius
!=
value
)
{
this
.
_radius
=
value
;
this
.
IsPathDirty
=
true
;
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"r"
,
Value
=
value
});
}
}
}
}
/// <summary>
/// <summary>
...
...
Source/Basic Shapes/SvgRectangle.cs
View file @
59051383
...
@@ -48,12 +48,15 @@ namespace Svg
...
@@ -48,12 +48,15 @@ namespace Svg
{
{
get
{
return
_x
;
}
get
{
return
_x
;
}
set
set
{
if
(
_x
!=
value
)
{
{
_x
=
value
;
_x
=
value
;
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"x"
,
Value
=
value
});
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"x"
,
Value
=
value
});
IsPathDirty
=
true
;
IsPathDirty
=
true
;
}
}
}
}
}
/// <summary>
/// <summary>
/// Gets or sets the position where the top point of the rectangle should start.
/// Gets or sets the position where the top point of the rectangle should start.
...
@@ -63,12 +66,15 @@ namespace Svg
...
@@ -63,12 +66,15 @@ namespace Svg
{
{
get
{
return
_y
;
}
get
{
return
_y
;
}
set
set
{
if
(
_y
!=
value
)
{
{
_y
=
value
;
_y
=
value
;
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"y"
,
Value
=
value
});
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"y"
,
Value
=
value
});
IsPathDirty
=
true
;
IsPathDirty
=
true
;
}
}
}
}
}
/// <summary>
/// <summary>
/// Gets or sets the width of the rectangle.
/// Gets or sets the width of the rectangle.
...
@@ -78,12 +84,15 @@ namespace Svg
...
@@ -78,12 +84,15 @@ namespace Svg
{
{
get
{
return
_width
;
}
get
{
return
_width
;
}
set
set
{
if
(
_width
!=
value
)
{
{
_width
=
value
;
_width
=
value
;
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"width"
,
Value
=
value
});
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"width"
,
Value
=
value
});
IsPathDirty
=
true
;
IsPathDirty
=
true
;
}
}
}
}
}
/// <summary>
/// <summary>
/// Gets or sets the height of the rectangle.
/// Gets or sets the height of the rectangle.
...
@@ -93,12 +102,15 @@ namespace Svg
...
@@ -93,12 +102,15 @@ namespace Svg
{
{
get
{
return
_height
;
}
get
{
return
_height
;
}
set
set
{
if
(
_height
!=
value
)
{
{
_height
=
value
;
_height
=
value
;
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"height"
,
Value
=
value
});
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"height"
,
Value
=
value
});
IsPathDirty
=
true
;
IsPathDirty
=
true
;
}
}
}
}
}
/// <summary>
/// <summary>
/// Gets or sets the X-radius of the rounded edges of this rectangle.
/// Gets or sets the X-radius of the rounded edges of this rectangle.
...
...
Source/Paths/SvgPath.cs
View file @
59051383
...
@@ -18,7 +18,6 @@ namespace Svg
...
@@ -18,7 +18,6 @@ namespace Svg
public
class
SvgPath
:
SvgVisualElement
public
class
SvgPath
:
SvgVisualElement
{
{
private
GraphicsPath
_path
;
private
GraphicsPath
_path
;
private
int
_pathLength
;
/// <summary>
/// <summary>
/// Gets or sets a <see cref="SvgPathSegmentList"/> of path data.
/// Gets or sets a <see cref="SvgPathSegmentList"/> of path data.
...
@@ -41,8 +40,8 @@ namespace Svg
...
@@ -41,8 +40,8 @@ namespace Svg
[
SvgAttribute
(
"pathLength"
)]
[
SvgAttribute
(
"pathLength"
)]
public
int
PathLength
public
int
PathLength
{
{
get
{
return
this
.
_
pathLength
;
}
get
{
return
this
.
Attributes
.
GetAttribute
<
int
>(
"
pathLength
"
)
;
}
set
{
this
.
_
pathLength
=
value
;
}
set
{
this
.
Attributes
[
"
pathLength
"
]
=
value
;
}
}
}
...
...
Source/Text/SvgText.cs
View file @
59051383
...
@@ -87,12 +87,15 @@ namespace Svg
...
@@ -87,12 +87,15 @@ namespace Svg
{
{
get
{
return
this
.
_x
;
}
get
{
return
this
.
_x
;
}
set
set
{
if
(
_x
!=
value
)
{
{
this
.
_x
=
value
;
this
.
_x
=
value
;
this
.
IsPathDirty
=
true
;
this
.
IsPathDirty
=
true
;
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"x"
,
Value
=
value
});
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"x"
,
Value
=
value
});
}
}
}
}
}
/// <summary>
/// <summary>
/// Gets or sets the Y.
/// Gets or sets the Y.
...
@@ -103,12 +106,15 @@ namespace Svg
...
@@ -103,12 +106,15 @@ namespace Svg
{
{
get
{
return
this
.
_y
;
}
get
{
return
this
.
_y
;
}
set
set
{
if
(
_y
!=
value
)
{
{
this
.
_y
=
value
;
this
.
_y
=
value
;
this
.
IsPathDirty
=
true
;
this
.
IsPathDirty
=
true
;
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"y"
,
Value
=
value
});
OnAttributeChanged
(
new
AttributeEventArgs
{
Attribute
=
"y"
,
Value
=
value
});
}
}
}
}
}
/// <summary>
/// <summary>
/// Specifies spacing behavior between text characters.
/// Specifies spacing behavior between text characters.
...
...
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