changeset 8636:ee70d438a5b4

[mq]: grfx
author John W. Eaton <jwe@octave.org>
date Thu, 29 Jan 2009 17:18:44 -0500
parents bef8f001032f
children 4385bb503467
files src/ChangeLog src/graphics.cc
diffstat 2 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Jan 29 22:01:49 2009 +0100
+++ b/src/ChangeLog	Thu Jan 29 17:18:44 2009 -0500
@@ -1,5 +1,9 @@
 2009-01-29  John W. Eaton  <jwe@octave.org>
 
+	* graphics.cc (properties::set_defaults): Also set
+	horizontalalignment, verticalalignmnt, and rotation properties for
+	new label objects here.
+
 	* ov-base-scalar.cc (octave_base_scalar<ST>::is_true (void) const):
 	Error if scalar is NaN.
 	* ov-base-mat.cc (octave_base_matrix<MT>::is_true (void) const):
--- a/src/graphics.cc	Thu Jan 29 22:01:49 2009 +0100
+++ b/src/graphics.cc	Thu Jan 29 17:18:44 2009 -0500
@@ -2550,19 +2550,27 @@
   xlabel = gh_manager::make_graphics_handle ("text", __myhandle__, false);
   ylabel = gh_manager::make_graphics_handle ("text", __myhandle__, false);
   zlabel = gh_manager::make_graphics_handle ("text", __myhandle__, false);
-
   title = gh_manager::make_graphics_handle ("text", __myhandle__, false);
 
   xset (xlabel.handle_value (), "handlevisibility", "off");
   xset (ylabel.handle_value (), "handlevisibility", "off");
   xset (zlabel.handle_value (), "handlevisibility", "off");
-
   xset (title.handle_value (), "handlevisibility", "off");
 
+  xset (xlabel.handle_value (), "horizontalalignment", "center");
+  xset (ylabel.handle_value (), "horizontalalignment", "center");
+  xset (zlabel.handle_value (), "horizontalalignment", "right");
+  xset (title.handle_value (), "horizontalalignment", "center");
+
+  xset (xlabel.handle_value (), "verticalalignment", "cap");
+  xset (ylabel.handle_value (), "verticalalignment", "bottom");
+  xset (title.handle_value (), "verticalalignment", "bottom");
+
+  xset (ylabel.handle_value (), "rotation", 90.0);
+
   adopt (xlabel.handle_value ());
   adopt (ylabel.handle_value ());
   adopt (zlabel.handle_value ());
-
   adopt (title.handle_value ());
 
   update_transform ();