summaryrefslogtreecommitdiffstats
path: root/src/Canvas.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-07-30 21:14:41 +0200
committerDavid Robillard <d@drobilla.net>2020-07-30 21:14:41 +0200
commit1d33505fa45fe69010719e45546de4523254d510 (patch)
treef3849dcfa78f32fc2cead41b686b06bfb1d294fd /src/Canvas.cpp
parent6d41e6aad3255a62af3c1b566921eedca6dad931 (diff)
downloadganv-1d33505fa45fe69010719e45546de4523254d510.tar.gz
ganv-1d33505fa45fe69010719e45546de4523254d510.tar.bz2
ganv-1d33505fa45fe69010719e45546de4523254d510.zip
Expand canvas automatically to fit nodes
Diffstat (limited to 'src/Canvas.cpp')
-rw-r--r--src/Canvas.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Canvas.cpp b/src/Canvas.cpp
index 73e32bc..744fe78 100644
--- a/src/Canvas.cpp
+++ b/src/Canvas.cpp
@@ -1993,6 +1993,13 @@ ganv_canvas_class_init(GanvCanvasClass* klass)
}
void
+ganv_canvas_get_size(GanvCanvas* canvas, double* width, double* height)
+{
+ *width = canvas->impl->width;
+ *height = canvas->impl->height;
+}
+
+void
ganv_canvas_resize(GanvCanvas* canvas, double width, double height)
{
if (width != canvas->impl->width || height != canvas->impl->height) {