OSDN Git Service

pooling
[psychlops/silverlight.git] / dev4 / psychlops / core / graphic / shape.cs
index d6ec793..9cebe91 100644 (file)
@@ -74,15 +74,17 @@ namespace Psychlops{
                {\r
                        set(v1, v2);\r
                }\r
-               public void set(double x1, double y1, double x2, double y2)\r
+               public Line set(double x1, double y1, double x2, double y2)\r
                {\r
                        begin.set(x1, y1);\r
                        end.set(x2, y2);\r
+                       return this;\r
                }\r
-               public void set(Point v1, Point v2)\r
+               public Line set(Point v1, Point v2)\r
                {\r
                        begin = v1;\r
                        end   = v2;\r
+                       return this;\r
                }\r
 \r
                public Figure shift(Point p)\r
@@ -101,7 +103,7 @@ namespace Psychlops{
                        return this;\r
                }\r
 \r
-               public void draw()\r
+               public virtual void draw()\r
                {\r
                        Main.drawable.line(this);\r
                }\r
@@ -200,7 +202,7 @@ namespace Psychlops{
                        return this;\r
                }\r
 \r
-               public void draw()\r
+               public virtual void draw()\r
                {\r
                        Main.drawable.rect(this);\r
                }\r
@@ -304,6 +306,13 @@ namespace Psychlops{
                        ydiameter = hei;\r
                        return this;\r
                }\r
+               public Ellipse resize(double width, double height)\r
+               {\r
+                       Point po = center;\r
+                       set(width, height);\r
+                       centering(po);\r
+                       return this;\r
+               }\r
                public Figure shift(Point p)\r
                {\r
                        datum += p;\r
@@ -315,7 +324,7 @@ namespace Psychlops{
                        return this;\r
                }\r
 \r
-               public void draw()\r
+               public virtual void draw()\r
                {\r
                        Main.drawable.ellipse(this);\r
                }\r
@@ -387,7 +396,7 @@ namespace Psychlops{
                        return this;\r
                }\r
 \r
-               public void draw()\r
+               public virtual void draw()\r
                {\r
                        Main.drawable.polygon(this);\r
                }\r