public double size;\r
public int weight;\r
public Style style;\r
- public string[] family;\r
+ public string family;\r
\r
static Font()\r
{\r
size = 18;\r
weight = (int)Weight.normal;\r
style = Style.normal;\r
- family = new string[1];\r
+ //family = new string[1];\r
}\r
public Font(double size_, int weight_, Style style_, string family_)\r
{\r
size = size_;\r
weight = weight_;\r
style = style_;\r
- family = new string[1];\r
- family[0] = family_;\r
+ //family = new string[1];\r
+ family = family_;\r
}\r
public Font(string family_, double size_, int weight_, Style style_)\r
{\r
size = size_;\r
weight = weight_;\r
style = style_;\r
- family = new string[1];\r
- family[0] = family_;\r
+ //family = new string[1];\r
+ family = family_;\r
}\r
~Font()\r
{\r
}\r
}\r
\r
- public class Letters : Shape\r
+ public partial class Letters : Shape\r
{\r
protected string str_;\r
protected Font font_;\r
protected double width_, height_;\r
- public Point datum;\r
+ public Point datum { get; set; }\r
\r
- public enum HorizontalAlign { NOT_SPECIFIED=-1, TEXT_ALIGN_LEFT=0, TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT };\r
+ public enum HorizontalAlign { not_specified=-1, left=0, center, right };\r
+ //public const HorizontalAlign NOT_SPECIFIED=HorizontalAlign.not_specified, TEXT_ALIGN_LEFT=HorizontalAlign.left, TEXT_ALIGN_CENTER = HorizontalAlign.center, TEXT_ALIGN_RIGHT=HorizontalAlign.right;\r
public HorizontalAlign align;\r
\r
public Letters()\r
{\r
str_ = "";\r
font = Font.default_font;\r
- align = HorizontalAlign.TEXT_ALIGN_LEFT;\r
+ align = HorizontalAlign.left;\r
}\r
public Letters(String init_str)\r
{\r
str_ = init_str;\r
font_ = Font.default_font;\r
- align = HorizontalAlign.TEXT_ALIGN_LEFT;\r
+ align = HorizontalAlign.center;\r
}\r
public Letters(String init_str, Font init_font)\r
{\r
str_ = init_str;\r
font_ = init_font;\r
- align = HorizontalAlign.TEXT_ALIGN_LEFT;\r
+ align = HorizontalAlign.right;\r
}\r
~Letters()\r
{\r
public Figure centering(Point p)\r
{\r
datum = p;\r
- align = HorizontalAlign.TEXT_ALIGN_CENTER;\r
+ align = HorizontalAlign.center;\r
return this;\r
}\r
public Figure shift(Point p)\r
{\r
+ datum = datum + p;\r
return this;\r
}\r
public Letters locate(Point p)\r
}\r
public Letters locate(double x, double y)\r
{\r
- datum.set(x,y);\r
+ datum = new Point(x,y);\r
return this;\r
}\r
\r
public void draw()\r
{\r
- Main.drawable.letters(this, Color.white);\r
- }\r
- public void draw(Color c)\r
- {\r
- Main.drawable.letters(this, c);\r
+ Main.drawable.letters(this);\r
}\r
+\r
+ public Color fill { get; set; }\r
+ public Stroke stroke { get; set; }\r
+\r
}\r
\r
}\r