diff libinterp/interpfcn/graphics.cc @ 16206:9ba5c5ed3aeb

Add new verticalalignment option 'cap' for OpenGL plotting. * libinterp/interp-core/txt-eng-ft.cc(ft_render::text_to_pixels): Implement new 'cap' vertical alignment which is glyph_max_height - glyph_descender_height. This approximates height of a capital letter. * libinterp/interpfcn/graphics.cc (text::properties::update_text_extent): Add 'cap' to if/else if/ tree checking possible verticalalignment options.
author Rik <rik@octave.org>
date Wed, 06 Mar 2013 15:10:22 -0800
parents 92f8bfae9b13
children d81ef5e64cf1
line wrap: on
line diff
--- a/libinterp/interpfcn/graphics.cc	Wed Mar 06 12:14:11 2013 -0800
+++ b/libinterp/interpfcn/graphics.cc	Wed Mar 06 15:10:22 2013 -0800
@@ -7022,12 +7022,14 @@
   else if (horizontalalignment_is ("right"))
     halign = 2;
 
-  if (verticalalignment_is ("top"))
+  if (verticalalignment_is ("middle"))
+    valign = 1;
+  else if (verticalalignment_is ("top"))
     valign = 2;
   else if (verticalalignment_is ("baseline"))
     valign = 3;
-  else if (verticalalignment_is ("middle"))
-    valign = 1;
+  else if (verticalalignment_is ("cap"))
+    valign = 4;
 
   Matrix bbox;