diff src/graphics.h.in @ 7842:1357bcae6e29

added pixel<->coord transform in axes and use it for display of cursor position and zoom in fltk_backend
author Shai Ayal <shaiay@users.sourceforge.net>
date Mon, 25 Feb 2008 21:45:11 +0200
parents 4fb2db9c87dd
children 3d60445d3638
line wrap: on
line diff
--- a/src/graphics.h.in	Mon Feb 25 18:39:53 2008 +0200
+++ b/src/graphics.h.in	Mon Feb 25 21:45:11 2008 +0200
@@ -2492,6 +2492,13 @@
     Matrix get_opengl_matrix_2 (void) const { return x_gl_mat2; }
     Matrix get_transform_zlim (void) const { return x_zlim; }
 
+    ColumnVector pixel2coord (double px, double py) const
+    { return get_transform ().untransform (px, py, 0); }
+
+    ColumnVector coord2pixel (double x, double y, double z) const
+    { return get_transform ().transform (x, y, z); }
+
+
   private:
     scaler sx, sy, sz;
     Matrix x_render, x_render_inv;