diff options
Diffstat (limited to 'ganv')
-rw-r--r-- | ganv/Canvas.hpp | 20 | ||||
-rw-r--r-- | ganv/canvas.h | 20 |
2 files changed, 26 insertions, 14 deletions
diff --git a/ganv/Canvas.hpp b/ganv/Canvas.hpp index 56c1b8c..7b38af5 100644 --- a/ganv/Canvas.hpp +++ b/ganv/Canvas.hpp @@ -72,26 +72,18 @@ public: METHOD0(ganv_canvas, get_zoom); - /** Set the current zoom factor (pixels per unit). */ - void set_zoom(double pix_per_unit); + METHOD1(ganv_canvas, set_zoom, double, pix_per_unit); + METHOD1(ganv_canvas, set_font_size, double, points); + METHOD2(ganv_canvas, set_scale, double, zoom, double, points); - /** Zoom so all canvas contents are visible. */ - void zoom_full(); + METHOD0(ganv_canvas, zoom_full); METHODRET0(ganv_canvas, double, get_font_size) METHODRET0(ganv_canvas, double, get_default_font_size) - /** Set the current font size. */ - void set_font_size(double points); + METHOD1(ganv_canvas, export_dot, const char*, filename); - /** Set both the zoom factor and font size. */ - void set_zoom_and_font_size(double zoom, double points); - - /** Write a Graphviz DOT description of the canvas to @c filename. */ - void render_to_dot(const std::string& filename); - - /** Automatically arrange the canvas contents if Graphviz is available. */ - void arrange(); + METHOD0(ganv_canvas, arrange); METHOD2(ganv_canvas, move_contents_to, double, x, double, y); diff --git a/ganv/canvas.h b/ganv/canvas.h index 9d0402e..0b3583a 100644 --- a/ganv/canvas.h +++ b/ganv/canvas.h @@ -95,14 +95,27 @@ double ganv_canvas_get_default_font_size(const GanvCanvas* canvas); void +ganv_canvas_set_zoom(GanvCanvas* canvas, double zoom); + +void ganv_canvas_set_font_size(GanvCanvas* canvas, double points); void +ganv_canvas_set_scale(GanvCanvas* canvas, double zoom, double points); + +void ganv_canvas_set_direction(GanvCanvas* canvas, GanvDirection dir); void ganv_canvas_clear_selection(GanvCanvas* canvas); +void +ganv_canvas_arrange(GanvCanvas* canvas); + +/** Write a Graphviz DOT description of the canvas to @c filename. */ +void +ganv_canvas_export_dot(GanvCanvas* canvas, const char* filename); + typedef void (*GanvNodeFunction)(GanvNode* node, void* data); typedef void (*GanvEdgeFunction)(GanvEdge* edge); @@ -203,6 +216,13 @@ void ganv_canvas_set_scale(GanvCanvas* canvas, double zoom, double points); /** + * ganv_canvas_zoom_full: + * Zoom so all canvas contents are visible. + */ +void +ganv_canvas_zoom_full(GanvCanvas* canvas); + +/** * ganv_canvas_get_move_cursor: * Return the cursor to use while dragging canvas objects. */ |