In progress...
This commit is contained in:
parent
7fcacaed2d
commit
89132d91fc
|
@ -59,7 +59,7 @@ namespace CairoChart {
|
||||||
public Series[] series = {};
|
public Series[] series = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Index of the 1'st shown series in a zoommed area.
|
* Index of the 1'st shown series in a zoomed area.
|
||||||
*/
|
*/
|
||||||
public int zoom_1st_idx { get; protected set; default = 0; }
|
public int zoom_1st_idx { get; protected set; default = 0; }
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,11 @@ namespace CairoChart {
|
||||||
*/
|
*/
|
||||||
string family;
|
string family;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The new font size, in user space units.
|
||||||
|
*/
|
||||||
|
double size;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The slant for the font.
|
* The slant for the font.
|
||||||
*/
|
*/
|
||||||
|
@ -41,11 +46,6 @@ namespace CairoChart {
|
||||||
*/
|
*/
|
||||||
Cairo.FontWeight weight;
|
Cairo.FontWeight weight;
|
||||||
|
|
||||||
/**
|
|
||||||
* The new font size, in user space units.
|
|
||||||
*/
|
|
||||||
double size;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Font/Text orientation.
|
* Font/Text orientation.
|
||||||
*/
|
*/
|
||||||
|
@ -54,21 +54,21 @@ namespace CairoChart {
|
||||||
/**
|
/**
|
||||||
* Constructs a new ``Style``.
|
* Constructs a new ``Style``.
|
||||||
* @param family a font family name, encoded in UTF-8.
|
* @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 slant the slant for the font.
|
||||||
* @param weight the weight 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.
|
* @param orientation font/text orientation.
|
||||||
*/
|
*/
|
||||||
public Style (string family = "Sans",
|
public Style (string family = "Sans",
|
||||||
|
double size = 10,
|
||||||
Cairo.FontSlant slant = Cairo.FontSlant.NORMAL,
|
Cairo.FontSlant slant = Cairo.FontSlant.NORMAL,
|
||||||
Cairo.FontWeight weight = Cairo.FontWeight.NORMAL,
|
Cairo.FontWeight weight = Cairo.FontWeight.NORMAL,
|
||||||
double size = 10,
|
|
||||||
Font.Orientation orientation = Font.Orientation.HORIZONTAL
|
Font.Orientation orientation = Font.Orientation.HORIZONTAL
|
||||||
) {
|
) {
|
||||||
this.family = family;
|
this.family = family;
|
||||||
|
this.size = size;
|
||||||
this.slant = slant;
|
this.slant = slant;
|
||||||
this.weight = weight;
|
this.weight = weight;
|
||||||
this.size = size;
|
|
||||||
this.orientation = orientation;
|
this.orientation = orientation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,12 +55,12 @@ namespace CairoChart {
|
||||||
Cairo.LineJoin join = Cairo.LineJoin.MITER,
|
Cairo.LineJoin join = Cairo.LineJoin.MITER,
|
||||||
Cairo.LineCap cap = Cairo.LineCap.ROUND
|
Cairo.LineCap cap = Cairo.LineCap.ROUND
|
||||||
) {
|
) {
|
||||||
|
this.color = color;
|
||||||
this.width = width;
|
this.width = width;
|
||||||
this.join = join;
|
|
||||||
this.cap = cap;
|
|
||||||
this.dashes = dashes;
|
this.dashes = dashes;
|
||||||
this.dash_offset = dash_offset;
|
this.dash_offset = dash_offset;
|
||||||
this.color = color;
|
this.join = join;
|
||||||
|
this.cap = cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,10 +68,10 @@ namespace CairoChart {
|
||||||
*/
|
*/
|
||||||
public void apply (Chart chart) {
|
public void apply (Chart chart) {
|
||||||
chart.color = color;
|
chart.color = color;
|
||||||
chart.ctx.set_line_join(join);
|
|
||||||
chart.ctx.set_line_cap(cap);
|
|
||||||
chart.ctx.set_line_width(width);
|
chart.ctx.set_line_width(width);
|
||||||
chart.ctx.set_dash(dashes, dash_offset);
|
chart.ctx.set_dash(dashes, dash_offset);
|
||||||
|
chart.ctx.set_line_join(join);
|
||||||
|
chart.ctx.set_line_cap(cap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,7 +249,7 @@ int main (string[] args) {
|
||||||
plot_chart3 (chart3);
|
plot_chart3 (chart3);
|
||||||
plot_chart4 (chart4);
|
plot_chart4 (chart4);
|
||||||
|
|
||||||
chart1.selection_style = Line.Style(Color(0.3, 0.3, 0.3, 0.7), 1);
|
chart1.selection_style = Line.Style(Color(0.3, 0.3, 0.3, 0.7));
|
||||||
|
|
||||||
var da = new DrawingArea();
|
var da = new DrawingArea();
|
||||||
da.set_events ( Gdk.EventMask.BUTTON_PRESS_MASK
|
da.set_events ( Gdk.EventMask.BUTTON_PRESS_MASK
|
||||||
|
|
Loading…
Reference in New Issue