In progress...
This commit is contained in:
parent
35018eeb4d
commit
9004e4e835
|
@ -180,7 +180,7 @@ namespace CairoChart {
|
|||
* @param rect selection square.
|
||||
*/
|
||||
public virtual void draw_selection (Cairo.Rectangle rect) {
|
||||
selection_style.set(this);
|
||||
selection_style.apply(this);
|
||||
ctx.rectangle (rect.x, rect.y, rect.width, rect.height);
|
||||
ctx.stroke();
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ namespace CairoChart {
|
|||
var low = Point128(chart.plarea.x + chart.plarea.width, chart.plarea.y + chart.plarea.height); // low and high
|
||||
var high = Point128(chart.plarea.x, chart.plarea.y); // points of the cursor
|
||||
unowned CursorCross[] ccs = cursors_crossings[cci].crossings;
|
||||
cursor_style.line_style.set(chart);
|
||||
cursor_style.line_style.apply(chart);
|
||||
for (var ci = 0, max_ci = ccs.length; ci < max_ci; ++ci) {
|
||||
var si = ccs[ci].series_index;
|
||||
var s = chart.series[si];
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace CairoChart {
|
|||
chart.color = bg_color;
|
||||
chart.ctx.rectangle (x0, y0, width, height);
|
||||
chart.ctx.fill();
|
||||
border_style.set(chart);
|
||||
border_style.apply(chart);
|
||||
chart.ctx.move_to (x0, y0);
|
||||
chart.ctx.rel_line_to (width, 0);
|
||||
chart.ctx.rel_line_to (0, height);
|
||||
|
@ -151,7 +151,7 @@ namespace CairoChart {
|
|||
|
||||
// series line style
|
||||
chart.ctx.move_to (x, y - title_sz.height / 2);
|
||||
s.line_style.set(chart);
|
||||
s.line_style.apply(chart);
|
||||
chart.ctx.rel_line_to (line_length, 0);
|
||||
chart.ctx.stroke();
|
||||
s.marker.draw_at_pos (chart, x + line_length / 2, y - title_sz.height / 2);
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace CairoChart {
|
|||
this.color = color;
|
||||
}
|
||||
|
||||
public void set (Chart chart) {
|
||||
public void apply (Chart chart) {
|
||||
chart.color = color;
|
||||
chart.ctx.set_line_join(join);
|
||||
chart.ctx.set_line_cap(cap);
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace CairoChart {
|
|||
|
||||
public virtual void draw () {
|
||||
var points = Math.sort_points(this, sort);
|
||||
line_style.set(chart);
|
||||
line_style.apply(chart);
|
||||
// draw series line
|
||||
for (int i = 1; i < points.length; ++i) {
|
||||
Point c, d;
|
||||
|
@ -289,7 +289,7 @@ namespace CairoChart {
|
|||
// 6. Draw grid lines to the place.zoom_y_min.
|
||||
var line_style = grid.line_style;
|
||||
if (joint_x) line_style.color = Color(0, 0, 0, 0.5);
|
||||
line_style.set(chart);
|
||||
line_style.apply(chart);
|
||||
double y = chart.evarea.y + chart.evarea.height - max_rec_height - axis_x.font_spacing - (axis_x.title.text == "" ? 0 : sz.height + axis_x.font_spacing);
|
||||
ctx.move_to (scr_x, y);
|
||||
if (joint_x)
|
||||
|
@ -317,7 +317,7 @@ namespace CairoChart {
|
|||
// 6. Draw grid lines to the place.zoom_y_max.
|
||||
var line_style = grid.line_style;
|
||||
if (joint_x) line_style.color = Color(0, 0, 0, 0.5);
|
||||
line_style.set(chart);
|
||||
line_style.apply(chart);
|
||||
double y = chart.evarea.y + max_rec_height + axis_x.font_spacing + (axis_x.title.text == "" ? 0 : sz.height + axis_x.font_spacing);
|
||||
ctx.move_to (scr_x, y);
|
||||
if (joint_x)
|
||||
|
@ -426,7 +426,7 @@ namespace CairoChart {
|
|||
// 6. Draw grid lines to the place.zoom_x_min.
|
||||
var line_style = grid.line_style;
|
||||
if (joint_y) line_style.color = Color(0, 0, 0, 0.5);
|
||||
line_style.set(chart);
|
||||
line_style.apply(chart);
|
||||
double x = chart.evarea.x + max_rec_width + axis_y.font_spacing + (axis_y.title.text == "" ? 0 : sz.width + axis_y.font_spacing);
|
||||
ctx.move_to (x, scr_y);
|
||||
if (joint_y)
|
||||
|
@ -442,7 +442,7 @@ namespace CairoChart {
|
|||
// 6. Draw grid lines to the place.zoom_x_max.
|
||||
var line_style = grid.line_style;
|
||||
if (joint_y) line_style.color = Color(0, 0, 0, 0.5);
|
||||
line_style.set(chart);
|
||||
line_style.apply(chart);
|
||||
double x = chart.evarea.x + chart.evarea.width - max_rec_width - axis_y.font_spacing - (axis_y.title.text == "" ? 0 : sz.width + axis_y.font_spacing);
|
||||
ctx.move_to (x, scr_y);
|
||||
if (joint_y)
|
||||
|
|
Loading…
Reference in New Issue