Hi,

I'd like to have in xournal beside the ruler tool a rectangle tool.
This would be most useful when highlighting formulas.
I'm currently using Shape Recognizer trying to make a rectangle with it.
But it only works sometimes, and there's no more frustrating tool than the
one that
works only sometimes.

I've made a quick fix to make ruler tool do exactly what I want
(but I loose ruler functionality doing so):
in xo-paint.cc:

@@ -333,6 +333,23 @@

 void finalize_stroke(void)
 {
+  if (ui.cur_brush->ruler) {
+    double x1 = ui.cur_path.coords[0];
+    double y1 = ui.cur_path.coords[1];
+    double x2 = ui.cur_path.coords[2];
+    double y2 = ui.cur_path.coords[3];
+    ui.cur_path.coords[2] = x2;
+    ui.cur_path.coords[3] = y1;
+    ui.cur_path.coords[4] = x2;
+    ui.cur_path.coords[5] = y2;
+    ui.cur_path.coords[6] = x1;
+    ui.cur_path.coords[7] = y2;
+    ui.cur_path.coords[8] = x1;
+    ui.cur_path.coords[9] = y1;
+    ui.cur_path.num_points = 5;
+    ui.cur_item->brush.variable_width = FALSE;
+  }
+
   if (ui.cur_path.num_points == 1) { // GnomeCanvas doesn't like
num_points=1
     ui.cur_path.coords[2] = ui.cur_path.coords[0]+0.1;
     ui.cur_path.coords[3] = ui.cur_path.coords[1];

Unfortunately I don't know how to edit the GUI to finish the job.
Could you please include this tool into xournal?

regards,
Oleh
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Xournal-devel mailing list
Xournal-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xournal-devel

Reply via email to