Mercurial > octave-nkf
comparison src/gl-render.cc @ 10402:9f2bf537a651
Implement text extent property
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Sun, 07 Mar 2010 21:00:07 +0000 |
parents | 12884915a8e4 |
children | 4bbd6f75f173 |
comparison
equal
deleted
inserted
replaced
10401:6d1e49abf95f | 10402:9f2bf537a651 |
---|---|
1663 it++; | 1663 it++; |
1664 } | 1664 } |
1665 | 1665 |
1666 // 3rd pass: draw remaining objects | 1666 // 3rd pass: draw remaining objects |
1667 | 1667 |
1668 glDisable (GL_DEPTH_TEST); | |
1668 for (it = obj_list.begin (); it != obj_list.end (); it++) | 1669 for (it = obj_list.begin (); it != obj_list.end (); it++) |
1669 { | 1670 { |
1670 graphics_object go = (*it); | 1671 graphics_object go = (*it); |
1671 | 1672 |
1672 set_clipping (go.get_properties ().is_clipping ()); | 1673 set_clipping (go.get_properties ().is_clipping ()); |
1673 draw (go); | 1674 draw (go); |
1674 } | 1675 } |
1676 glEnable (GL_DEPTH_TEST); | |
1675 | 1677 |
1676 set_clipping (false); | 1678 set_clipping (false); |
1677 // FIXME: finalize rendering (transparency processing) | 1679 // FIXME: finalize rendering (transparency processing) |
1678 // FIXME: draw zoom box, if needed | 1680 // FIXME: draw zoom box, if needed |
1679 } | 1681 } |
2666 return; | 2668 return; |
2667 | 2669 |
2668 set_font (props); | 2670 set_font (props); |
2669 set_color (props.get_color_rgb ()); | 2671 set_color (props.get_color_rgb ()); |
2670 | 2672 |
2671 // FIXME: take "units" into account | 2673 const Matrix pos = xform.scale (props.get_data_position ()); |
2672 const Matrix pos = xform.scale (props.get_position ().matrix_value ()); | |
2673 int halign = 0, valign = 0; | 2674 int halign = 0, valign = 0; |
2674 | 2675 |
2675 if (props.horizontalalignment_is ("center")) | 2676 if (props.horizontalalignment_is ("center")) |
2676 halign = 1; | 2677 halign = 1; |
2677 else if (props.horizontalalignment_is ("right")) | 2678 else if (props.horizontalalignment_is ("right")) |