Cairo-Chart/src/Font.vala

55 lines
1.1 KiB
Vala
Raw Normal View History

2018-01-08 23:33:13 +03:00
namespace CairoChart {
2018-01-20 13:11:17 +03:00
/**
* ``Font`` style.
*/
public struct Font {
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-20 13:11:17 +03:00
string family;
2018-01-19 19:56:10 +03:00
2018-01-20 13:11:17 +03:00
/**
* The new font size, in user space units.
*/
double size;
2018-01-20 12:43:02 +03:00
2018-01-20 13:11:17 +03:00
/**
* The slant for the font.
*/
Cairo.FontSlant slant;
2018-01-19 19:56:10 +03:00
2018-01-20 13:11:17 +03:00
/**
* The weight for the font.
*/
Cairo.FontWeight weight;
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-20 13:27:10 +03:00
Gtk.Orientation orient;
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",
double size = 10,
Cairo.FontSlant slant = Cairo.FontSlant.NORMAL,
Cairo.FontWeight weight = Cairo.FontWeight.NORMAL,
2018-01-20 13:27:10 +03:00
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
}
}
}