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
1758a5b5
Commit
1758a5b5
authored
Mar 28, 2014
by
tebjan
Browse files
now doing element wise matrix comparison
parent
f20108c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/SvgAttributeCollection.cs
View file @
1758a5b5
...
...
@@ -92,7 +92,7 @@ namespace Svg
if
(
base
.
ContainsKey
(
attributeName
))
{
var
oldVal
=
base
[
attributeName
];
if
(
TryUnbox
An
dCheck
(
oldVal
,
value
))
if
(
TryUnbox
e
dCheck
(
oldVal
,
value
))
{
base
[
attributeName
]
=
value
;
OnAttributeChanged
(
attributeName
,
value
);
...
...
@@ -106,13 +106,10 @@ namespace Svg
}
}
private
bool
TryUnbox
An
dCheck
(
object
a
,
object
b
)
private
bool
TryUnbox
e
dCheck
(
object
a
,
object
b
)
{
System
.
Diagnostics
.
Debug
.
WriteLine
(
"object type: "
+
a
.
GetType
().
ToString
());
if
(
IsValueType
(
a
))
{
System
.
Diagnostics
.
Debug
.
WriteLine
(
"is value type"
);
if
(
a
is
SvgUnit
)
return
UnboxAndCheck
<
SvgUnit
>(
a
,
b
);
else
if
(
a
is
bool
)
...
...
Source/Transforms/SvgTransform.cs
View file @
1758a5b5
...
...
@@ -19,7 +19,17 @@ namespace Svg.Transforms
SvgTransform
other
=
obj
as
SvgTransform
;
if
(
other
==
null
)
return
false
;
return
this
.
Matrix
==
other
.
Matrix
;
var
thisMatrix
=
this
.
Matrix
.
Elements
;
var
otherMatrix
=
other
.
Matrix
.
Elements
;
for
(
int
i
=
0
;
i
<
6
;
i
++)
{
if
(
thisMatrix
[
i
]
!=
otherMatrix
[
i
])
return
false
;
}
return
true
;
}
public
override
int
GetHashCode
()
...
...
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