comparison src/graphics.cc @ 14483:6a736395ff7d

fix wrong axes extents for text elements with custom units (bug #35856) * graphics.cc (axes::properties::get_extent): Take units of text positions into account.
author Konstantinos Poulios <logari81@googlemail.com>
date Wed, 21 Mar 2012 01:21:25 +0100
parents 008a29999c3d
children 36cfbd23fe9f
comparison
equal deleted inserted replaced
14482:ceb77e004f9c 14483:6a736395ff7d
5575 text_handle = get_zlabel (); 5575 text_handle = get_zlabel ();
5576 5576
5577 text::properties& text_props = reinterpret_cast<text::properties&> 5577 text::properties& text_props = reinterpret_cast<text::properties&>
5578 (gh_manager::get_object (text_handle).get_properties ()); 5578 (gh_manager::get_object (text_handle).get_properties ());
5579 5579
5580 Matrix text_pos = text_props.get_position ().matrix_value (); 5580 Matrix text_pos = text_props.get_data_position ();
5581 text_pos = xform.transform (text_pos(0), text_pos(1), text_pos(2)); 5581 text_pos = xform.transform (text_pos(0), text_pos(1), text_pos(2));
5582 if (text_props.get_string ().is_empty ()) 5582 if (text_props.get_string ().is_empty ())
5583 { 5583 {
5584 ext(0) = std::min (ext(0), text_pos(0)); 5584 ext(0) = std::min (ext(0), text_pos(0));
5585 ext(1) = std::min (ext(1), text_pos(1)); 5585 ext(1) = std::min (ext(1), text_pos(1));