• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ FT_GLYPH函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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,代码来源:ftglyph.c


示例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,代码来源:ftglyph.c


示例3: ft_bitmap_glyph_init

static
FT_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,代码来源:ftglyph.c


示例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,代码来源:ftglyph.c


示例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,代码来源:ftglyph.c


示例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,代码来源:ftglyph.c


示例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,代码来源:ftglyph.c


示例8: ft_bitmap_glyph_done

static
void  ft_bitmap_glyph_done(FT_BitmapGlyph glyph)
{
	FT_Memory memory = FT_GLYPH(glyph)->library->memory;


	FREE(glyph->bitmap.buffer);
}
开发者ID:Diskutant,项目名称:RTCW-SP,代码行数:8,代码来源:ftglyph.c


示例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,代码来源:ftglyph.c


示例10: ft_outline_glyph_init

static
FT_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,代码来源:ftglyph.c


示例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,代码来源:ftglyph.c


示例12: ft_outline_glyph_done

static
void  ft_outline_glyph_done(FT_OutlineGlyph glyph)
{
	FT_Outline_Done(FT_GLYPH(glyph)->library, &glyph->outline);
}
开发者ID:Diskutant,项目名称:RTCW-SP,代码行数:5,代码来源:ftglyph.c



注:本文中的FT_GLYPH函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FT_Get_Char_Index函数代码示例发布时间:2022-05-30
下一篇:
C++ FT_FRAME_USHORT函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap