diff --git a/src/Common.vala b/src/Common.vala index 99edbdc..c882426 100644 --- a/src/Common.vala +++ b/src/Common.vala @@ -61,8 +61,8 @@ namespace Gtk.CairoChart { [Compact] public class Text { public string text = ""; - public FontStyle style = new FontStyle (); - public Color color = new Color(); + public FontStyle style = FontStyle (); + public Color color = Color(); TextExtents get_extents (Cairo.Context context) { context.select_font_face (style.family, @@ -99,8 +99,8 @@ namespace Gtk.CairoChart { } public Text (string text = "", - FontStyle style = new FontStyle(), - Color color = new Color()) { + FontStyle style = FontStyle(), + Color color = Color()) { this.text = text; this.style = style; this.color = color; diff --git a/src/GtkChart.vala b/src/GtkChart.vala index 0640b61..c7a77b9 100644 --- a/src/GtkChart.vala +++ b/src/GtkChart.vala @@ -13,7 +13,7 @@ namespace Gtk.CairoChart { public Color bg_color; public bool show_legend = true; public Text title = new Text ("Cairo Chart"); - public Color border_color = new Color(0, 0, 0, 0.3); + public Color border_color = Color(0, 0, 0, 0.3); public class Legend { public enum Position { @@ -23,13 +23,13 @@ namespace Gtk.CairoChart { BOTTOM } public Position position = Position.TOP; - public FontStyle font_style = new FontStyle(); - public Color bg_color = new Color(1, 1, 1); + public FontStyle font_style = FontStyle(); + public Color bg_color = Color(1, 1, 1); public LineStyle border_style = new LineStyle (); public double indent = 5; public Legend () { - border_style.color = new Color (0, 0, 0, 0.3); + border_style.color = Color (0, 0, 0, 0.3); } } @@ -40,7 +40,7 @@ namespace Gtk.CairoChart { protected LineStyle selection_style = new LineStyle (); public Chart () { - bg_color = new Color (1, 1, 1); + bg_color = Color (1, 1, 1); } protected Double128 cur_x_min = 0.0; @@ -108,7 +108,7 @@ namespace Gtk.CairoChart { if (context != null) { set_source_rgba (bg_color); context.paint(); - set_source_rgba (new Color (0, 0, 0, 1)); + set_source_rgba (Color (0, 0, 0, 1)); } } diff --git a/src/Series.vala b/src/Series.vala index c1299b2..db74ffd 100644 --- a/src/Series.vala +++ b/src/Series.vala @@ -82,8 +82,8 @@ namespace Gtk.CairoChart { } default = 2; } - public FontStyle font_style = new FontStyle (); - public Color color = new Color (); + public FontStyle font_style = FontStyle (); + public Color color = Color (); public LineStyle line_style = new LineStyle (); public double font_indent = 5; @@ -153,17 +153,17 @@ namespace Gtk.CairoChart { grid.line_style.color = _color; grid.line_style.color.alpha = 0.5; } - default = new Color (0.0, 0.0, 0.0, 1.0); + default = Color (0.0, 0.0, 0.0, 1.0); } public Series () { } public class LabelStyle { - FontStyle font_style = new FontStyle(); + FontStyle font_style = FontStyle(); LineStyle frame_line_style = new LineStyle(); - Color bg_color = new Color(); - Color frame_color = new Color(); + Color bg_color = Color(); + Color frame_color = Color(); } } }