亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pshrec.c

?? 智能設備中PDF閱讀器的源碼!用于windows mobile2003或者WM5以上
?? C
?? 第 1 頁 / 共 3 頁
字號:
/***************************************************************************/
/*                                                                         */
/*  pshrec.c                                                               */
/*                                                                         */
/*    FreeType PostScript hints recorder (body).                           */
/*                                                                         */
/*  Copyright 2001, 2002, 2003, 2004 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.                                        */
/*                                                                         */
/***************************************************************************/


#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
#include "pshrec.h"
#include "pshalgo.h"

#include "pshnterr.h"

#undef  FT_COMPONENT
#define FT_COMPONENT  trace_pshrec

#ifdef DEBUG_HINTER
  PS_Hints  ps_debug_hints         = 0;
  int       ps_debug_no_horz_hints = 0;
  int       ps_debug_no_vert_hints = 0;
#endif


  /*************************************************************************/
  /*************************************************************************/
  /*****                                                               *****/
  /*****                      PS_HINT MANAGEMENT                       *****/
  /*****                                                               *****/
  /*************************************************************************/
  /*************************************************************************/

  /* destroy hints table */
  static void
  ps_hint_table_done( PS_Hint_Table  table,
                      FT_Memory      memory )
  {
    FT_FREE( table->hints );
    table->num_hints = 0;
    table->max_hints = 0;
  }


  /* ensure that a table can contain "count" elements */
  static FT_Error
  ps_hint_table_ensure( PS_Hint_Table  table,
                        FT_UInt        count,
                        FT_Memory      memory )
  {
    FT_UInt   old_max = table->max_hints;
    FT_UInt   new_max = count;
    FT_Error  error   = 0;


    if ( new_max > old_max )
    {
      /* try to grow the table */
      new_max = FT_PAD_CEIL( new_max, 8 );
      if ( !FT_RENEW_ARRAY( table->hints, old_max, new_max ) )
        table->max_hints = new_max;
    }
    return error;
  }


  static FT_Error
  ps_hint_table_alloc( PS_Hint_Table  table,
                       FT_Memory      memory,
                       PS_Hint       *ahint )
  {
    FT_Error  error = 0;
    FT_UInt   count;
    PS_Hint   hint = 0;


    count = table->num_hints;
    count++;

    if ( count >= table->max_hints )
    {
      error = ps_hint_table_ensure( table, count, memory );
      if ( error )
        goto Exit;
    }

    hint        = table->hints + count - 1;
    hint->pos   = 0;
    hint->len   = 0;
    hint->flags = 0;

    table->num_hints = count;

  Exit:
    *ahint = hint;
    return error;
  }


  /*************************************************************************/
  /*************************************************************************/
  /*****                                                               *****/
  /*****                      PS_MASK MANAGEMENT                       *****/
  /*****                                                               *****/
  /*************************************************************************/
  /*************************************************************************/

  /* destroy mask */
  static void
  ps_mask_done( PS_Mask    mask,
                FT_Memory  memory )
  {
    FT_FREE( mask->bytes );
    mask->num_bits  = 0;
    mask->max_bits  = 0;
    mask->end_point = 0;
  }


  /* ensure that a mask can contain "count" bits */
  static FT_Error
  ps_mask_ensure( PS_Mask    mask,
                  FT_UInt    count,
                  FT_Memory  memory )
  {
    FT_UInt   old_max = ( mask->max_bits + 7 ) >> 3;
    FT_UInt   new_max = ( count          + 7 ) >> 3;
    FT_Error  error   = 0;


    if ( new_max > old_max )
    {
      new_max = FT_PAD_CEIL( new_max, 8 );
      if ( !FT_RENEW_ARRAY( mask->bytes, old_max, new_max ) )
        mask->max_bits = new_max * 8;
    }
    return error;
  }


  /* test a bit value in a given mask */
  static FT_Int
  ps_mask_test_bit( PS_Mask  mask,
                    FT_Int   idx )
  {
    if ( (FT_UInt)idx >= mask->num_bits )
      return 0;

    return mask->bytes[idx >> 3] & ( 0x80 >> ( idx & 7 ) );
  }


  /* clear a given bit */
  static void
  ps_mask_clear_bit( PS_Mask  mask,
                     FT_Int   idx )
  {
    FT_Byte*  p;


    if ( (FT_UInt)idx >= mask->num_bits )
      return;

    p    = mask->bytes + ( idx >> 3 );
    p[0] = (FT_Byte)( p[0] & ~( 0x80 >> ( idx & 7 ) ) );
  }


  /* set a given bit, possibly grow the mask */
  static FT_Error
  ps_mask_set_bit( PS_Mask    mask,
                   FT_Int     idx,
                   FT_Memory  memory )
  {
    FT_Error  error = 0;
    FT_Byte*  p;


    if ( idx < 0 )
      goto Exit;

    if ( (FT_UInt)idx >= mask->num_bits )
    {
      error = ps_mask_ensure( mask, idx + 1, memory );
      if ( error )
        goto Exit;

      mask->num_bits = idx + 1;
    }

    p    = mask->bytes + ( idx >> 3 );
    p[0] = (FT_Byte)( p[0] | ( 0x80 >> ( idx & 7 ) ) );

  Exit:
    return error;
  }


  /* destroy mask table */
  static void
  ps_mask_table_done( PS_Mask_Table  table,
                      FT_Memory      memory )
  {
    FT_UInt  count = table->max_masks;
    PS_Mask  mask  = table->masks;


    for ( ; count > 0; count--, mask++ )
      ps_mask_done( mask, memory );

    FT_FREE( table->masks );
    table->num_masks = 0;
    table->max_masks = 0;
  }


  /* ensure that a mask table can contain "count" masks */
  static FT_Error
  ps_mask_table_ensure( PS_Mask_Table  table,
                        FT_UInt        count,
                        FT_Memory      memory )
  {
    FT_UInt   old_max = table->max_masks;
    FT_UInt   new_max = count;
    FT_Error  error   = 0;


    if ( new_max > old_max )
    {
      new_max = FT_PAD_CEIL( new_max, 8 );
      if ( !FT_RENEW_ARRAY( table->masks, old_max, new_max ) )
        table->max_masks = new_max;
    }
    return error;
  }


  /* allocate a new mask in a table */
  static FT_Error
  ps_mask_table_alloc( PS_Mask_Table  table,
                       FT_Memory      memory,
                       PS_Mask       *amask )
  {
    FT_UInt   count;
    FT_Error  error = 0;
    PS_Mask   mask  = 0;


    count = table->num_masks;
    count++;

    if ( count > table->max_masks )
    {
      error = ps_mask_table_ensure( table, count, memory );
      if ( error )
        goto Exit;
    }

    mask             = table->masks + count - 1;
    mask->num_bits   = 0;
    mask->end_point  = 0;
    table->num_masks = count;

  Exit:
    *amask = mask;
    return error;
  }


  /* return last hint mask in a table, create one if the table is empty */
  static FT_Error
  ps_mask_table_last( PS_Mask_Table  table,
                      FT_Memory      memory,
                      PS_Mask       *amask )
  {
    FT_Error  error = 0;
    FT_UInt   count;
    PS_Mask   mask;


    count = table->num_masks;
    if ( count == 0 )
    {
      error = ps_mask_table_alloc( table, memory, &mask );
      if ( error )
        goto Exit;
    }
    else
      mask = table->masks + count - 1;

  Exit:
    *amask = mask;
    return error;
  }


  /* set a new mask to a given bit range */
  static FT_Error
  ps_mask_table_set_bits( PS_Mask_Table  table,
                          FT_Byte*       source,
                          FT_UInt        bit_pos,
                          FT_UInt        bit_count,
                          FT_Memory      memory )
  {
    FT_Error  error = 0;
    PS_Mask   mask;


    error = ps_mask_table_last( table, memory, &mask );
    if ( error )
      goto Exit;

    error = ps_mask_ensure( mask, bit_count, memory );
    if ( error )
      goto Exit;

    mask->num_bits = bit_count;

    /* now, copy bits */
    {
      FT_Byte*  read  = source + ( bit_pos >> 3 );
      FT_Int    rmask = 0x80 >> ( bit_pos & 7 );
      FT_Byte*  write = mask->bytes;
      FT_Int    wmask = 0x80;
      FT_Int    val;


      for ( ; bit_count > 0; bit_count-- )
      {
        val = write[0] & ~wmask;

        if ( read[0] & rmask )
          val |= wmask;

        write[0] = (FT_Byte)val;

        rmask >>= 1;
        if ( rmask == 0 )
        {
          read++;
          rmask = 0x80;
        }

        wmask >>= 1;
        if ( wmask == 0 )
        {
          write++;
          wmask = 0x80;
        }
      }
    }

  Exit:
    return error;
  }


  /* test whether two masks in a table intersect */
  static FT_Int
  ps_mask_table_test_intersect( PS_Mask_Table  table,
                                FT_Int         index1,
                                FT_Int         index2 )
  {
    PS_Mask   mask1  = table->masks + index1;
    PS_Mask   mask2  = table->masks + index2;
    FT_Byte*  p1     = mask1->bytes;
    FT_Byte*  p2     = mask2->bytes;
    FT_UInt   count1 = mask1->num_bits;
    FT_UInt   count2 = mask2->num_bits;
    FT_UInt   count;


    count = ( count1 <= count2 ) ? count1 : count2;
    for ( ; count >= 8; count -= 8 )
    {
      if ( p1[0] & p2[0] )
        return 1;

      p1++;
      p2++;
    }

    if ( count == 0 )
      return 0;

    return ( p1[0] & p2[0] ) & ~( 0xFF >> count );
  }


  /* merge two masks, used by ps_mask_table_merge_all */
  static FT_Error
  ps_mask_table_merge( PS_Mask_Table  table,
                       FT_Int         index1,
                       FT_Int         index2,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品视频在线观看网站| 日本韩国精品在线| 精品国产乱码久久久久久牛牛| 亚洲成人手机在线| 在线播放中文字幕一区| 日产国产欧美视频一区精品| 欧美一二三区在线| 精品一区二区三区久久久| 精品久久久久久久久久久久久久久| 国产综合久久久久久久久久久久| 久久蜜桃香蕉精品一区二区三区| 国产成人亚洲综合a∨猫咪| 国产精品色在线| 91麻豆精品国产自产在线观看一区 | 91亚洲精品久久久蜜桃网站| 亚洲情趣在线观看| 欧美三级欧美一级| 国产尤物一区二区| 亚洲国产成人在线| 欧美亚洲国产一区在线观看网站| 日韩avvvv在线播放| 国产嫩草影院久久久久| 91国在线观看| 精品一区二区三区av| 国产精品美女久久福利网站| 欧美日韩中文字幕精品| 国内精品在线播放| 亚洲一区二区三区四区不卡| 精品久久久网站| 日本韩国欧美在线| 国产九九视频一区二区三区| 亚洲精品高清在线观看| 欧美videossexotv100| 91麻豆成人久久精品二区三区| 另类小说色综合网站| 亚洲天堂福利av| 欧美xxxxxxxxx| 91视频国产资源| 久久激情五月激情| 亚洲一区中文日韩| 亚洲国产精品传媒在线观看| 欧美精品久久天天躁| 99精品视频一区二区三区| 日本亚洲电影天堂| 一区二区三区中文字幕电影| 国产色产综合色产在线视频| 在线播放亚洲一区| 99精品黄色片免费大全| 精品制服美女久久| 丝袜美腿高跟呻吟高潮一区| 综合激情网...| 国产欧美日产一区| 精品久久久久久最新网址| 欧美日韩免费高清一区色橹橹 | 久久99国产精品麻豆| 亚洲午夜精品网| 亚洲视频小说图片| 久久久www成人免费毛片麻豆 | 成人爽a毛片一区二区免费| 日韩av二区在线播放| 亚洲蜜臀av乱码久久精品蜜桃| 久久亚洲综合av| 日韩视频在线观看一区二区| 欧美天堂一区二区三区| 色综合视频在线观看| 成人午夜又粗又硬又大| 国产精品资源网| 国内外成人在线| 九九**精品视频免费播放| 久久精品国产77777蜜臀| 午夜成人免费电影| 日日摸夜夜添夜夜添精品视频| 亚洲激情av在线| 亚洲精品国产精品乱码不99 | 亚洲h精品动漫在线观看| 亚洲精品视频自拍| 一片黄亚洲嫩模| 亚洲三级电影全部在线观看高清| 国产精品成人一区二区三区夜夜夜| 久久精品水蜜桃av综合天堂| 久久看人人爽人人| 欧美国产日韩精品免费观看| 欧美国产激情二区三区 | 亚洲精品国产第一综合99久久 | 国产精品伦一区二区三级视频| 国产欧美一区二区三区在线老狼 | 国产精品久线在线观看| 国产精品网站一区| 亚洲男人的天堂在线观看| 亚洲黄色尤物视频| 亚洲成av人片一区二区| 日本中文一区二区三区| 精品无码三级在线观看视频| 国产美女主播视频一区| 成人动漫一区二区| 91精品91久久久中77777| 精品视频999| 日韩欧美国产1| 久久久www成人免费无遮挡大片 | 亚洲综合一区在线| 亚洲地区一二三色| 极品销魂美女一区二区三区| 国产东北露脸精品视频| 91在线视频官网| 欧美老女人在线| 国产亚洲欧洲997久久综合| 亚洲欧美日韩综合aⅴ视频| 午夜一区二区三区视频| 黄网站免费久久| 成人sese在线| 欧美日韩国产影片| 久久久蜜桃精品| 亚洲欧美日韩国产综合| 丝袜美腿亚洲色图| 成人免费毛片片v| 欧美精品一级二级三级| 国产女人水真多18毛片18精品视频 | 欧美绝品在线观看成人午夜影视| 日韩视频一区二区在线观看| 欧美韩国日本一区| 天天综合色天天综合| 国产成人亚洲综合a∨婷婷图片 | 精品一区二区免费在线观看| 97精品电影院| 欧美v日韩v国产v| 一区二区三区四区不卡在线 | 久久久精品欧美丰满| 亚洲成人综合在线| av资源站一区| 精品对白一区国产伦| 亚洲五月六月丁香激情| 国产999精品久久久久久| 欧美欧美欧美欧美首页| 中文字幕中文乱码欧美一区二区| 日韩国产欧美三级| 色偷偷一区二区三区| 日本一区免费视频| 久久精品国产精品亚洲红杏 | 色综合激情久久| 国产欧美日韩激情| 国内外成人在线| 91麻豆精品国产自产在线| 亚洲色图清纯唯美| 国产高清在线观看免费不卡| 日韩午夜小视频| 亚洲va欧美va人人爽| 91久久香蕉国产日韩欧美9色| 中文字幕成人在线观看| 激情综合网最新| 欧美一区二区视频网站| 一区二区三区四区视频精品免费| 成人av第一页| 国产欧美一区在线| 国产成人精品一区二区三区四区| 日韩欧美在线1卡| 琪琪久久久久日韩精品| 欧美嫩在线观看| 亚洲电影第三页| 欧美丝袜自拍制服另类| 一区二区免费视频| 日本韩国精品在线| 亚洲一级在线观看| 在线观看网站黄不卡| 一区二区不卡在线播放| 欧美优质美女网站| 一区二区在线观看不卡| 色婷婷国产精品| 亚洲精品免费视频| 在线免费观看日韩欧美| 一区二区三区.www| 欧美浪妇xxxx高跟鞋交| 蜜桃av一区二区| 欧美tickling网站挠脚心| 韩国成人精品a∨在线观看| 精品日韩欧美在线| 国产老肥熟一区二区三区| 国产三级精品视频| 99精品桃花视频在线观看| 亚洲色图欧美激情| 欧美在线免费播放| 免费在线一区观看| 国产亚洲美州欧州综合国| 懂色av一区二区夜夜嗨| 综合av第一页| 精品视频一区三区九区| 看电视剧不卡顿的网站| 国产午夜亚洲精品不卡| 99精品久久免费看蜜臀剧情介绍| 亚洲最大的成人av| 777午夜精品视频在线播放| 九九热在线视频观看这里只有精品| 久久久亚洲高清| 色噜噜狠狠成人中文综合 | 欧美www视频| 成人动漫一区二区在线| 午夜欧美视频在线观看| 精品国产123| 欧美性淫爽ww久久久久无| 欧美a一区二区| 欧美国产一区二区在线观看|