indexing description: "[ 3D counterpart to EM_FONT that can be used to render strings when working with Em3d. ]" author: "" date: "$Date$" revision: "$Revision$" deferred class EM3D_FONT feature -- Basic operations cache_string (a_string: STRING) is -- Chache implementation specific data needed to render `a_string -- Use this before compiling OpenGL display lists. deferred end render_string (a_string: STRING; a_pos: EM_VECTOR3D; a_point_size: DOUBLE; a_color: EM_COLOR) is -- Render `a_string' at `a_pos', using current font with `a_point_size' and `a_color' -- subject to all OpenGL transformations. -- `a_pos' is start of the baseline. -- This implies that the OpenGL modelview and projection matrices -- are set to an appropriate transformation. -- Something like gluOrtho (0, w, h, 0) should give the expected -- results with regard to the 2D equivalent of this function: -- {EM_TTF_FONT}.draw_string -- The modelview transformation can also easily be set using -- {EM_COORDINATE_FRAME}.set_opengl deferred end render_string_point_snapped (a_string: STRING; a_pos: EM_VECTOR3D; a_point_size: DOUBLE; a_color: EM_COLOR) is -- Same as `render_string', but tries to render `a_string' at integral coordinates to -- achieve greater visual quality. deferred end feature -- Measurements optimal_point_size: DOUBLE is -- Rendering strings using optimal_point_size and orthographic -- projection representing viewport dimensions should give the -- nicest results. deferred end line_skip (a_point_size: DOUBLE): DOUBLE is -- Line spacing for given `point_size' deferred end ascent (a_point_size: DOUBLE): DOUBLE is --Max ascent for given `point_size' deferred end descent (a_point_size: DOUBLE): DOUBLE is -- Max descent for given `point_size' deferred end baseline_offset (a_point_size: DOUBLE): DOUBLE is -- Offset of baseline from top boundary deferred end char_width (a_chr: CHARACTER; a_point_size: DOUBLE): DOUBLE is -- Width of `a_chr' in points deferred end string_width (a_string: STRING; a_point_size: DOUBLE): DOUBLE is -- Width of `string' in points deferred end string_height (a_string: STRING; a_point_size: DOUBLE): DOUBLE is -- Height of `string' in points deferred end end