00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <ft2build.h>
00020 #include FT_FREETYPE_H
00021 #include FT_INTERNAL_OBJECTS_H
00022 #include "pshpic.h"
00023
00024 #ifdef FT_CONFIG_OPTION_PIC
00025
00026
00027 void FT_Init_Class_pshinter_interface( FT_Library, PSHinter_Interface*);
00028
00029 void
00030 pshinter_module_class_pic_free( FT_Library library )
00031 {
00032 FT_PIC_Container* pic_container = &library->pic_container;
00033 FT_Memory memory = library->memory;
00034 if ( pic_container->pshinter )
00035 {
00036 FT_FREE( pic_container->pshinter );
00037 pic_container->pshinter = NULL;
00038 }
00039 }
00040
00041 FT_Error
00042 pshinter_module_class_pic_init( FT_Library library )
00043 {
00044 FT_PIC_Container* pic_container = &library->pic_container;
00045 FT_Error error = FT_Err_Ok;
00046 PSHinterPIC* container;
00047 FT_Memory memory = library->memory;
00048
00049
00050 if ( FT_ALLOC ( container, sizeof ( *container ) ) )
00051 return error;
00052 FT_MEM_SET( container, 0, sizeof(*container) );
00053 pic_container->pshinter = container;
00054
00055
00056 FT_Init_Class_pshinter_interface(library, &container->pshinter_interface);
00057
00058
00059 if(error)
00060 pshinter_module_class_pic_free(library);
00061 return error;
00062 }
00063
00064
00065 #endif
00066
00067