summaryrefslogtreecommitdiffstats
path: root/Drawer.h
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-10-19 01:38:05 +0200
committerneoraider <devnull@localhost>2007-10-19 01:38:05 +0200
commit7b70cc94c7f2407f20786644141a097031b96e66 (patch)
treef691264c62d03c5fcda563694ddf13215ca54c55 /Drawer.h
parent9c732521732de895ec09ddb004877cd491067bf6 (diff)
downloadzoomedit-7b70cc94c7f2407f20786644141a097031b96e66.tar
zoomedit-7b70cc94c7f2407f20786644141a097031b96e66.zip
zoomedit: Einige Funktionen von draw.c in den Drawer verschoben.
Diffstat (limited to 'Drawer.h')
-rw-r--r--Drawer.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/Drawer.h b/Drawer.h
index 4cc0e2b..8dbac47 100644
--- a/Drawer.h
+++ b/Drawer.h
@@ -3,7 +3,7 @@
#include <gtk/gtk.h>
#include <gtk/gtkgl.h>
-
+#include "Vertex.h"
class Window;
@@ -17,6 +17,9 @@ class Drawer {
Window *window;
+ float scale;
+ float xTranslate, yTranslate;
+
// prevent shallow copy
Drawer(const Drawer &w);
const Drawer& operator=(const Drawer &w);
@@ -45,6 +48,24 @@ class Drawer {
void zoom(int zoom, float x = 0.5f, float y = 0.5f);
+ void imageToView(Vertex *v);
+ void viewToImage(Vertex *v);
+
+ float getImageWidth();
+ float getImageHeight();
+
+ float getXTranslate() {
+ return xTranslate;
+ }
+
+ float getYTranslate() {
+ return yTranslate;
+ }
+
+ float getScale() {
+ return scale;
+ }
+
GtkWidget *getWidget() {
return drawer;
}