2018-01-08 23:33:13 +03:00
|
|
|
namespace CairoChart {
|
|
|
|
|
2018-01-20 13:11:17 +03:00
|
|
|
/**
|
|
|
|
* ``Font`` style.
|
|
|
|
*/
|
2018-01-21 18:41:41 +03:00
|
|
|
[Compact]
|
|
|
|
public class Font : Object {
|
2018-01-08 23:33:13 +03:00
|
|
|
|
2018-01-19 19:56:10 +03:00
|
|
|
/**
|
2018-01-20 13:11:17 +03:00
|
|
|
* A font family name, encoded in UTF-8.
|
2018-01-19 19:56:10 +03:00
|
|
|
*/
|
2018-01-21 18:56:27 +03:00
|
|
|
public string family { get; set; }
|
2018-01-19 19:56:10 +03:00
|
|
|
|
2018-01-20 13:11:17 +03:00
|
|
|
/**
|
|
|
|
* The new font size, in user space units.
|
|
|
|
*/
|
2018-01-21 18:56:27 +03:00
|
|
|
public double size { get; set; }
|
2018-01-20 12:43:02 +03:00
|
|
|
|
2018-01-20 13:11:17 +03:00
|
|
|
/**
|
|
|
|
* The slant for the font.
|
|
|
|
*/
|
2018-01-21 18:56:27 +03:00
|
|
|
public Cairo.FontSlant slant { get; set; }
|
2018-01-19 19:56:10 +03:00
|
|
|
|
2018-01-20 13:11:17 +03:00
|
|
|
/**
|
|
|
|
* The weight for the font.
|
|
|
|
*/
|
2018-01-21 18:56:27 +03:00
|
|
|
public Cairo.FontWeight weight { get; set; }
|
2018-01-08 23:33:13 +03:00
|
|
|
|
2018-01-20 13:11:17 +03:00
|
|
|
/**
|
2018-01-20 13:27:10 +03:00
|
|
|
* Font/Text orientation.
|
2018-01-20 13:11:17 +03:00
|
|
|
*/
|
2018-01-21 18:56:27 +03:00
|
|
|
public Gtk.Orientation orient { get; set; }
|
2018-01-19 19:56:10 +03:00
|
|
|
|
2018-01-20 13:11:17 +03:00
|
|
|
/**
|
|
|
|
* Constructs a new ``Font``.
|
|
|
|
* @param family a font family name, encoded in UTF-8.
|
|
|
|
* @param size the new font size, in user space units.
|
|
|
|
* @param slant the slant for the font.
|
|
|
|
* @param weight the weight for the font.
|
2018-01-20 13:27:10 +03:00
|
|
|
* @param orient font/text orientation.
|
2018-01-20 13:11:17 +03:00
|
|
|
*/
|
|
|
|
public Font (string family = "Sans",
|
2018-01-21 18:41:41 +03:00
|
|
|
double size = 10,
|
|
|
|
Cairo.FontSlant slant = Cairo.FontSlant.NORMAL,
|
|
|
|
Cairo.FontWeight weight = Cairo.FontWeight.NORMAL,
|
|
|
|
Gtk.Orientation orient = Gtk.Orientation.HORIZONTAL
|
2018-01-20 13:11:17 +03:00
|
|
|
) {
|
|
|
|
this.family = family;
|
|
|
|
this.size = size;
|
|
|
|
this.slant = slant;
|
|
|
|
this.weight = weight;
|
2018-01-20 13:27:10 +03:00
|
|
|
this.orient = orient;
|
2018-01-08 23:33:13 +03:00
|
|
|
}
|
2018-01-21 18:41:41 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets a copy of the ``Font``.
|
|
|
|
*/
|
|
|
|
public Font copy () {
|
|
|
|
return new Font(family, size, slant, weight, orient);
|
|
|
|
}
|
2018-01-08 23:33:13 +03:00
|
|
|
}
|
|
|
|
}
|