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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? ftgrays.c

?? QT 開(kāi)發(fā)環(huán)境里面一個(gè)很重要的文件
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
/***************************************************************************//*                                                                         *//*  ftgrays.c                                                              *//*                                                                         *//*    A new `perfect' anti-aliasing renderer (body).                       *//*                                                                         *//*  Copyright 2000-2001, 2002, 2003, 2005, 2006 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.                                        *//*                                                                         *//***************************************************************************/  /*************************************************************************/  /*                                                                       */  /* This file can be compiled without the rest of the FreeType engine, by */  /* defining the _STANDALONE_ macro when compiling it.  You also need to  */  /* put the files `ftgrays.h' and `ftimage.h' into the current            */  /* compilation directory.  Typically, you could do something like        */  /*                                                                       */  /* - copy `src/smooth/ftgrays.c' (this file) to your current directory   */  /*                                                                       */  /* - copy `include/freetype/ftimage.h' and `src/smooth/ftgrays.h' to the */  /*   same directory                                                      */  /*                                                                       */  /* - compile `ftgrays' with the _STANDALONE_ macro defined, as in        */  /*                                                                       */  /*     cc -c -D_STANDALONE_ ftgrays.c                                    */  /*                                                                       */  /* The renderer can be initialized with a call to                        */  /* `ft_gray_raster.raster_new'; an anti-aliased bitmap can be generated  */  /* with a call to `ft_gray_raster.raster_render'.                        */  /*                                                                       */  /* See the comments and documentation in the file `ftimage.h' for more   */  /* details on how the raster works.                                      */  /*                                                                       */  /*************************************************************************/  /*************************************************************************/  /*                                                                       */  /* This is a new anti-aliasing scan-converter for FreeType 2.  The       */  /* algorithm used here is _very_ different from the one in the standard  */  /* `ftraster' module.  Actually, `ftgrays' computes the _exact_          */  /* coverage of the outline on each pixel cell.                           */  /*                                                                       */  /* It is based on ideas that I initially found in Raph Levien's          */  /* excellent LibArt graphics library (see http://www.levien.com/libart   */  /* for more information, though the web pages do not tell anything       */  /* about the renderer; you'll have to dive into the source code to       */  /* understand how it works).                                             */  /*                                                                       */  /* Note, however, that this is a _very_ different implementation         */  /* compared to Raph's.  Coverage information is stored in a very         */  /* different way, and I don't use sorted vector paths.  Also, it doesn't */  /* use floating point values.                                            */  /*                                                                       */  /* This renderer has the following advantages:                           */  /*                                                                       */  /* - It doesn't need an intermediate bitmap.  Instead, one can supply a  */  /*   callback function that will be called by the renderer to draw gray  */  /*   spans on any target surface.  You can thus do direct composition on */  /*   any kind of bitmap, provided that you give the renderer the right   */  /*   callback.                                                           */  /*                                                                       */  /* - A perfect anti-aliaser, i.e., it computes the _exact_ coverage on   */  /*   each pixel cell.                                                    */  /*                                                                       */  /* - It performs a single pass on the outline (the `standard' FT2        */  /*   renderer makes two passes).                                         */  /*                                                                       */  /* - It can easily be modified to render to _any_ number of gray levels  */  /*   cheaply.                                                            */  /*                                                                       */  /* - For small (< 20) pixel sizes, it is faster than the standard        */  /*   renderer.                                                           */  /*                                                                       */  /*************************************************************************//* experimental support for gamma correction within the rasterizer */#define xxxGRAYS_USE_GAMMA  /*************************************************************************/  /*                                                                       */  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */  /* messages during execution.                                            */  /*                                                                       */#undef  FT_COMPONENT#define FT_COMPONENT  trace_smooth#define ErrRaster_MemoryOverflow   -4#ifdef _STANDALONE_#include <string.h>             /* for ft_memcpy() */#include <setjmp.h>#include <limits.h>#define FT_UINT_MAX  UINT_MAX#define ft_memset   memset#define ft_setjmp   setjmp#define ft_longjmp  longjmp#define ft_jmp_buf  jmp_buf#define ErrRaster_Invalid_Mode     -2#define ErrRaster_Invalid_Outline  -1#define FT_BEGIN_HEADER#define FT_END_HEADER#include "ftimage.h"#include "ftgrays.h"  /* This macro is used to indicate that a function parameter is unused. */  /* Its purpose is simply to reduce compiler warnings.  Note also that  */  /* simply defining it as `(void)x' doesn't avoid warnings with certain */  /* ANSI compilers (e.g. LCC).                                          */#define FT_UNUSED( x )  (x) = (x)  /* Disable the tracing mechanism for simplicity -- developers can      */  /* activate it easily by redefining these two macros.                  */#ifndef FT_ERROR#define FT_ERROR( x )  do ; while ( 0 )     /* nothing */#endif#ifndef FT_TRACE#define FT_TRACE( x )  do ; while ( 0 )     /* nothing */#endif#else /* _STANDALONE_ */#include <ft2build.h>#include "ftgrays.h"#include FT_INTERNAL_OBJECTS_H#include FT_INTERNAL_DEBUG_H#include FT_OUTLINE_H#include "ftsmerrs.h"#define ErrRaster_Invalid_Mode     Smooth_Err_Cannot_Render_Glyph#define ErrRaster_Invalid_Outline  Smooth_Err_Invalid_Outline#endif /* _STANDALONE_ */#ifndef FT_MEM_SET#define FT_MEM_SET( d, s, c )  ft_memset( d, s, c )#endif#ifndef FT_MEM_ZERO#define FT_MEM_ZERO( dest, count )  FT_MEM_SET( dest, 0, count )#endif  /* define this to dump debugging information */#define xxxDEBUG_GRAYS  /* as usual, for the speed hungry :-) */#ifndef FT_STATIC_RASTER#define RAS_ARG   PRaster  raster#define RAS_ARG_  PRaster  raster,#define RAS_VAR   raster#define RAS_VAR_  raster,#define ras       (*raster)#else /* FT_STATIC_RASTER */#define RAS_ARG   /* empty */#define RAS_ARG_  /* empty */#define RAS_VAR   /* empty */#define RAS_VAR_  /* empty */  static TRaster  ras;#endif /* FT_STATIC_RASTER */  /* must be at least 6 bits! */#define PIXEL_BITS  8#define ONE_PIXEL       ( 1L << PIXEL_BITS )#define PIXEL_MASK      ( -1L << PIXEL_BITS )#define TRUNC( x )      ( (TCoord)((x) >> PIXEL_BITS) )#define SUBPIXELS( x )  ( (TPos)(x) << PIXEL_BITS )#define FLOOR( x )      ( (x) & -ONE_PIXEL )#define CEILING( x )    ( ( (x) + ONE_PIXEL - 1 ) & -ONE_PIXEL )#define ROUND( x )      ( ( (x) + ONE_PIXEL / 2 ) & -ONE_PIXEL )#if PIXEL_BITS >= 6#define UPSCALE( x )    ( (x) << ( PIXEL_BITS - 6 ) )#define DOWNSCALE( x )  ( (x) >> ( PIXEL_BITS - 6 ) )#else#define UPSCALE( x )    ( (x) >> ( 6 - PIXEL_BITS ) )#define DOWNSCALE( x )  ( (x) << ( 6 - PIXEL_BITS ) )#endif  /* Define this if you want to use a more compact storage scheme.  This   */  /* increases the number of cells available in the render pool but slows  */  /* down the rendering a bit.  It is useful if you have a really tiny     */  /* render pool.                                                          */#undef GRAYS_COMPACT  /*************************************************************************/  /*                                                                       */  /*   TYPE DEFINITIONS                                                    */  /*                                                                       */  /* don't change the following types to FT_Int or FT_Pos, since we might */  /* need to define them to "float" or "double" when experimenting with   */  /* new algorithms                                                       */  typedef int   TCoord;   /* integer scanline/pixel coordinate */  typedef long  TPos;     /* sub-pixel coordinate              */  /* determine the type used to store cell areas.  This normally takes at */  /* least PIXEL_BITS*2 + 1 bits.  On 16-bit systems, we need to use      */  /* `long' instead of `int', otherwise bad things happen                 */#if PIXEL_BITS <= 7  typedef int   TArea;#else /* PIXEL_BITS >= 8 */  /* approximately determine the size of integers using an ANSI-C header */#if FT_UINT_MAX == 0xFFFFU  typedef long  TArea;#else  typedef int  TArea;#endif#endif /* PIXEL_BITS >= 8 */  /* maximal number of gray spans in a call to the span callback */#define FT_MAX_GRAY_SPANS  32#ifdef GRAYS_COMPACT  typedef struct  TCell_  {    short  x     : 14;    short  y     : 14;    int    cover : PIXEL_BITS + 2;    int    area  : PIXEL_BITS * 2 + 2;  } TCell, *PCell;#else /* GRAYS_COMPACT */  typedef struct  TCell_  {    TCoord  x;    TCoord  y;    int     cover;    TArea   area;  } TCell, *PCell;#endif /* GRAYS_COMPACT */  typedef struct  TRaster_  {    PCell   cells;    int     max_cells;    int     num_cells;    TPos    min_ex, max_ex;    TPos    min_ey, max_ey;    TArea   area;    int     cover;    int     invalid;    TCoord  ex, ey;    TCoord  cx, cy;    TPos    x,  y;    TPos    last_ey;    FT_Vector   bez_stack[32 * 3 + 1];    int         lev_stack[32];    FT_Outline  outline;    FT_Bitmap   target;    FT_BBox     clip_box;    FT_Span     gray_spans[FT_MAX_GRAY_SPANS];    int         num_gray_spans;    FT_Raster_Span_Func  render_span;    void*                render_span_data;    int                  span_y;    int  band_size;    int  band_shoot;    int  conic_level;    int  cubic_level;    void*       memory;    ft_jmp_buf  jump_buffer;#ifdef GRAYS_USE_GAMMA    unsigned char  gamma[257];#endif  } TRaster, *PRaster;  /*************************************************************************/  /*                                                                       */  /* Initialize the cells table.                                           */  /*                                                                       */  static void  gray_init_cells( RAS_ARG_ void*  buffer,                   long            byte_size )  {    ras.cells     = (PCell)buffer;    ras.max_cells = (int)( byte_size / sizeof ( TCell ) );    ras.num_cells = 0;    ras.area      = 0;    ras.cover     = 0;    ras.invalid   = 1;  }  /*************************************************************************/  /*                                                                       */  /* Compute the outline bounding box.                                     */  /*                                                                       */  static void  gray_compute_cbox( RAS_ARG )  {    FT_Outline*  outline = &ras.outline;    FT_Vector*   vec     = outline->points;    FT_Vector*   limit   = vec + outline->n_points;    if ( outline->n_points <= 0 )    {      ras.min_ex = ras.max_ex = 0;      ras.min_ey = ras.max_ey = 0;      return;    }    ras.min_ex = ras.max_ex = vec->x;    ras.min_ey = ras.max_ey = vec->y;    vec++;    for ( ; vec < limit; vec++ )    {      TPos  x = vec->x;      TPos  y = vec->y;      if ( x < ras.min_ex ) ras.min_ex = x;      if ( x > ras.max_ex ) ras.max_ex = x;      if ( y < ras.min_ey ) ras.min_ey = y;      if ( y > ras.max_ey ) ras.max_ey = y;    }    /* truncate the bounding box to integer pixels */    ras.min_ex = ras.min_ex >> 6;    ras.min_ey = ras.min_ey >> 6;    ras.max_ex = ( ras.max_ex + 63 ) >> 6;    ras.max_ey = ( ras.max_ey + 63 ) >> 6;  }  /*************************************************************************/  /*                                                                       */  /* Record the current cell in the table.                                 */  /*                                                                       */  static void  gray_record_cell( RAS_ARG )  {    PCell  cell;    if ( !ras.invalid && ( ras.area | ras.cover ) )    {      if ( ras.num_cells >= ras.max_cells )        ft_longjmp( ras.jump_buffer, 1 );      cell        = ras.cells + ras.num_cells++;      cell->x     = (TCoord)(ras.ex - ras.min_ex);      cell->y     = (TCoord)(ras.ey - ras.min_ey);      cell->area  = ras.area;      cell->cover = ras.cover;    }  }  /*************************************************************************/  /*                                                                       */  /* Set the current cell to a new position.                               */  /*                                                                       */  static void  gray_set_cell( RAS_ARG_ TCoord  ex,                          TCoord  ey )  {    int  invalid, record, clean;    /* Move the cell pointer to a new position.  We set the `invalid'      */    /* flag to indicate that the cell isn't part of those we're interested */    /* in during the render phase.  This means that:                       */    /*                                                                     */    /* . the new vertical position must be within min_ey..max_ey-1.        */    /* . the new horizontal position must be strictly less than max_ex     */    /*                                                                     */    /* Note that if a cell is to the left of the clipping region, it is    */    /* actually set to the (min_ex-1) horizontal position.                 */    record  = 0;    clean   = 1;    invalid = ( ey < ras.min_ey || ey >= ras.max_ey || ex >= ras.max_ex );    if ( !invalid )    {      /* All cells that are on the left of the clipping region go to the */      /* min_ex - 1 horizontal position.                                 */      if ( ex < ras.min_ex )        ex = (TCoord)(ras.min_ex - 1);      /* if our position is new, then record the previous cell */      if ( ex != ras.ex || ey != ras.ey )        record = 1;      else        clean = ras.invalid;  /* do not clean if we didn't move from */                              /* a valid cell                        */    }    /* record the previous cell if needed (i.e., if we changed the cell */    /* position, or changed the `invalid' flag)                         */    if ( ras.invalid != invalid || record )      gray_record_cell( RAS_VAR );    if ( clean )    {      ras.area  = 0;      ras.cover = 0;    }    ras.invalid = invalid;    ras.ex      = ex;    ras.ey      = ey;  }  /*************************************************************************/  /*                                                                       */  /* Start a new contour at a given cell.                                  */  /*                                                                       */  static void  gray_start_cell( RAS_ARG_  TCoord  ex,                             TCoord  ey )  {    if ( ex < ras.min_ex )      ex = (TCoord)(ras.min_ex - 1);    ras.area    = 0;    ras.cover   = 0;    ras.ex      = ex;    ras.ey      = ey;    ras.last_ey = SUBPIXELS( ey );    ras.invalid = 0;    gray_set_cell( RAS_VAR_ ex, ey );  }  /*************************************************************************/  /*                                                                       */  /* Render a scanline as one or more cells.                               */  /*                                                                       */  static void  gray_render_scanline( RAS_ARG_  TCoord  ey,                                  TPos    x1,                                  TCoord  y1,                                  TPos    x2,                                  TCoord  y2 )  {    TCoord  ex1, ex2, fx1, fx2, delta;    long    p, first, dx;    int     incr, lift, mod, rem;    dx = x2 - x1;    ex1 = TRUNC( x1 ); /* if (ex1 >= ras.max_ex) ex1 = ras.max_ex-1; */    ex2 = TRUNC( x2 ); /* if (ex2 >= ras.max_ex) ex2 = ras.max_ex-1; */    fx1 = (TCoord)( x1 - SUBPIXELS( ex1 ) );    fx2 = (TCoord)( x2 - SUBPIXELS( ex2 ) );    /* trivial case.  Happens often */    if ( y1 == y2 )    {      gray_set_cell( RAS_VAR_ ex2, ey );      return;    }    /* everything is located in a single cell.  That is easy! */    /*                                                        */    if ( ex1 == ex2 )    {      delta      = y2 - y1;      ras.area  += (TArea)( fx1 + fx2 ) * delta;      ras.cover += delta;      return;    }    /* ok, we'll have to render a run of adjacent cells on the same */    /* scanline...                                                  */    /*                                                              */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色噜噜久久综合| 99久免费精品视频在线观看| 99精品国产99久久久久久白柏| 欧美久久久久久久久| 中文字幕在线一区二区三区| 久久精品国产免费看久久精品| 在线观看成人小视频| 国产精品久99| 国产精品一区二区在线看| 337p亚洲精品色噜噜噜| 亚洲美女一区二区三区| 懂色av中文字幕一区二区三区| 日韩三级av在线播放| 亚洲五码中文字幕| 一本大道av伊人久久综合| 国产欧美精品区一区二区三区| 日本不卡一二三| 欧美日韩国产一二三| 一区二区三区精密机械公司| 成人久久视频在线观看| 久久久精品国产99久久精品芒果| 理论片日本一区| 欧美一级专区免费大片| 午夜视频在线观看一区| 欧美日韩一区二区电影| 一区二区三区四区精品在线视频 | 日韩中文字幕亚洲一区二区va在线 | 日韩视频免费观看高清完整版| 亚洲一区二区精品久久av| 99久久国产综合精品女不卡| 中文字幕成人av| 国产成人免费在线视频| 国产视频一区不卡| 国产成人亚洲综合a∨婷婷图片 | 日本高清视频一区二区| 日韩美女精品在线| 91丨国产丨九色丨pron| 中文字幕字幕中文在线中不卡视频| 成人免费黄色大片| 国产精品看片你懂得| 99热99精品| 亚洲欧美日韩综合aⅴ视频| 91在线精品一区二区三区| 国产精品国产三级国产aⅴ入口| 粉嫩高潮美女一区二区三区| 亚洲国产精品成人综合 | 日韩二区三区在线观看| 日韩午夜精品电影| 国产一区啦啦啦在线观看| 精品国产123| 国产一区999| 国产精品私房写真福利视频| jlzzjlzz亚洲日本少妇| 亚洲欧美一区二区三区国产精品| 日本精品一区二区三区四区的功能| 一区二区视频在线| 欧美肥胖老妇做爰| 久久精品久久99精品久久| 久久精品一区二区三区不卡牛牛| 成人国产一区二区三区精品| 亚洲欧美日韩成人高清在线一区| 在线区一区二视频| 美腿丝袜在线亚洲一区| 国产亚洲精品免费| 91丨porny丨国产入口| 亚洲成人一区在线| 欧美成人乱码一区二区三区| 国产成人久久精品77777最新版本| 国产精品少妇自拍| 在线这里只有精品| 男人的j进女人的j一区| 久久久91精品国产一区二区精品| av在线不卡电影| 爽好久久久欧美精品| 26uuu久久天堂性欧美| k8久久久一区二区三区| 亚洲成在人线在线播放| 精品国产一区二区三区四区四| 国产成人免费在线观看不卡| 一区二区成人在线视频| 欧美一区二区三区在线电影| 国产精品一区二区久久精品爱涩 | 欧美一区二区三级| 成人午夜视频网站| 亚洲福利一区二区三区| 久久综合资源网| 色吧成人激情小说| 日韩av一级片| 中文字幕中文在线不卡住| 欧美日韩一区视频| 91精品久久久久久久91蜜桃 | 亚洲免费观看高清完整版在线| 制服丝袜av成人在线看| 国产成都精品91一区二区三| 亚洲精品高清在线| 精品国产不卡一区二区三区| 91在线观看视频| 久久99精品网久久| 一区二区三区四区视频精品免费| 精品国产乱码久久久久久牛牛| 99久久久久免费精品国产| 麻豆91精品91久久久的内涵| 亚洲天堂2016| 26uuu国产在线精品一区二区| 91丨porny丨国产| 极品少妇xxxx精品少妇偷拍| 亚洲午夜在线视频| 国产欧美日本一区视频| 91精品国产一区二区三区香蕉| 不卡av在线网| 国内精品国产成人| 香蕉成人伊视频在线观看| 国产精品久久久久永久免费观看| 日韩一区二区三| 91麻豆精东视频| 国产99久久精品| 精品一区二区日韩| 亚洲国产日韩在线一区模特| 欧美国产乱子伦 | 欧美精品高清视频| 99麻豆久久久国产精品免费优播| 精品一区二区在线免费观看| 性做久久久久久| 1区2区3区精品视频| 国产三级精品三级| 欧美大黄免费观看| 欧美日韩国产123区| 色婷婷久久综合| aaa国产一区| 国产69精品一区二区亚洲孕妇| 久久不见久久见免费视频7| 亚洲成av人片在线观看| 亚洲欧美色图小说| 国产精品成人网| 中文字幕国产一区| 久久精品综合网| 亚洲精品一区二区三区蜜桃下载| 欧美女孩性生活视频| 在线观看亚洲a| 91视频精品在这里| 99久久精品国产一区| 国产白丝网站精品污在线入口| 久久成人免费网站| 老司机精品视频导航| 日本美女一区二区三区视频| 午夜精品久久久久久久蜜桃app| 亚洲久草在线视频| 亚洲美女一区二区三区| 亚洲精品乱码久久久久久黑人| 中文字幕亚洲一区二区av在线 | 日韩一区国产二区欧美三区| 欧美精品在线观看播放| 欧美老人xxxx18| 777午夜精品免费视频| 欧美精品亚洲二区| 91精品国产综合久久精品麻豆| 欧美另类z0zxhd电影| 3d动漫精品啪啪一区二区竹菊| 制服丝袜在线91| 日韩免费视频线观看| 精品国内片67194| 精品国产一区二区精华| 久久先锋影音av鲁色资源网| 久久这里都是精品| 亚洲国产精品传媒在线观看| 国产精品久久久久四虎| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 中文字幕不卡在线| 亚洲精品水蜜桃| 亚洲成人你懂的| 蜜桃视频第一区免费观看| 韩国av一区二区三区在线观看| 国产电影一区二区三区| 成人精品视频一区二区三区尤物| 99久久婷婷国产综合精品 | 成人性生交大片免费看中文| 99麻豆久久久国产精品免费| 日本道精品一区二区三区| 欧美日韩精品欧美日韩精品 | 欧美中文字幕一二三区视频| 欧美日韩国产高清一区| 日韩一区二区精品| 国产欧美视频一区二区三区| 国产精品不卡一区| 亚洲成人在线免费| 精品一区二区三区免费播放| 岛国精品在线播放| 欧美性大战久久久| 欧美tickling挠脚心丨vk| 国产精品女主播av| 亚洲国产精品一区二区久久恐怖片 | 奇米色777欧美一区二区| 国产精品亚洲а∨天堂免在线| 91在线你懂得| 欧美一区二区三区在线视频| 国产亚洲短视频| 亚洲一区二区欧美日韩| 国内精品视频666| 日本精品视频一区二区| 欧美刺激脚交jootjob|