Merge branch '#138_pre_post_draw' into develop
This commit is contained in:
commit
d39cfb7f04
|
@ -46,9 +46,11 @@ namespace Gtk.CairoChart {
|
|||
cur_y_max = cur_y_min;
|
||||
}
|
||||
|
||||
public virtual bool draw () {
|
||||
|
||||
public virtual void clear () {
|
||||
draw_background ();
|
||||
}
|
||||
|
||||
public virtual bool draw () {
|
||||
|
||||
cur_x_min = cur_y_min = 0.0;
|
||||
cur_x_max = width;
|
||||
|
|
|
@ -340,11 +340,14 @@ int main (string[] args) {
|
|||
double mov_x0 = 0, mov_y0 = 0;
|
||||
|
||||
da.draw.connect((context) => {
|
||||
// user's pre draw operations here...
|
||||
|
||||
chart.context = context;
|
||||
chart.width = da.get_allocated_width();
|
||||
chart.height = da.get_allocated_height();
|
||||
chart.clear();
|
||||
|
||||
// user's pre draw operations here...
|
||||
// ...
|
||||
|
||||
/*var ret = */chart.draw();
|
||||
|
||||
// user's post draw operations here...
|
||||
|
|
Loading…
Reference in New Issue