fontlib.h

Go to the documentation of this file.
00001 // fontlib.h    -- Thatcher Ulrich <tu@tulrich.com> 2003
00002 
00003 // This source code has been donated to the Public Domain.  Do
00004 // whatever you want with it.
00005 
00006 // Internal interfaces to fontlib.
00007 
00008 
00009 #ifndef GNASH_FONTLIB_H
00010 #define GNASH_FONTLIB_H
00011 
00012 
00013 #include "container.h"
00014 #include "types.h"
00015 class tu_file;
00016 
00017 namespace gnash {
00018 
00019         class movie_def_impl;
00020         class texture_glyph;
00021 
00022         namespace fontlib
00023         {
00024                 // For adding fonts.
00025                 void    add_font(font* f);
00026 
00027                 // For drawing a textured glyph w/ current render transforms.
00028                 void    draw_glyph(const matrix& m, const texture_glyph& g, rgba color, int nominal_glyph_height);
00029 
00030                 // Return the pixel height of text, such that the
00031                 // texture glyphs are sampled 1-to-1 texels-to-pixels.
00032                 // I.e. the height of the glyph box, in texels.
00033                 float   get_texture_glyph_max_height(const font* f);
00034 
00035                 // Builds cached glyph textures from shape info.
00036                 void    generate_font_bitmaps(const std::vector<font*>& fonts, movie_definition* owner);
00037                 
00038                 // Save cached font data, including glyph textures, to a
00039                 // stream.
00040                 void    output_cached_data(
00041                         tu_file* out,
00042                         const std::vector<font*>& fonts,
00043                         movie_definition* owner,
00044                         const cache_options& options);
00045                 
00046                 // Load a stream containing previously-saved cachded font
00047                 // data, including glyph texture info.
00048                 void    input_cached_data(tu_file* in, const std::vector<font*>& fonts, movie_definition* owner);
00049                 
00050         }       // end namespace fontlib
00051 }       // end namespace gnash
00052 
00053 
00054 
00055 #endif // GNASH_FONTLIB_H
00056 
00057 // Local Variables:
00058 // mode: C++
00059 // c-basic-offset: 8 
00060 // tab-width: 8
00061 // indent-tabs-mode: t
00062 // End:

Generated on Thu Nov 23 22:31:31 2006 for Gnash by  doxygen 1.4.6