2018-01-08 23:33:13 +03:00
|
|
|
namespace CairoChart {
|
|
|
|
|
2018-01-19 19:56:10 +03:00
|
|
|
/**
|
|
|
|
* Text font.
|
|
|
|
*/
|
2018-01-08 23:33:13 +03:00
|
|
|
public class Font {
|
|
|
|
|
2018-01-19 19:56:10 +03:00
|
|
|
/**
|
|
|
|
* ``Font`` orientation.
|
|
|
|
*/
|
2018-01-08 23:33:13 +03:00
|
|
|
public enum Orientation {
|
2018-01-19 19:56:10 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Horizontal font/text orientation.
|
|
|
|
*/
|
2018-01-08 23:33:13 +03:00
|
|
|
HORIZONTAL = 0,
|
2018-01-19 19:56:10 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Vertical font/text orientation.
|
|
|
|
*/
|
2018-01-08 23:33:13 +03:00
|
|
|
VERTICAL
|
|
|
|
}
|
|
|
|
|
2018-01-19 19:56:10 +03:00
|
|
|
/**
|
|
|
|
* ``Font`` Style.
|
|
|
|
*/
|
2018-01-08 23:33:13 +03:00
|
|
|
public struct Style {
|
2018-01-19 19:56:10 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A font family name, encoded in UTF-8.
|
|
|
|
*/
|
2018-01-08 23:33:13 +03:00
|
|
|
string family;
|
2018-01-19 19:56:10 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The slant for the font.
|
|
|
|
*/
|
2018-01-08 23:33:13 +03:00
|
|
|
Cairo.FontSlant slant;
|
2018-01-19 19:56:10 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The weight for the font.
|
|
|
|
*/
|
2018-01-08 23:33:13 +03:00
|
|
|
Cairo.FontWeight weight;
|
|
|
|
|
2018-01-19 19:56:10 +03:00
|
|
|
/**
|
|
|
|
* The new font size, in user space units.
|
|
|
|
*/
|
2018-01-08 23:33:13 +03:00
|
|
|
double size;
|
|
|
|
|
2018-01-19 19:56:10 +03:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2018-01-08 23:33:13 +03:00
|
|
|
public Style (string family = "Sans",
|
|
|
|
Cairo.FontSlant slant = Cairo.FontSlant.NORMAL,
|
|
|
|
Cairo.FontWeight weight = Cairo.FontWeight.NORMAL,
|
|
|
|
double size = 10,
|
|
|
|
Font.Orientation orientation = Font.Orientation.HORIZONTAL) {
|
|
|
|
this.family = family;
|
|
|
|
this.slant = slant;
|
|
|
|
this.weight = weight;
|
|
|
|
this.size = size;
|
|
|
|
this.orientation = orientation;
|
|
|
|
}
|
|
|
|
}
|
2018-01-19 19:56:10 +03:00
|
|
|
|
|
|
|
private Font () { }
|
2018-01-08 23:33:13 +03:00
|
|
|
}
|
|
|
|
}
|