self_rect = new Rectangle(wid, hei);\r
initialize__(wid, hei);\r
}\r
+ public Image(double wid, double hei)\r
+ {\r
+ self_rect = new Rectangle(Math.round(wid), Math.round(hei));\r
+ initialize__((int)Math.round(wid), (int)Math.round(hei));\r
+ }\r
\r
public Image set(int wid, int hei)\r
{\r
initialize__(wid, hei);\r
return this;\r
}\r
+ public Image set(double wid, double hei)\r
+ {\r
+ self_rect = new Rectangle(Math.round(wid), Math.round(hei));\r
+ initialize__((int)Math.round(wid), (int)Math.round(hei));\r
+ return this;\r
+ }\r
\r
public Figure shift(Point p)\r
{\r
buffer.SetPixel(x, y, col);\r
}\r
\r
+ public void release()\r
+ {\r
+ }\r
+\r
+ public void cache(bool on_off = true)\r
+ {\r
+ }\r
+\r
+ public void alpha(int x, int y, double a)\r
+ {\r
+ buffer.SetPixel(x, y, (byte)(a*255), buffer.GetPixel(x, y));\r
+ }\r
+\r
+ public void clear(Color col)\r
+ {\r
+ for (int y = 0; y < height; y++)\r
+ {\r
+ for (int x = 0; x < width; x++)\r
+ {\r
+ pix(x, y, col);\r
+ }\r
+ }\r
+ }\r
+\r
\r
public void field(System.Func<int, int, System.Windows.Media.Color> func)\r
{\r
public double getHcenter() { return width / 2.0; }\r
public double getVcenter() { return height / 2.0; }\r
\r
+ public double left { get { return datum.x; } }\r
+ public double right { get { return datum.x + width; } }\r
+ public double top { get { return datum.y; } }\r
+ public double bottom { get { return datum.y + height; } }\r
+ public double getLeft() { return left; }\r
+ public double getRight() { return right; }\r
+ public double getTop() { return top; }\r
+ public double getBottom() { return bottom; }\r
+\r
}\r
\r
\r