OSDN Git Service
(root)
/
psychlops
/
silverlight.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.0
[psychlops/silverlight.git]
/
dev3
/
psychlops
/
core
/
graphic
/
module.cs
diff --git
a/dev3/psychlops/core/graphic/module.cs
b/dev3/psychlops/core/graphic/module.cs
index
853717e
..
7afeeaf
100644
(file)
--- a/
dev3/psychlops/core/graphic/module.cs
+++ b/
dev3/psychlops/core/graphic/module.cs
@@
-43,6
+43,10
@@
namespace Psychlops
{
\r
return new Point(lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z);
\r
}
\r
{
\r
return new Point(lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z);
\r
}
\r
+ public override string ToString()
\r
+ {
\r
+ return "X:"+ x.ToString() + " Y:"+ y.ToString() + " Z:"+ z.ToString();
\r
+ }
\r
}
\r
\r
\r
}
\r
\r
\r
@@
-88,6
+92,11
@@
namespace Psychlops
a = alpha;
\r
}
\r
\r
a = alpha;
\r
}
\r
\r
+ public override string ToString()
\r
+ {
\r
+ return "R:" + r.ToString() + " G:" + g.ToString() + " B:" + b.ToString() + " A:" + a.ToString();
\r
+ }
\r
+
\r
public static readonly Color
\r
black = new Color(0, 0, 0, 1),
\r
red = new Color(1, 0, 0, 1),
\r
public static readonly Color
\r
black = new Color(0, 0, 0, 1),
\r
red = new Color(1, 0, 0, 1),
\r
@@
-121,12
+130,22
@@
namespace Psychlops
\r
public interface Figure
\r
{
\r
\r
public interface Figure
\r
{
\r
+ Point datum { get; set; }
\r
Figure shift(Point p);
\r
Figure centering(Point p);
\r
void draw();
\r
}
\r
public static class FigureExtention
\r
{
\r
Figure shift(Point p);
\r
Figure centering(Point p);
\r
void draw();
\r
}
\r
public static class FigureExtention
\r
{
\r
+ public static Point getDatum(this Figure target)
\r
+ {
\r
+ return target.datum;
\r
+ }
\r
+ public static Point setDatum(this Figure target, Point p)
\r
+ {
\r
+ target.datum = p;
\r
+ return target.datum;
\r
+ }
\r
public static Figure shift(this Figure target, double x, double y)
\r
{
\r
return target.shift(new Point(x, y));
\r
public static Figure shift(this Figure target, double x, double y)
\r
{
\r
return target.shift(new Point(x, y));
\r