summaryrefslogtreecommitdiffstats
path: root/Drawer.h
diff options
context:
space:
mode:
Diffstat (limited to 'Drawer.h')
-rw-r--r--Drawer.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/Drawer.h b/Drawer.h
index 8dbac47..bfebe10 100644
--- a/Drawer.h
+++ b/Drawer.h
@@ -4,6 +4,7 @@
#include <gtk/gtk.h>
#include <gtk/gtkgl.h>
#include "Vertex.h"
+#include "Renderer.h"
class Window;
@@ -15,6 +16,8 @@ class Drawer {
GtkAdjustment *hAdjustment, *vAdjustment;
int zoomExp;
+ Renderer renderer;
+
Window *window;
float scale;
@@ -30,6 +33,8 @@ class Drawer {
void updateHoveredPoint(float x, float y);
+ void render();
+
gint getWidth() const {
return drawingArea->allocation.width;
}
@@ -48,25 +53,25 @@ class Drawer {
void zoom(int zoom, float x = 0.5f, float y = 0.5f);
- void imageToView(Vertex *v);
- void viewToImage(Vertex *v);
+ void imageToView(Vertex *v) const;
+ void viewToImage(Vertex *v) const;
- float getImageWidth();
- float getImageHeight();
+ float getImageWidth() const;
+ float getImageHeight() const;
- float getXTranslate() {
+ float getXTranslate() const {
return xTranslate;
}
- float getYTranslate() {
+ float getYTranslate() const {
return yTranslate;
}
- float getScale() {
+ float getScale() const {
return scale;
}
- GtkWidget *getWidget() {
+ GtkWidget *getWidget() const {
return drawer;
}