comparison 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
comparison
equal deleted inserted replaced
16204:92f8bfae9b13 16206:9ba5c5ed3aeb
7020 if (horizontalalignment_is ("center")) 7020 if (horizontalalignment_is ("center"))
7021 halign = 1; 7021 halign = 1;
7022 else if (horizontalalignment_is ("right")) 7022 else if (horizontalalignment_is ("right"))
7023 halign = 2; 7023 halign = 2;
7024 7024
7025 if (verticalalignment_is ("top")) 7025 if (verticalalignment_is ("middle"))
7026 valign = 1;
7027 else if (verticalalignment_is ("top"))
7026 valign = 2; 7028 valign = 2;
7027 else if (verticalalignment_is ("baseline")) 7029 else if (verticalalignment_is ("baseline"))
7028 valign = 3; 7030 valign = 3;
7029 else if (verticalalignment_is ("middle")) 7031 else if (verticalalignment_is ("cap"))
7030 valign = 1; 7032 valign = 4;
7031 7033
7032 Matrix bbox; 7034 Matrix bbox;
7033 7035
7034 // FIXME: string should be parsed only when modified, for efficiency 7036 // FIXME: string should be parsed only when modified, for efficiency
7035 7037