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

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

?? ftgrays.c

?? QT 開發環境里面一個很重要的文件
?? C
?? 第 1 頁 / 共 4 頁
字號:
/***************************************************************************//*                                                                         *//*  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...                                                  */    /*                                                              */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产在线一区观看| 国产精品毛片久久久久久| 国产精品一二三四| 亚洲国产精品一区二区久久恐怖片| 欧美成人精品福利| 欧美亚洲日本一区| 国产99一区视频免费| 亚洲成a人片在线观看中文| 国产精品乱码久久久久久| 欧美高清视频在线高清观看mv色露露十八| 国产精品99久久久久久久vr| 亚洲成人福利片| 亚洲丝袜自拍清纯另类| 精品久久久久久久久久久久久久久| 在线免费不卡视频| 成人国产视频在线观看| 国产一区二区三区av电影| 日韩精品亚洲一区二区三区免费| 中文字幕一区在线观看| 久久综合色播五月| 精品乱人伦一区二区三区| 9191成人精品久久| 欧洲在线/亚洲| 色av一区二区| 91蝌蚪porny九色| 成人性视频网站| 成人免费视频caoporn| 国产一区二区三区综合| 久久99精品久久久久久| 蜜臀国产一区二区三区在线播放| 偷窥少妇高潮呻吟av久久免费| 亚洲女爱视频在线| 亚洲精品免费在线观看| 亚洲免费观看在线观看| 最新日韩av在线| 国产精品传媒在线| 亚洲日本在线a| 中文字幕亚洲区| 亚洲视频 欧洲视频| √…a在线天堂一区| 一区二区三区高清| 亚洲一区二区视频| 亚洲成人7777| 日本怡春院一区二区| 日韩精品久久理论片| 免费久久99精品国产| 美女免费视频一区| 久久99精品久久久久久久久久久久| 亚洲欧美日韩人成在线播放| 日日摸夜夜添夜夜添亚洲女人| 日韩欧美国产成人一区二区| 在线播放国产精品二区一二区四区| 欧美无乱码久久久免费午夜一区 | 亚洲成人av福利| 丝袜亚洲另类欧美综合| 蜜臀av性久久久久蜜臀av麻豆| 蜜桃在线一区二区三区| 美日韩一区二区| 国产高清精品久久久久| 播五月开心婷婷综合| 日本精品一级二级| 欧美日本乱大交xxxxx| 欧美电影精品一区二区| 国产欧美精品一区aⅴ影院| 亚洲桃色在线一区| 日韩**一区毛片| 国产成人亚洲综合色影视| 不卡电影一区二区三区| 欧美日韩一本到| 久久亚洲捆绑美女| 亚洲少妇最新在线视频| 免费成人性网站| 成人app网站| 91精品国产91热久久久做人人| xnxx国产精品| 亚洲综合免费观看高清完整版| 蜜桃视频一区二区三区| 成人毛片在线观看| 欧美日韩中文字幕一区| 精品国产乱码久久久久久1区2区 | 成人午夜激情片| 欧美高清激情brazzers| 国产视频一区在线观看| 亚洲图片欧美视频| 国产麻豆视频一区二区| 欧美性生活久久| www日韩大片| 偷拍一区二区三区四区| 国产91丝袜在线观看| 欧美日韩综合在线| 国产精品久久久久一区二区三区共 | 一区二区久久久久| 国产一区二区三区免费看 | 国产福利精品导航| 欧美一区二区三区思思人| 中文字幕制服丝袜一区二区三区 | 污片在线观看一区二区| 成人国产视频在线观看| 欧美r级电影在线观看| 夜夜嗨av一区二区三区中文字幕| 国产在线观看免费一区| 欧美日韩在线三级| 国产精品国模大尺度视频| 久久超碰97中文字幕| 91久久人澡人人添人人爽欧美 | 欧美不卡在线视频| 中文子幕无线码一区tr| 久久久另类综合| 日韩成人午夜电影| 在线日韩国产精品| 亚洲国产精品成人综合色在线婷婷| 日韩av一区二区三区四区| 91搞黄在线观看| 成人免费在线观看入口| 国产v日产∨综合v精品视频| 欧美成人猛片aaaaaaa| 视频一区国产视频| 精品视频资源站| 亚洲综合视频在线| 91一区二区在线观看| 亚洲欧美中日韩| 成人永久免费视频| 欧美激情中文字幕| 国产乱码精品一区二区三区忘忧草| 51精品秘密在线观看| 天天影视涩香欲综合网| 欧美日韩1区2区| 亚洲五码中文字幕| 欧美写真视频网站| 亚洲国产成人精品视频| 欧美日韩免费视频| 亚洲电影你懂得| 欧美亚洲丝袜传媒另类| 一区二区三区电影在线播| 欧美曰成人黄网| 亚洲一区影音先锋| 欧美日本国产一区| 日韩精品一区第一页| 日韩欧美一级特黄在线播放| 精品中文字幕一区二区| 久久女同精品一区二区| 丁香激情综合五月| 亚洲欧美日韩国产手机在线 | 67194成人在线观看| 日韩av在线免费观看不卡| 欧美一区二区日韩一区二区| 日韩不卡免费视频| 精品国产人成亚洲区| 国产黄人亚洲片| 中文字幕中文字幕在线一区| 日本精品视频一区二区| 亚洲第一狼人社区| 欧美videos大乳护士334| 国产一区91精品张津瑜| 国产精品的网站| 欧美日韩精品一区二区三区蜜桃| 日本强好片久久久久久aaa| 欧美成人艳星乳罩| 成人综合在线观看| 亚洲综合视频网| 日韩欧美一级在线播放| 成人动漫视频在线| 亚洲一二三区在线观看| 精品久久免费看| av成人免费在线观看| 婷婷开心激情综合| 久久亚洲一区二区三区四区| 91丨国产丨九色丨pron| 免费av成人在线| 中文字幕在线播放不卡一区| 欧美日韩小视频| 国产一区二区三区四区五区美女| 亚洲欧美一区二区三区极速播放| 欧美日韩一级大片网址| 国产成人免费视| 亚欧色一区w666天堂| 国产午夜精品久久| 欧美美女网站色| 成人免费看片app下载| 视频一区中文字幕| 国产精品久久精品日日| 日韩午夜电影在线观看| 91麻豆精品一区二区三区| 美女网站色91| 一区二区三区蜜桃网| 久久久综合精品| 69堂国产成人免费视频| 成人国产精品免费观看| 久久国产精品第一页| 亚洲精品少妇30p| 国产欧美日韩精品a在线观看| 欧美日韩卡一卡二| 成人ar影院免费观看视频| 裸体一区二区三区| 亚洲国产视频网站| 国产精品久久久久7777按摩| 久久综合精品国产一区二区三区| 色美美综合视频| 成人av动漫网站| 国模娜娜一区二区三区|