这篇教程C++ FT_GLYPH函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中FT_GLYPH函数的典型用法代码示例。如果您正苦于以下问题:C++ FT_GLYPH函数的具体用法?C++ FT_GLYPH怎么用?C++ FT_GLYPH使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了FT_GLYPH函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ft_outline_glyph_done ft_outline_glyph_done( FT_Glyph outline_glyph ) { FT_OutlineGlyph glyph = (FT_OutlineGlyph)outline_glyph; FT_Outline_Done( FT_GLYPH( glyph )->library, &glyph->outline ); }
开发者ID:7heaven,项目名称:softart,代码行数:7,
示例2: ft_bitmap_glyph_init ft_bitmap_glyph_init( FT_Glyph bitmap_glyph, FT_GlyphSlot slot ) { FT_BitmapGlyph glyph = (FT_BitmapGlyph)bitmap_glyph; FT_Error error = FT_Err_Ok; FT_Library library = FT_GLYPH( glyph )->library; if ( slot->format != FT_GLYPH_FORMAT_BITMAP ) { error = FT_Err_Invalid_Glyph_Format; goto Exit; } glyph->left = slot->bitmap_left; glyph->top = slot->bitmap_top; /* do lazy copying whenever possible */ if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) { glyph->bitmap = slot->bitmap; slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; } else { FT_Bitmap_New( &glyph->bitmap ); error = FT_Bitmap_Copy( library, &slot->bitmap, &glyph->bitmap ); } Exit: return error; }
开发者ID:7heaven,项目名称:softart,代码行数:32,
示例3: ft_bitmap_glyph_initstaticFT_Error ft_bitmap_glyph_init(FT_BitmapGlyph glyph, FT_GlyphSlot slot){ FT_Error error = FT_Err_Ok; FT_Library library = FT_GLYPH(glyph)->library; FT_Memory memory = library->memory; if(slot->format != ft_glyph_format_bitmap) { error = FT_Err_Invalid_Glyph_Format; goto Exit; } /* grab the bitmap in the slot - do lazy copying whenever possible */ glyph->bitmap = slot->bitmap; glyph->left = slot->bitmap_left; glyph->top = slot->bitmap_top; if(slot->flags & ft_glyph_own_bitmap) { slot->flags &= ~ft_glyph_own_bitmap; } else { /* copy the bitmap into a new buffer */ error = ft_bitmap_copy(memory, &slot->bitmap, &glyph->bitmap); }Exit: return error;}
开发者ID:Diskutant,项目名称:RTCW-SP,代码行数:33,
示例4: ft_outline_glyph_init ft_outline_glyph_init( FT_Glyph outline_glyph, FT_GlyphSlot slot ) { FT_OutlineGlyph glyph = (FT_OutlineGlyph)outline_glyph; FT_Error error = FT_Err_Ok; FT_Library library = FT_GLYPH( glyph )->library; FT_Outline* source = &slot->outline; FT_Outline* target = &glyph->outline; /* check format in glyph slot */ if ( slot->format != FT_GLYPH_FORMAT_OUTLINE ) { error = FT_Err_Invalid_Glyph_Format; goto Exit; } /* allocate new outline */ error = FT_Outline_New( library, source->n_points, source->n_contours, &glyph->outline ); if ( error ) goto Exit; FT_Outline_Copy( source, target ); Exit: return error; }
开发者ID:7heaven,项目名称:softart,代码行数:28,
示例5: ft_bitmap_glyph_init ft_bitmap_glyph_init( FT_Glyph bitmap_glyph, FT_GlyphSlot slot ) { FT_BitmapGlyph glyph = (FT_BitmapGlyph)bitmap_glyph; FT_Error error = FT_Err_Ok; FT_Library library = FT_GLYPH( glyph )->library; FT_Memory memory = library->memory; if ( slot->format != FT_GLYPH_FORMAT_BITMAP ) { error = FT_Err_Invalid_Glyph_Format; goto Exit; } /* grab the bitmap in the slot - do lazy copying whenever possible */ glyph->bitmap = slot->bitmap; glyph->left = slot->bitmap_left; glyph->top = slot->bitmap_top; if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; else { /* copy the bitmap into a new buffer */ error = ft_bitmap_copy( memory, &slot->bitmap, &glyph->bitmap ); } Exit: return error; }
开发者ID:Miguel-J,项目名称:eneboo-core,代码行数:31,
示例6: ft_bitmap_glyph_done ft_bitmap_glyph_done( FT_Glyph bitmap_glyph ) { FT_BitmapGlyph glyph = (FT_BitmapGlyph)bitmap_glyph; FT_Library library = FT_GLYPH( glyph )->library; FT_Bitmap_Done( library, &glyph->bitmap ); }
开发者ID:7heaven,项目名称:softart,代码行数:8,
示例7: ft_bitmap_glyph_done ft_bitmap_glyph_done( FT_Glyph bitmap_glyph ) { FT_BitmapGlyph glyph = (FT_BitmapGlyph)bitmap_glyph; FT_Memory memory = FT_GLYPH( glyph )->library->memory; FT_FREE( glyph->bitmap.buffer ); }
开发者ID:Miguel-J,项目名称:eneboo-core,代码行数:8,
示例8: ft_bitmap_glyph_donestaticvoid ft_bitmap_glyph_done(FT_BitmapGlyph glyph){ FT_Memory memory = FT_GLYPH(glyph)->library->memory; FREE(glyph->bitmap.buffer);}
开发者ID:Diskutant,项目名称:RTCW-SP,代码行数:8,
示例9: ft_outline_glyph_copy static FT_Error ft_outline_glyph_copy( FT_OutlineGlyph source, FT_OutlineGlyph target ) { FT_Error error; FT_Library library = FT_GLYPH( source )->library; error = FT_Outline_New( library, source->outline.n_points, source->outline.n_contours, &target->outline ); if ( !error ) FT_Outline_Copy( &source->outline, &target->outline ); return error; }
开发者ID:opieproject,项目名称:qte-opie,代码行数:15,
示例10: ft_outline_glyph_initstaticFT_Error ft_outline_glyph_init(FT_OutlineGlyph glyph, FT_GlyphSlot slot){ FT_Error error = FT_Err_Ok; FT_Library library = FT_GLYPH(glyph)->library; FT_Outline *source = &slot->outline; FT_Outline *target = &glyph->outline; /* check format in glyph slot */ if(slot->format != ft_glyph_format_outline) { error = FT_Err_Invalid_Glyph_Format; goto Exit; } /* allocate new outline */ error = FT_Outline_New(library, source->n_points, source->n_contours, &glyph->outline); if(error) { goto Exit; } /* copy it */ MEM_Copy(target->points, source->points, source->n_points * sizeof(FT_Vector)); MEM_Copy(target->tags, source->tags, source->n_points * sizeof(FT_Byte)); MEM_Copy(target->contours, source->contours, source->n_contours * sizeof(FT_Short)); /* copy all flags, except the `ft_outline_owner' one */ target->flags = source->flags | ft_outline_owner;Exit: return error;}
开发者ID:Diskutant,项目名称:RTCW-SP,代码行数:42,
示例11: ft_outline_glyph_init ft_outline_glyph_init( FT_Glyph outline_glyph, FT_GlyphSlot slot ) { FT_OutlineGlyph glyph = (FT_OutlineGlyph)outline_glyph; FT_Error error = FT_Err_Ok; FT_Library library = FT_GLYPH( glyph )->library; FT_Outline* source = &slot->outline; FT_Outline* target = &glyph->outline; /* check format in glyph slot */ if ( slot->format != FT_GLYPH_FORMAT_OUTLINE ) { error = FT_Err_Invalid_Glyph_Format; goto Exit; } /* allocate new outline */ error = FT_Outline_New( library, source->n_points, source->n_contours, &glyph->outline ); if ( error ) goto Exit; /* copy it */ FT_ARRAY_COPY( target->points, source->points, source->n_points ); FT_ARRAY_COPY( target->tags, source->tags, source->n_points ); FT_ARRAY_COPY( target->contours, source->contours, source->n_contours ); /* copy all flags, except the `FT_OUTLINE_OWNER' one */ target->flags = source->flags | FT_OUTLINE_OWNER; Exit: return error; }
开发者ID:Miguel-J,项目名称:eneboo-core,代码行数:36,
示例12: ft_outline_glyph_donestaticvoid ft_outline_glyph_done(FT_OutlineGlyph glyph){ FT_Outline_Done(FT_GLYPH(glyph)->library, &glyph->outline);}
开发者ID:Diskutant,项目名称:RTCW-SP,代码行数:5,
注:本文中的FT_GLYPH函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ FT_Get_Char_Index函数代码示例 C++ FT_FRAME_USHORT函数代码示例 |