OSDN Git Service

123
[psychlops/silverlight.git] / dev4 / psychlops / core / graphic / module.cs
index 85c49aa..a53a41a 100644 (file)
@@ -96,6 +96,7 @@ namespace Psychlops
                void polygon(Polygon drawee);\r
                void letters(Letters drawee);\r
                void image(Image drawee);\r
+               void group(Group drawee);\r
                void msg(string s, double x, double y, Color c);\r
        }\r
 \r
@@ -141,4 +142,43 @@ namespace Psychlops
                        UIElement poolNative(Canvas c);\r
                }\r
        }\r
+\r
+       public partial class Group : Internal.PrimitiveFigure\r
+       {\r
+               System.Collections.Generic.List<Figure> list;\r
+               System.Windows.Controls.Canvas cnvs;\r
+               bool AsyncBool;\r
+               public double rotation;\r
+               Point axis, scaling;\r
+\r
+               public Group()\r
+               {\r
+                       list = new System.Collections.Generic.List<Figure>();\r
+                       AsyncBool = false;\r
+                       initialize__();\r
+                       while (!AsyncBool) { }\r
+               }\r
+               public Group append(Figure fig)\r
+               {\r
+                       list.Add(fig);\r
+                       return this;\r
+               }\r
+\r
+               public Point datum { get; set; }\r
+               public Figure shift(Point p)\r
+               {\r
+                       datum = datum + p;\r
+                       return this;\r
+               }\r
+               public Figure centering(Point p)\r
+               {\r
+                       datum = p;\r
+                       return this;\r
+               }\r
+               public void draw()\r
+               {\r
+                       Main.drawable.group(this);\r
+               }\r
+       }\r
+\r
 }
\ No newline at end of file