michael@0: /***************************************************************************/ michael@0: /* */ michael@0: /* ftglyph.h */ michael@0: /* */ michael@0: /* FreeType convenience functions to handle glyphs (specification). */ michael@0: /* */ michael@0: /* Copyright 1996-2003, 2006, 2008, 2009, 2011, 2013 by */ michael@0: /* David Turner, Robert Wilhelm, and Werner Lemberg. */ michael@0: /* */ michael@0: /* This file is part of the FreeType project, and may only be used, */ michael@0: /* modified, and distributed under the terms of the FreeType project */ michael@0: /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ michael@0: /* this file you indicate that you have read the license and */ michael@0: /* understand and accept it fully. */ michael@0: /* */ michael@0: /***************************************************************************/ michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* This file contains the definition of several convenience functions */ michael@0: /* that can be used by client applications to easily retrieve glyph */ michael@0: /* bitmaps and outlines from a given face. */ michael@0: /* */ michael@0: /* These functions should be optional if you are writing a font server */ michael@0: /* or text layout engine on top of FreeType. However, they are pretty */ michael@0: /* handy for many other simple uses of the library. */ michael@0: /* */ michael@0: /*************************************************************************/ michael@0: michael@0: michael@0: #ifndef __FTGLYPH_H__ michael@0: #define __FTGLYPH_H__ michael@0: michael@0: michael@0: #include michael@0: #include FT_FREETYPE_H michael@0: michael@0: #ifdef FREETYPE_H michael@0: #error "freetype.h of FreeType 1 has been loaded!" michael@0: #error "Please fix the directory search order for header files" michael@0: #error "so that freetype.h of FreeType 2 is found first." michael@0: #endif michael@0: michael@0: michael@0: FT_BEGIN_HEADER michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /*
*/ michael@0: /* glyph_management */ michael@0: /* */ michael@0: /* */ michael@0: /* Glyph Management */ michael@0: /* */ michael@0: /* <Abstract> */ michael@0: /* Generic interface to manage individual glyph data. */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* This section contains definitions used to manage glyph data */ michael@0: /* through generic FT_Glyph objects. Each of them can contain a */ michael@0: /* bitmap, a vector outline, or even images in other formats. */ michael@0: /* */ michael@0: /*************************************************************************/ michael@0: michael@0: michael@0: /* forward declaration to a private type */ michael@0: typedef struct FT_Glyph_Class_ FT_Glyph_Class; michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Type> */ michael@0: /* FT_Glyph */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* Handle to an object used to model generic glyph images. It is a */ michael@0: /* pointer to the @FT_GlyphRec structure and can contain a glyph */ michael@0: /* bitmap or pointer. */ michael@0: /* */ michael@0: /* <Note> */ michael@0: /* Glyph objects are not owned by the library. You must thus release */ michael@0: /* them manually (through @FT_Done_Glyph) _before_ calling */ michael@0: /* @FT_Done_FreeType. */ michael@0: /* */ michael@0: typedef struct FT_GlyphRec_* FT_Glyph; michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Struct> */ michael@0: /* FT_GlyphRec */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* The root glyph structure contains a given glyph image plus its */ michael@0: /* advance width in 16.16 fixed-point format. */ michael@0: /* */ michael@0: /* <Fields> */ michael@0: /* library :: A handle to the FreeType library object. */ michael@0: /* */ michael@0: /* clazz :: A pointer to the glyph's class. Private. */ michael@0: /* */ michael@0: /* format :: The format of the glyph's image. */ michael@0: /* */ michael@0: /* advance :: A 16.16 vector that gives the glyph's advance width. */ michael@0: /* */ michael@0: typedef struct FT_GlyphRec_ michael@0: { michael@0: FT_Library library; michael@0: const FT_Glyph_Class* clazz; michael@0: FT_Glyph_Format format; michael@0: FT_Vector advance; michael@0: michael@0: } FT_GlyphRec; michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Type> */ michael@0: /* FT_BitmapGlyph */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* A handle to an object used to model a bitmap glyph image. This is */ michael@0: /* a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec. */ michael@0: /* */ michael@0: typedef struct FT_BitmapGlyphRec_* FT_BitmapGlyph; michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Struct> */ michael@0: /* FT_BitmapGlyphRec */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* A structure used for bitmap glyph images. This really is a */ michael@0: /* `sub-class' of @FT_GlyphRec. */ michael@0: /* */ michael@0: /* <Fields> */ michael@0: /* root :: The root @FT_Glyph fields. */ michael@0: /* */ michael@0: /* left :: The left-side bearing, i.e., the horizontal distance */ michael@0: /* from the current pen position to the left border of the */ michael@0: /* glyph bitmap. */ michael@0: /* */ michael@0: /* top :: The top-side bearing, i.e., the vertical distance from */ michael@0: /* the current pen position to the top border of the glyph */ michael@0: /* bitmap. This distance is positive for upwards~y! */ michael@0: /* */ michael@0: /* bitmap :: A descriptor for the bitmap. */ michael@0: /* */ michael@0: /* <Note> */ michael@0: /* You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have */ michael@0: /* `glyph->format == FT_GLYPH_FORMAT_BITMAP'. This lets you access */ michael@0: /* the bitmap's contents easily. */ michael@0: /* */ michael@0: /* The corresponding pixel buffer is always owned by @FT_BitmapGlyph */ michael@0: /* and is thus created and destroyed with it. */ michael@0: /* */ michael@0: typedef struct FT_BitmapGlyphRec_ michael@0: { michael@0: FT_GlyphRec root; michael@0: FT_Int left; michael@0: FT_Int top; michael@0: FT_Bitmap bitmap; michael@0: michael@0: } FT_BitmapGlyphRec; michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Type> */ michael@0: /* FT_OutlineGlyph */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* A handle to an object used to model an outline glyph image. This */ michael@0: /* is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */ michael@0: /* */ michael@0: typedef struct FT_OutlineGlyphRec_* FT_OutlineGlyph; michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Struct> */ michael@0: /* FT_OutlineGlyphRec */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* A structure used for outline (vectorial) glyph images. This */ michael@0: /* really is a `sub-class' of @FT_GlyphRec. */ michael@0: /* */ michael@0: /* <Fields> */ michael@0: /* root :: The root @FT_Glyph fields. */ michael@0: /* */ michael@0: /* outline :: A descriptor for the outline. */ michael@0: /* */ michael@0: /* <Note> */ michael@0: /* You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have */ michael@0: /* `glyph->format == FT_GLYPH_FORMAT_OUTLINE'. This lets you access */ michael@0: /* the outline's content easily. */ michael@0: /* */ michael@0: /* As the outline is extracted from a glyph slot, its coordinates are */ michael@0: /* expressed normally in 26.6 pixels, unless the flag */ michael@0: /* @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */ michael@0: /* */ michael@0: /* The outline's tables are always owned by the object and are */ michael@0: /* destroyed with it. */ michael@0: /* */ michael@0: typedef struct FT_OutlineGlyphRec_ michael@0: { michael@0: FT_GlyphRec root; michael@0: FT_Outline outline; michael@0: michael@0: } FT_OutlineGlyphRec; michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Function> */ michael@0: /* FT_Get_Glyph */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* A function used to extract a glyph image from a slot. Note that */ michael@0: /* the created @FT_Glyph object must be released with @FT_Done_Glyph. */ michael@0: /* */ michael@0: /* <Input> */ michael@0: /* slot :: A handle to the source glyph slot. */ michael@0: /* */ michael@0: /* <Output> */ michael@0: /* aglyph :: A handle to the glyph object. */ michael@0: /* */ michael@0: /* <Return> */ michael@0: /* FreeType error code. 0~means success. */ michael@0: /* */ michael@0: FT_EXPORT( FT_Error ) michael@0: FT_Get_Glyph( FT_GlyphSlot slot, michael@0: FT_Glyph *aglyph ); michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Function> */ michael@0: /* FT_Glyph_Copy */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* A function used to copy a glyph image. Note that the created */ michael@0: /* @FT_Glyph object must be released with @FT_Done_Glyph. */ michael@0: /* */ michael@0: /* <Input> */ michael@0: /* source :: A handle to the source glyph object. */ michael@0: /* */ michael@0: /* <Output> */ michael@0: /* target :: A handle to the target glyph object. 0~in case of */ michael@0: /* error. */ michael@0: /* */ michael@0: /* <Return> */ michael@0: /* FreeType error code. 0~means success. */ michael@0: /* */ michael@0: FT_EXPORT( FT_Error ) michael@0: FT_Glyph_Copy( FT_Glyph source, michael@0: FT_Glyph *target ); michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Function> */ michael@0: /* FT_Glyph_Transform */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* Transform a glyph image if its format is scalable. */ michael@0: /* */ michael@0: /* <InOut> */ michael@0: /* glyph :: A handle to the target glyph object. */ michael@0: /* */ michael@0: /* <Input> */ michael@0: /* matrix :: A pointer to a 2x2 matrix to apply. */ michael@0: /* */ michael@0: /* delta :: A pointer to a 2d vector to apply. Coordinates are */ michael@0: /* expressed in 1/64th of a pixel. */ michael@0: /* */ michael@0: /* <Return> */ michael@0: /* FreeType error code (if not 0, the glyph format is not scalable). */ michael@0: /* */ michael@0: /* <Note> */ michael@0: /* The 2x2 transformation matrix is also applied to the glyph's */ michael@0: /* advance vector. */ michael@0: /* */ michael@0: FT_EXPORT( FT_Error ) michael@0: FT_Glyph_Transform( FT_Glyph glyph, michael@0: FT_Matrix* matrix, michael@0: FT_Vector* delta ); michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Enum> */ michael@0: /* FT_Glyph_BBox_Mode */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* The mode how the values of @FT_Glyph_Get_CBox are returned. */ michael@0: /* */ michael@0: /* <Values> */ michael@0: /* FT_GLYPH_BBOX_UNSCALED :: */ michael@0: /* Return unscaled font units. */ michael@0: /* */ michael@0: /* FT_GLYPH_BBOX_SUBPIXELS :: */ michael@0: /* Return unfitted 26.6 coordinates. */ michael@0: /* */ michael@0: /* FT_GLYPH_BBOX_GRIDFIT :: */ michael@0: /* Return grid-fitted 26.6 coordinates. */ michael@0: /* */ michael@0: /* FT_GLYPH_BBOX_TRUNCATE :: */ michael@0: /* Return coordinates in integer pixels. */ michael@0: /* */ michael@0: /* FT_GLYPH_BBOX_PIXELS :: */ michael@0: /* Return grid-fitted pixel coordinates. */ michael@0: /* */ michael@0: typedef enum FT_Glyph_BBox_Mode_ michael@0: { michael@0: FT_GLYPH_BBOX_UNSCALED = 0, michael@0: FT_GLYPH_BBOX_SUBPIXELS = 0, michael@0: FT_GLYPH_BBOX_GRIDFIT = 1, michael@0: FT_GLYPH_BBOX_TRUNCATE = 2, michael@0: FT_GLYPH_BBOX_PIXELS = 3 michael@0: michael@0: } FT_Glyph_BBox_Mode; michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Enum> */ michael@0: /* ft_glyph_bbox_xxx */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* These constants are deprecated. Use the corresponding */ michael@0: /* @FT_Glyph_BBox_Mode values instead. */ michael@0: /* */ michael@0: /* <Values> */ michael@0: /* ft_glyph_bbox_unscaled :: See @FT_GLYPH_BBOX_UNSCALED. */ michael@0: /* ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS. */ michael@0: /* ft_glyph_bbox_gridfit :: See @FT_GLYPH_BBOX_GRIDFIT. */ michael@0: /* ft_glyph_bbox_truncate :: See @FT_GLYPH_BBOX_TRUNCATE. */ michael@0: /* ft_glyph_bbox_pixels :: See @FT_GLYPH_BBOX_PIXELS. */ michael@0: /* */ michael@0: #define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED michael@0: #define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS michael@0: #define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT michael@0: #define ft_glyph_bbox_truncate FT_GLYPH_BBOX_TRUNCATE michael@0: #define ft_glyph_bbox_pixels FT_GLYPH_BBOX_PIXELS michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Function> */ michael@0: /* FT_Glyph_Get_CBox */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* Return a glyph's `control box'. The control box encloses all the */ michael@0: /* outline's points, including Bézier control points. Though it */ michael@0: /* coincides with the exact bounding box for most glyphs, it can be */ michael@0: /* slightly larger in some situations (like when rotating an outline */ michael@0: /* that contains Bézier outside arcs). */ michael@0: /* */ michael@0: /* Computing the control box is very fast, while getting the bounding */ michael@0: /* box can take much more time as it needs to walk over all segments */ michael@0: /* and arcs in the outline. To get the latter, you can use the */ michael@0: /* `ftbbox' component, which is dedicated to this single task. */ michael@0: /* */ michael@0: /* <Input> */ michael@0: /* glyph :: A handle to the source glyph object. */ michael@0: /* */ michael@0: /* mode :: The mode that indicates how to interpret the returned */ michael@0: /* bounding box values. */ michael@0: /* */ michael@0: /* <Output> */ michael@0: /* acbox :: The glyph coordinate bounding box. Coordinates are */ michael@0: /* expressed in 1/64th of pixels if it is grid-fitted. */ michael@0: /* */ michael@0: /* <Note> */ michael@0: /* Coordinates are relative to the glyph origin, using the y~upwards */ michael@0: /* convention. */ michael@0: /* */ michael@0: /* If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode' */ michael@0: /* must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font */ michael@0: /* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */ michael@0: /* is another name for this constant. */ michael@0: /* */ michael@0: /* If the font is tricky and the glyph has been loaded with */ michael@0: /* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */ michael@0: /* reasonable values for the CBox it is necessary to load the glyph */ michael@0: /* at a large ppem value (so that the hinting instructions can */ michael@0: /* properly shift and scale the subglyphs), then extracting the CBox, */ michael@0: /* which can be eventually converted back to font units. */ michael@0: /* */ michael@0: /* Note that the maximum coordinates are exclusive, which means that */ michael@0: /* one can compute the width and height of the glyph image (be it in */ michael@0: /* integer or 26.6 pixels) as: */ michael@0: /* */ michael@0: /* { */ michael@0: /* width = bbox.xMax - bbox.xMin; */ michael@0: /* height = bbox.yMax - bbox.yMin; */ michael@0: /* } */ michael@0: /* */ michael@0: /* Note also that for 26.6 coordinates, if `bbox_mode' is set to */ michael@0: /* @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted, */ michael@0: /* which corresponds to: */ michael@0: /* */ michael@0: /* { */ michael@0: /* bbox.xMin = FLOOR(bbox.xMin); */ michael@0: /* bbox.yMin = FLOOR(bbox.yMin); */ michael@0: /* bbox.xMax = CEILING(bbox.xMax); */ michael@0: /* bbox.yMax = CEILING(bbox.yMax); */ michael@0: /* } */ michael@0: /* */ michael@0: /* To get the bbox in pixel coordinates, set `bbox_mode' to */ michael@0: /* @FT_GLYPH_BBOX_TRUNCATE. */ michael@0: /* */ michael@0: /* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */ michael@0: /* to @FT_GLYPH_BBOX_PIXELS. */ michael@0: /* */ michael@0: FT_EXPORT( void ) michael@0: FT_Glyph_Get_CBox( FT_Glyph glyph, michael@0: FT_UInt bbox_mode, michael@0: FT_BBox *acbox ); michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Function> */ michael@0: /* FT_Glyph_To_Bitmap */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* Convert a given glyph object to a bitmap glyph object. */ michael@0: /* */ michael@0: /* <InOut> */ michael@0: /* the_glyph :: A pointer to a handle to the target glyph. */ michael@0: /* */ michael@0: /* <Input> */ michael@0: /* render_mode :: An enumeration that describes how the data is */ michael@0: /* rendered. */ michael@0: /* */ michael@0: /* origin :: A pointer to a vector used to translate the glyph */ michael@0: /* image before rendering. Can be~0 (if no */ michael@0: /* translation). The origin is expressed in */ michael@0: /* 26.6 pixels. */ michael@0: /* */ michael@0: /* destroy :: A boolean that indicates that the original glyph */ michael@0: /* image should be destroyed by this function. It is */ michael@0: /* never destroyed in case of error. */ michael@0: /* */ michael@0: /* <Return> */ michael@0: /* FreeType error code. 0~means success. */ michael@0: /* */ michael@0: /* <Note> */ michael@0: /* This function does nothing if the glyph format isn't scalable. */ michael@0: /* */ michael@0: /* The glyph image is translated with the `origin' vector before */ michael@0: /* rendering. */ michael@0: /* */ michael@0: /* The first parameter is a pointer to an @FT_Glyph handle, that will */ michael@0: /* be _replaced_ by this function (with newly allocated data). */ michael@0: /* Typically, you would use (omitting error handling): */ michael@0: /* */ michael@0: /* */ michael@0: /* { */ michael@0: /* FT_Glyph glyph; */ michael@0: /* FT_BitmapGlyph glyph_bitmap; */ michael@0: /* */ michael@0: /* */ michael@0: /* // load glyph */ michael@0: /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); */ michael@0: /* */ michael@0: /* // extract glyph image */ michael@0: /* error = FT_Get_Glyph( face->glyph, &glyph ); */ michael@0: /* */ michael@0: /* // convert to a bitmap (default render mode + destroying old) */ michael@0: /* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */ michael@0: /* { */ michael@0: /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, */ michael@0: /* 0, 1 ); */ michael@0: /* if ( error ) // `glyph' unchanged */ michael@0: /* ... */ michael@0: /* } */ michael@0: /* */ michael@0: /* // access bitmap content by typecasting */ michael@0: /* glyph_bitmap = (FT_BitmapGlyph)glyph; */ michael@0: /* */ michael@0: /* // do funny stuff with it, like blitting/drawing */ michael@0: /* ... */ michael@0: /* */ michael@0: /* // discard glyph image (bitmap or not) */ michael@0: /* FT_Done_Glyph( glyph ); */ michael@0: /* } */ michael@0: /* */ michael@0: /* */ michael@0: /* Here another example, again without error handling: */ michael@0: /* */ michael@0: /* */ michael@0: /* { */ michael@0: /* FT_Glyph glyphs[MAX_GLYPHS] */ michael@0: /* */ michael@0: /* */ michael@0: /* ... */ michael@0: /* */ michael@0: /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ michael@0: /* error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || */ michael@0: /* FT_Get_Glyph ( face->glyph, &glyph[idx] ); */ michael@0: /* */ michael@0: /* ... */ michael@0: /* */ michael@0: /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ michael@0: /* { */ michael@0: /* FT_Glyph bitmap = glyphs[idx]; */ michael@0: /* */ michael@0: /* */ michael@0: /* ... */ michael@0: /* */ michael@0: /* // after this call, `bitmap' no longer points into */ michael@0: /* // the `glyphs' array (and the old value isn't destroyed) */ michael@0: /* FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 ); */ michael@0: /* */ michael@0: /* ... */ michael@0: /* */ michael@0: /* FT_Done_Glyph( bitmap ); */ michael@0: /* } */ michael@0: /* */ michael@0: /* ... */ michael@0: /* */ michael@0: /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ michael@0: /* FT_Done_Glyph( glyphs[idx] ); */ michael@0: /* } */ michael@0: /* */ michael@0: FT_EXPORT( FT_Error ) michael@0: FT_Glyph_To_Bitmap( FT_Glyph* the_glyph, michael@0: FT_Render_Mode render_mode, michael@0: FT_Vector* origin, michael@0: FT_Bool destroy ); michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Function> */ michael@0: /* FT_Done_Glyph */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* Destroy a given glyph. */ michael@0: /* */ michael@0: /* <Input> */ michael@0: /* glyph :: A handle to the target glyph object. */ michael@0: /* */ michael@0: FT_EXPORT( void ) michael@0: FT_Done_Glyph( FT_Glyph glyph ); michael@0: michael@0: /* */ michael@0: michael@0: michael@0: /* other helpful functions */ michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Section> */ michael@0: /* computations */ michael@0: /* */ michael@0: /*************************************************************************/ michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Function> */ michael@0: /* FT_Matrix_Multiply */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* Perform the matrix operation `b = a*b'. */ michael@0: /* */ michael@0: /* <Input> */ michael@0: /* a :: A pointer to matrix `a'. */ michael@0: /* */ michael@0: /* <InOut> */ michael@0: /* b :: A pointer to matrix `b'. */ michael@0: /* */ michael@0: /* <Note> */ michael@0: /* The result is undefined if either `a' or `b' is zero. */ michael@0: /* */ michael@0: FT_EXPORT( void ) michael@0: FT_Matrix_Multiply( const FT_Matrix* a, michael@0: FT_Matrix* b ); michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Function> */ michael@0: /* FT_Matrix_Invert */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* Invert a 2x2 matrix. Return an error if it can't be inverted. */ michael@0: /* */ michael@0: /* <InOut> */ michael@0: /* matrix :: A pointer to the target matrix. Remains untouched in */ michael@0: /* case of error. */ michael@0: /* */ michael@0: /* <Return> */ michael@0: /* FreeType error code. 0~means success. */ michael@0: /* */ michael@0: FT_EXPORT( FT_Error ) michael@0: FT_Matrix_Invert( FT_Matrix* matrix ); michael@0: michael@0: michael@0: /* */ michael@0: michael@0: michael@0: FT_END_HEADER michael@0: michael@0: #endif /* __FTGLYPH_H__ */ michael@0: michael@0: michael@0: /* END */ michael@0: michael@0: michael@0: /* Local Variables: */ michael@0: /* coding: utf-8 */ michael@0: /* End: */