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
f9088cab
"Source/vscode:/vscode.git/clone" did not exist on "ed8cbf96efeae95897fd991cf7fa6ffcd8e66f48"
Commit
f9088cab
authored
Jul 08, 2013
by
Tebjan Halm
Browse files
fixed circle attributes
parent
7e3424cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/Basic Shapes/SvgCircle.cs
View file @
f9088cab
...
@@ -16,6 +16,10 @@ namespace Svg
...
@@ -16,6 +16,10 @@ namespace Svg
public
class
SvgCircle
:
SvgVisualElement
public
class
SvgCircle
:
SvgVisualElement
{
{
private
GraphicsPath
_path
;
private
GraphicsPath
_path
;
private
SvgUnit
_radius
;
private
SvgUnit
_centerX
;
private
SvgUnit
_centerY
;
/// <summary>
/// <summary>
/// Gets the center point of the circle.
/// Gets the center point of the circle.
...
@@ -26,58 +30,33 @@ namespace Svg
...
@@ -26,58 +30,33 @@ namespace Svg
get
{
return
new
SvgPoint
(
this
.
CenterX
,
this
.
CenterY
);
}
get
{
return
new
SvgPoint
(
this
.
CenterX
,
this
.
CenterY
);
}
}
}
/// <summary>
/// Gets or sets the center X co-ordinate.
/// </summary>
/// <value>The center X.</value>
[
SvgAttribute
(
"cx"
)]
[
SvgAttribute
(
"cx"
)]
public
SvgUnit
CenterX
public
virtual
SvgUnit
CenterX
{
{
get
{
return
this
.
Attributes
.
GetAttribute
<
SvgUnit
>(
"cx"
)
;
}
get
{
return
this
.
_centerX
;
}
set
set
{
{
if
(
this
.
Attributes
.
GetAttribute
<
SvgUnit
>(
"cx"
)
!=
value
)
this
.
_centerX
=
value
;
{
this
.
IsPathDirty
=
true
;
this
.
Attributes
[
"cx"
]
=
value
;
this
.
IsPathDirty
=
true
;
}
}
}
}
}
/// <summary>
/// Gets or sets the center Y co-ordinate.
/// </summary>
/// <value>The center Y.</value>
[
SvgAttribute
(
"cy"
)]
[
SvgAttribute
(
"cy"
)]
public
SvgUnit
CenterY
public
virtual
SvgUnit
CenterY
{
{
get
{
return
this
.
Attributes
.
GetAttribute
<
SvgUnit
>(
"cy"
)
;
}
get
{
return
this
.
_centerY
;
}
set
set
{
{
if
(
this
.
Attributes
.
GetAttribute
<
SvgUnit
>(
"cy"
)
!=
value
)
this
.
_centerY
=
value
;
{
this
.
IsPathDirty
=
true
;
this
.
Attributes
[
"cy"
]
=
value
;
this
.
IsPathDirty
=
true
;
}
}
}
}
}
/// <summary>
/// Gets or sets the radius of the circle.
/// </summary>
/// <value>The radius.</value>
[
SvgAttribute
(
"r"
)]
[
SvgAttribute
(
"r"
)]
public
SvgUnit
Radius
public
virtual
SvgUnit
Radius
{
{
get
{
return
this
.
Attributes
.
GetAttribute
<
SvgUnit
>(
"r"
);
}
get
{
return
this
.
_radius
;
}
set
set
{
this
.
_radius
=
value
;
this
.
IsPathDirty
=
true
;
}
{
if
(
this
.
Attributes
.
GetAttribute
<
SvgUnit
>(
"r"
)
!=
value
)
{
this
.
Attributes
[
"r"
]
=
value
;
this
.
IsPathDirty
=
true
;
}
}
}
}
/// <summary>
/// <summary>
...
...
Source/SvgDefinitionDefaults.cs
View file @
f9088cab
...
@@ -22,6 +22,8 @@ namespace Svg
...
@@ -22,6 +22,8 @@ namespace Svg
_defaults
[
"clip-rule"
]
=
"nonzero"
;
_defaults
[
"clip-rule"
]
=
"nonzero"
;
_defaults
[
"transform"
]
=
""
;
_defaults
[
"transform"
]
=
""
;
_defaults
[
"rx"
]
=
"0"
;
_defaults
[
"ry"
]
=
"0"
;
_defaults
[
"cx"
]
=
"0"
;
_defaults
[
"cx"
]
=
"0"
;
_defaults
[
"cy"
]
=
"0"
;
_defaults
[
"cy"
]
=
"0"
;
...
...
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