From 80cc8bfade5bc96452389fb933c2f5b5f1e45cf7 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Fri, 19 Jan 2018 19:56:10 +0300 Subject: [PATCH] In progress... --- src/Chart.vala | 2 +- src/Font.vala | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/src/Chart.vala b/src/Chart.vala index 92d6565..b82c205 100644 --- a/src/Chart.vala +++ b/src/Chart.vala @@ -59,7 +59,7 @@ namespace CairoChart { public Series[] series = {}; /** - * index of the 1'st shown series in a zoommed area. + * Index of the 1'st shown series in a zoommed area. */ public int zoom_1st_idx { get; protected set; default = 0; } diff --git a/src/Font.vala b/src/Font.vala index 054868d..229c387 100644 --- a/src/Font.vala +++ b/src/Font.vala @@ -1,20 +1,64 @@ namespace CairoChart { + /** + * Text font. + */ public class Font { + /** + * ``Font`` orientation. + */ public enum Orientation { + + /** + * Horizontal font/text orientation. + */ HORIZONTAL = 0, + + /** + * Vertical font/text orientation. + */ VERTICAL } + /** + * ``Font`` Style. + */ public struct Style { + + /** + * A font family name, encoded in UTF-8. + */ string family; + + /** + * The slant for the font. + */ Cairo.FontSlant slant; + + /** + * The weight for the font. + */ Cairo.FontWeight weight; - Orientation orientation; + /** + * The new font size, in user space units. + */ double size; + /** + * Font/Text orientation. + */ + Orientation orientation; + + /** + * Constructs a new ``Style``. + * @param family a font family name, encoded in UTF-8. + * @param slant the slant for the font. + * @param weight the weight for the font. + * @param size the new font size, in user space units. + * @param orientation font/text orientation. + */ public Style (string family = "Sans", Cairo.FontSlant slant = Cairo.FontSlant.NORMAL, Cairo.FontWeight weight = Cairo.FontWeight.NORMAL, @@ -27,5 +71,7 @@ namespace CairoChart { this.orientation = orientation; } } + + private Font () { } } }