Content-type: text/html Manpage of FT_Glyph_To_Bitmap

FT_Glyph_To_Bitmap

Section: Misc. Reference Manual Pages (3)
Index Return to Main Contents
 

NAME

FT_Glyph_To_Bitmap  

DESCRIPTION

Converts a given glyph object to a bitmap glyph object.

Input / Output:

the_glyph :: A pointer to a handle to the target glyph.

Input:

render_mode :: A set of bit flags that describe how the data is

origin :: A pointer to a vector used to translate the glyph image before rendering. Can be 0 (if no translation). The origin is expressed in 26.6 pixels.

destroy :: A boolean that indicates that the original glyph image should be destroyed by this function. It is never destroyed in case of error. Converts a given glyph object to a bitmap glyph object.

Input / Output:

the_glyph :: A pointer to a handle to the target glyph.

Input:

render_mode :: A set of bit flags that describe how the data is

origin :: A pointer to a vector used to translate the glyph image before rendering. Can be 0 (if no translation). The origin is expressed in 26.6 pixels.

destroy :: A boolean that indicates that the original glyph image should be destroyed by this function. It is never destroyed in case of error.

Notes: The glyph image is translated with the `origin' vector before rendering. In case of error, it it translated back to its original position and the glyph is left untouched. The first parameter is a pointer to a FT_Glyph handle, that will be replaced by this function. Typically, you would use (omitting error handling): { FT_Glyph glyph; FT_BitmapGlyph glyph_bitmap; // load glyph error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); // extract glyph image error = FT_Get_Glyph( face->glyph, ); // convert to a bitmap (default render mode + destroy old) if ( glyph->format != ft_glyph_format_bitmap ) { error = FT_Glyph_To_Bitmap( , ft_render_mode_default, 0, 1 ); if ( error ) // glyph unchanged ... } // access bitmap content by typecasting glyph_bitmap = (FT_BitmapGlyph)glyph; // do funny stuff with it, like blitting/drawing ... // discard glyph image (bitmap or not) FT_Done_Glyph( glyph ); } This function will always fail if the glyph's format isn't scalable. FT_EXPORT( FT_Error ) FT_Glyph_To_Bitmap( FT_Glyph* the_glyph, FT_ULong render_mode, FT_Vector* origin, FT_Bool destroy );  

RETURNS

FreeType error code. 0 means success.  

VERSION

This documentation was generated for Freetype 2.0.4 by autodocbook (http://www.stillhq.com). Autodocbook is (c) Michael Still 2001.
      

AUTHOR

Copyright 1996-2000 by David Turner, Robert Wilhelm, and Werner Lemberg.
    

This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully.  

BUGS

Please report errors in this documentation, and Freetype itself to freetype@freetype.org


 

Index

NAME
DESCRIPTION
RETURNS
VERSION
AUTHOR
BUGS

This document was created by man2html, using the manual pages.
Time: 04:44:37 GMT, July 26, 2001