X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=dev3%2Fpsychlops%2Fcore%2Fgraphic%2Fmodule.cs;h=7afeeaf212a2ae3b92d6e0333e985375b3c09d6f;hb=9827cf379e0eefec2919d5942a146baa50f75b95;hp=853717e074dbd40032c9aefe99bd70a6aea63380;hpb=0d510ea424330e5e8c71dbc4576611e5f256d956;p=psychlops%2Fsilverlight.git diff --git a/dev3/psychlops/core/graphic/module.cs b/dev3/psychlops/core/graphic/module.cs index 853717e..7afeeaf 100644 --- a/dev3/psychlops/core/graphic/module.cs +++ b/dev3/psychlops/core/graphic/module.cs @@ -43,6 +43,10 @@ namespace Psychlops { return new Point(lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z); } + public override string ToString() + { + return "X:"+ x.ToString() + " Y:"+ y.ToString() + " Z:"+ z.ToString(); + } } @@ -88,6 +92,11 @@ namespace Psychlops a = alpha; } + public override string ToString() + { + return "R:" + r.ToString() + " G:" + g.ToString() + " B:" + b.ToString() + " A:" + a.ToString(); + } + public static readonly Color black = new Color(0, 0, 0, 1), red = new Color(1, 0, 0, 1), @@ -121,12 +130,22 @@ namespace Psychlops public interface Figure { + Point datum { get; set; } Figure shift(Point p); Figure centering(Point p); void draw(); } public static class FigureExtention { + public static Point getDatum(this Figure target) + { + return target.datum; + } + public static Point setDatum(this Figure target, Point p) + { + target.datum = p; + return target.datum; + } public static Figure shift(this Figure target, double x, double y) { return target.shift(new Point(x, y));