| OLD | NEW | 
|---|
| 1 /***************************************************************************/ | 1 /***************************************************************************/ | 
| 2 /*                                                                         */ | 2 /*                                                                         */ | 
| 3 /*  ftimage.h                                                              */ | 3 /*  ftimage.h                                                              */ | 
| 4 /*                                                                         */ | 4 /*                                                                         */ | 
| 5 /*    FreeType glyph image formats and default raster interface            */ | 5 /*    FreeType glyph image formats and default raster interface            */ | 
| 6 /*    (specification).                                                     */ | 6 /*    (specification).                                                     */ | 
| 7 /*                                                                         */ | 7 /*                                                                         */ | 
| 8 /*  Copyright 1996-2010, 2013 by                                           */ | 8 /*  Copyright 1996-2010, 2013, 2014 by                                     */ | 
| 9 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */ | 9 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */ | 
| 10 /*                                                                         */ | 10 /*                                                                         */ | 
| 11 /*  This file is part of the FreeType project, and may only be used,       */ | 11 /*  This file is part of the FreeType project, and may only be used,       */ | 
| 12 /*  modified, and distributed under the terms of the FreeType project      */ | 12 /*  modified, and distributed under the terms of the FreeType project      */ | 
| 13 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */ | 13 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */ | 
| 14 /*  this file you indicate that you have read the license and              */ | 14 /*  this file you indicate that you have read the license and              */ | 
| 15 /*  understand and accept it fully.                                        */ | 15 /*  understand and accept it fully.                                        */ | 
| 16 /*                                                                         */ | 16 /*                                                                         */ | 
| 17 /***************************************************************************/ | 17 /***************************************************************************/ | 
| 18 | 18 | 
| 19   /*************************************************************************/ | 19   /*************************************************************************/ | 
| 20   /*                                                                       */ | 20   /*                                                                       */ | 
| 21   /* Note: A `raster' is simply a scan-line converter, used to render      */ | 21   /* Note: A `raster' is simply a scan-line converter, used to render      */ | 
| 22   /*       FT_Outlines into FT_Bitmaps.                                    */ | 22   /*       FT_Outlines into FT_Bitmaps.                                    */ | 
| 23   /*                                                                       */ | 23   /*                                                                       */ | 
| 24   /*************************************************************************/ | 24   /*************************************************************************/ | 
| 25 | 25 | 
| 26 | 26 | 
| 27 #ifndef __FTIMAGE_H__ | 27 #ifndef __FTIMAGE_H__ | 
| 28 #define __FTIMAGE_H__ | 28 #define __FTIMAGE_H__ | 
| 29 | 29 | 
| 30 | 30 | 
| 31   /* _STANDALONE_ is from ftgrays.c */ | 31   /* _STANDALONE_ is from ftgrays.c */ | 
| 32 #ifndef _STANDALONE_ | 32 #ifndef _STANDALONE_ | 
| 33 #include "../ft2build.h" | 33 #include <ft2build.h> | 
| 34 #endif | 34 #endif | 
| 35 | 35 | 
| 36 | 36 | 
| 37 FT_BEGIN_HEADER | 37 FT_BEGIN_HEADER | 
| 38 | 38 | 
| 39 | 39 | 
| 40   /*************************************************************************/ | 40   /*************************************************************************/ | 
| 41   /*                                                                       */ | 41   /*                                                                       */ | 
| 42   /* <Section>                                                             */ | 42   /* <Section>                                                             */ | 
| 43   /*    basic_types                                                        */ | 43   /*    basic_types                                                        */ | 
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 186     FT_PIXEL_MODE_GRAY4, | 186     FT_PIXEL_MODE_GRAY4, | 
| 187     FT_PIXEL_MODE_LCD, | 187     FT_PIXEL_MODE_LCD, | 
| 188     FT_PIXEL_MODE_LCD_V, | 188     FT_PIXEL_MODE_LCD_V, | 
| 189     FT_PIXEL_MODE_BGRA, | 189     FT_PIXEL_MODE_BGRA, | 
| 190 | 190 | 
| 191     FT_PIXEL_MODE_MAX      /* do not remove */ | 191     FT_PIXEL_MODE_MAX      /* do not remove */ | 
| 192 | 192 | 
| 193   } FT_Pixel_Mode; | 193   } FT_Pixel_Mode; | 
| 194 | 194 | 
| 195 | 195 | 
| 196   /*************************************************************************/ | 196   /* these constants are deprecated; use the corresponding `FT_Pixel_Mode' */ | 
| 197   /*                                                                       */ | 197   /* values instead.                                                       */ | 
| 198   /* <Enum>                                                                */ |  | 
| 199   /*    ft_pixel_mode_xxx                                                  */ |  | 
| 200   /*                                                                       */ |  | 
| 201   /* <Description>                                                         */ |  | 
| 202   /*    A list of deprecated constants.  Use the corresponding             */ |  | 
| 203   /*    @FT_Pixel_Mode values instead.                                     */ |  | 
| 204   /*                                                                       */ |  | 
| 205   /* <Values>                                                              */ |  | 
| 206   /*    ft_pixel_mode_none  :: See @FT_PIXEL_MODE_NONE.                    */ |  | 
| 207   /*    ft_pixel_mode_mono  :: See @FT_PIXEL_MODE_MONO.                    */ |  | 
| 208   /*    ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY.                    */ |  | 
| 209   /*    ft_pixel_mode_pal2  :: See @FT_PIXEL_MODE_GRAY2.                   */ |  | 
| 210   /*    ft_pixel_mode_pal4  :: See @FT_PIXEL_MODE_GRAY4.                   */ |  | 
| 211   /*                                                                       */ |  | 
| 212 #define ft_pixel_mode_none   FT_PIXEL_MODE_NONE | 198 #define ft_pixel_mode_none   FT_PIXEL_MODE_NONE | 
| 213 #define ft_pixel_mode_mono   FT_PIXEL_MODE_MONO | 199 #define ft_pixel_mode_mono   FT_PIXEL_MODE_MONO | 
| 214 #define ft_pixel_mode_grays  FT_PIXEL_MODE_GRAY | 200 #define ft_pixel_mode_grays  FT_PIXEL_MODE_GRAY | 
| 215 #define ft_pixel_mode_pal2   FT_PIXEL_MODE_GRAY2 | 201 #define ft_pixel_mode_pal2   FT_PIXEL_MODE_GRAY2 | 
| 216 #define ft_pixel_mode_pal4   FT_PIXEL_MODE_GRAY4 | 202 #define ft_pixel_mode_pal4   FT_PIXEL_MODE_GRAY4 | 
| 217 | 203 | 
| 218  /* */ |  | 
| 219 |  | 
| 220 #if 0 |  | 
| 221 | 204 | 
| 222   /*************************************************************************/ | 205   /*************************************************************************/ | 
| 223   /*                                                                       */ | 206   /*                                                                       */ | 
| 224   /* <Enum>                                                                */ |  | 
| 225   /*    FT_Palette_Mode                                                    */ |  | 
| 226   /*                                                                       */ |  | 
| 227   /* <Description>                                                         */ |  | 
| 228   /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT!                           */ |  | 
| 229   /*                                                                       */ |  | 
| 230   /*    An enumeration type to describe the format of a bitmap palette,    */ |  | 
| 231   /*    used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8.               */ |  | 
| 232   /*                                                                       */ |  | 
| 233   /* <Values>                                                              */ |  | 
| 234   /*    ft_palette_mode_rgb  :: The palette is an array of 3-byte RGB      */ |  | 
| 235   /*                            records.                                   */ |  | 
| 236   /*                                                                       */ |  | 
| 237   /*    ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA     */ |  | 
| 238   /*                            records.                                   */ |  | 
| 239   /*                                                                       */ |  | 
| 240   /* <Note>                                                                */ |  | 
| 241   /*    As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by       */ |  | 
| 242   /*    FreeType, these types are not handled by the library itself.       */ |  | 
| 243   /*                                                                       */ |  | 
| 244   typedef enum  FT_Palette_Mode_ |  | 
| 245   { |  | 
| 246     ft_palette_mode_rgb = 0, |  | 
| 247     ft_palette_mode_rgba, |  | 
| 248 |  | 
| 249     ft_palette_mode_max   /* do not remove */ |  | 
| 250 |  | 
| 251   } FT_Palette_Mode; |  | 
| 252 |  | 
| 253   /* */ |  | 
| 254 |  | 
| 255 #endif |  | 
| 256 |  | 
| 257 |  | 
| 258   /*************************************************************************/ |  | 
| 259   /*                                                                       */ |  | 
| 260   /* <Struct>                                                              */ | 207   /* <Struct>                                                              */ | 
| 261   /*    FT_Bitmap                                                          */ | 208   /*    FT_Bitmap                                                          */ | 
| 262   /*                                                                       */ | 209   /*                                                                       */ | 
| 263   /* <Description>                                                         */ | 210   /* <Description>                                                         */ | 
| 264   /*    A structure used to describe a bitmap or pixmap to the raster.     */ | 211   /*    A structure used to describe a bitmap or pixmap to the raster.     */ | 
| 265   /*    Note that we now manage pixmaps of various depths through the      */ | 212   /*    Note that we now manage pixmaps of various depths through the      */ | 
| 266   /*    `pixel_mode' field.                                                */ | 213   /*    `pixel_mode' field.                                                */ | 
| 267   /*                                                                       */ | 214   /*                                                                       */ | 
| 268   /* <Fields>                                                              */ | 215   /* <Fields>                                                              */ | 
| 269   /*    rows         :: The number of bitmap rows.                         */ | 216   /*    rows         :: The number of bitmap rows.                         */ | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 311   /*                    field is intended for paletted pixel modes.  Not   */ | 258   /*                    field is intended for paletted pixel modes.  Not   */ | 
| 312   /*                    used currently.                                    */ | 259   /*                    used currently.                                    */ | 
| 313   /*                                                                       */ | 260   /*                                                                       */ | 
| 314   /* <Note>                                                                */ | 261   /* <Note>                                                                */ | 
| 315   /*   For now, the only pixel modes supported by FreeType are mono and    */ | 262   /*   For now, the only pixel modes supported by FreeType are mono and    */ | 
| 316   /*   grays.  However, drivers might be added in the future to support    */ | 263   /*   grays.  However, drivers might be added in the future to support    */ | 
| 317   /*   more `colorful' options.                                            */ | 264   /*   more `colorful' options.                                            */ | 
| 318   /*                                                                       */ | 265   /*                                                                       */ | 
| 319   typedef struct  FT_Bitmap_ | 266   typedef struct  FT_Bitmap_ | 
| 320   { | 267   { | 
| 321     int             rows; | 268     unsigned int    rows; | 
| 322     int             width; | 269     unsigned int    width; | 
| 323     int             pitch; | 270     int             pitch; | 
| 324     unsigned char*  buffer; | 271     unsigned char*  buffer; | 
| 325     short           num_grays; | 272     unsigned short  num_grays; | 
| 326     char            pixel_mode; | 273     unsigned char   pixel_mode; | 
| 327     char            palette_mode; | 274     unsigned char   palette_mode; | 
| 328     void*           palette; | 275     void*           palette; | 
| 329 | 276 | 
| 330   } FT_Bitmap; | 277   } FT_Bitmap; | 
| 331 | 278 | 
| 332 | 279 | 
| 333   /*************************************************************************/ | 280   /*************************************************************************/ | 
| 334   /*                                                                       */ | 281   /*                                                                       */ | 
| 335   /* <Section>                                                             */ | 282   /* <Section>                                                             */ | 
| 336   /*    outline_processing                                                 */ | 283   /*    outline_processing                                                 */ | 
| 337   /*                                                                       */ | 284   /*                                                                       */ | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 374   /*                  Bits 3 and~4 are reserved for internal purposes.     */ | 321   /*                  Bits 3 and~4 are reserved for internal purposes.     */ | 
| 375   /*                                                                       */ | 322   /*                                                                       */ | 
| 376   /*    contours   :: An array of `n_contours' shorts, giving the end      */ | 323   /*    contours   :: An array of `n_contours' shorts, giving the end      */ | 
| 377   /*                  point of each contour within the outline.  For       */ | 324   /*                  point of each contour within the outline.  For       */ | 
| 378   /*                  example, the first contour is defined by the points  */ | 325   /*                  example, the first contour is defined by the points  */ | 
| 379   /*                  `0' to `contours[0]', the second one is defined by   */ | 326   /*                  `0' to `contours[0]', the second one is defined by   */ | 
| 380   /*                  the points `contours[0]+1' to `contours[1]', etc.    */ | 327   /*                  the points `contours[0]+1' to `contours[1]', etc.    */ | 
| 381   /*                                                                       */ | 328   /*                                                                       */ | 
| 382   /*    flags      :: A set of bit flags used to characterize the outline  */ | 329   /*    flags      :: A set of bit flags used to characterize the outline  */ | 
| 383   /*                  and give hints to the scan-converter and hinter on   */ | 330   /*                  and give hints to the scan-converter and hinter on   */ | 
| 384   /*                  how to convert/grid-fit it.  See @FT_OUTLINE_FLAGS.  */ | 331   /*                  how to convert/grid-fit it.  See @FT_OUTLINE_XXX.    */ | 
| 385   /*                                                                       */ | 332   /*                                                                       */ | 
| 386   /* <Note>                                                                */ | 333   /* <Note>                                                                */ | 
| 387   /*    The B/W rasterizer only checks bit~2 in the `tags' array for the   */ | 334   /*    The B/W rasterizer only checks bit~2 in the `tags' array for the   */ | 
| 388   /*    first point of each contour.  The drop-out mode as given with      */ | 335   /*    first point of each contour.  The drop-out mode as given with      */ | 
| 389   /*    @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and       */ | 336   /*    @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and       */ | 
| 390   /*    @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden.           */ | 337   /*    @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden.           */ | 
| 391   /*                                                                       */ | 338   /*                                                                       */ | 
| 392   typedef struct  FT_Outline_ | 339   typedef struct  FT_Outline_ | 
| 393   { | 340   { | 
| 394     short       n_contours;      /* number of contours in glyph        */ | 341     short       n_contours;      /* number of contours in glyph        */ | 
| 395     short       n_points;        /* number of points in the glyph      */ | 342     short       n_points;        /* number of points in the glyph      */ | 
| 396 | 343 | 
| 397     FT_Vector*  points;          /* the outline's points               */ | 344     FT_Vector*  points;          /* the outline's points               */ | 
| 398     char*       tags;            /* the points flags                   */ | 345     char*       tags;            /* the points flags                   */ | 
| 399     short*      contours;        /* the contour end points             */ | 346     short*      contours;        /* the contour end points             */ | 
| 400 | 347 | 
| 401     int         flags;           /* outline masks                      */ | 348     int         flags;           /* outline masks                      */ | 
| 402 | 349 | 
| 403   } FT_Outline; | 350   } FT_Outline; | 
| 404 | 351 | 
|  | 352   /* */ | 
|  | 353 | 
| 405   /* Following limits must be consistent with */ | 354   /* Following limits must be consistent with */ | 
| 406   /* FT_Outline.{n_contours,n_points}         */ | 355   /* FT_Outline.{n_contours,n_points}         */ | 
| 407 #define FT_OUTLINE_CONTOURS_MAX  SHRT_MAX | 356 #define FT_OUTLINE_CONTOURS_MAX  SHRT_MAX | 
| 408 #define FT_OUTLINE_POINTS_MAX    SHRT_MAX | 357 #define FT_OUTLINE_POINTS_MAX    SHRT_MAX | 
| 409 | 358 | 
| 410 | 359 | 
| 411   /*************************************************************************/ | 360   /*************************************************************************/ | 
| 412   /*                                                                       */ | 361   /*                                                                       */ | 
| 413   /* <Enum>                                                                */ | 362   /* <Enum>                                                                */ | 
| 414   /*    FT_OUTLINE_FLAGS                                                   */ | 363   /*    FT_OUTLINE_XXX                                                     */ | 
| 415   /*                                                                       */ | 364   /*                                                                       */ | 
| 416   /* <Description>                                                         */ | 365   /* <Description>                                                         */ | 
| 417   /*    A list of bit-field constants use for the flags in an outline's    */ | 366   /*    A list of bit-field constants use for the flags in an outline's    */ | 
| 418   /*    `flags' field.                                                     */ | 367   /*    `flags' field.                                                     */ | 
| 419   /*                                                                       */ | 368   /*                                                                       */ | 
| 420   /* <Values>                                                              */ | 369   /* <Values>                                                              */ | 
| 421   /*    FT_OUTLINE_NONE ::                                                 */ | 370   /*    FT_OUTLINE_NONE ::                                                 */ | 
| 422   /*      Value~0 is reserved.                                             */ | 371   /*      Value~0 is reserved.                                             */ | 
| 423   /*                                                                       */ | 372   /*                                                                       */ | 
| 424   /*    FT_OUTLINE_OWNER ::                                                */ | 373   /*    FT_OUTLINE_OWNER ::                                                */ | 
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 485 #define FT_OUTLINE_EVEN_ODD_FILL    0x2 | 434 #define FT_OUTLINE_EVEN_ODD_FILL    0x2 | 
| 486 #define FT_OUTLINE_REVERSE_FILL     0x4 | 435 #define FT_OUTLINE_REVERSE_FILL     0x4 | 
| 487 #define FT_OUTLINE_IGNORE_DROPOUTS  0x8 | 436 #define FT_OUTLINE_IGNORE_DROPOUTS  0x8 | 
| 488 #define FT_OUTLINE_SMART_DROPOUTS   0x10 | 437 #define FT_OUTLINE_SMART_DROPOUTS   0x10 | 
| 489 #define FT_OUTLINE_INCLUDE_STUBS    0x20 | 438 #define FT_OUTLINE_INCLUDE_STUBS    0x20 | 
| 490 | 439 | 
| 491 #define FT_OUTLINE_HIGH_PRECISION   0x100 | 440 #define FT_OUTLINE_HIGH_PRECISION   0x100 | 
| 492 #define FT_OUTLINE_SINGLE_PASS      0x200 | 441 #define FT_OUTLINE_SINGLE_PASS      0x200 | 
| 493 | 442 | 
| 494 | 443 | 
| 495  /************************************************************************* | 444   /* these constants are deprecated; use the corresponding */ | 
| 496   * | 445   /* `FT_OUTLINE_XXX' values instead                       */ | 
| 497   * @enum: |  | 
| 498   *   ft_outline_flags |  | 
| 499   * |  | 
| 500   * @description: |  | 
| 501   *   These constants are deprecated.  Please use the corresponding |  | 
| 502   *   @FT_OUTLINE_FLAGS values. |  | 
| 503   * |  | 
| 504   * @values: |  | 
| 505   *   ft_outline_none            :: See @FT_OUTLINE_NONE. |  | 
| 506   *   ft_outline_owner           :: See @FT_OUTLINE_OWNER. |  | 
| 507   *   ft_outline_even_odd_fill   :: See @FT_OUTLINE_EVEN_ODD_FILL. |  | 
| 508   *   ft_outline_reverse_fill    :: See @FT_OUTLINE_REVERSE_FILL. |  | 
| 509   *   ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS. |  | 
| 510   *   ft_outline_high_precision  :: See @FT_OUTLINE_HIGH_PRECISION. |  | 
| 511   *   ft_outline_single_pass     :: See @FT_OUTLINE_SINGLE_PASS. |  | 
| 512   */ |  | 
| 513 #define ft_outline_none             FT_OUTLINE_NONE | 446 #define ft_outline_none             FT_OUTLINE_NONE | 
| 514 #define ft_outline_owner            FT_OUTLINE_OWNER | 447 #define ft_outline_owner            FT_OUTLINE_OWNER | 
| 515 #define ft_outline_even_odd_fill    FT_OUTLINE_EVEN_ODD_FILL | 448 #define ft_outline_even_odd_fill    FT_OUTLINE_EVEN_ODD_FILL | 
| 516 #define ft_outline_reverse_fill     FT_OUTLINE_REVERSE_FILL | 449 #define ft_outline_reverse_fill     FT_OUTLINE_REVERSE_FILL | 
| 517 #define ft_outline_ignore_dropouts  FT_OUTLINE_IGNORE_DROPOUTS | 450 #define ft_outline_ignore_dropouts  FT_OUTLINE_IGNORE_DROPOUTS | 
| 518 #define ft_outline_high_precision   FT_OUTLINE_HIGH_PRECISION | 451 #define ft_outline_high_precision   FT_OUTLINE_HIGH_PRECISION | 
| 519 #define ft_outline_single_pass      FT_OUTLINE_SINGLE_PASS | 452 #define ft_outline_single_pass      FT_OUTLINE_SINGLE_PASS | 
| 520 | 453 | 
| 521   /* */ | 454   /* */ | 
| 522 | 455 | 
| (...skipping 25 matching lines...) Expand all  Loading... | 
| 548   /*                                                                       */ | 481   /*                                                                       */ | 
| 549   /* <Description>                                                         */ | 482   /* <Description>                                                         */ | 
| 550   /*    A function pointer type used to describe the signature of a `move  */ | 483   /*    A function pointer type used to describe the signature of a `move  */ | 
| 551   /*    to' function during outline walking/decomposition.                 */ | 484   /*    to' function during outline walking/decomposition.                 */ | 
| 552   /*                                                                       */ | 485   /*                                                                       */ | 
| 553   /*    A `move to' is emitted to start a new contour in an outline.       */ | 486   /*    A `move to' is emitted to start a new contour in an outline.       */ | 
| 554   /*                                                                       */ | 487   /*                                                                       */ | 
| 555   /* <Input>                                                               */ | 488   /* <Input>                                                               */ | 
| 556   /*    to   :: A pointer to the target point of the `move to'.            */ | 489   /*    to   :: A pointer to the target point of the `move to'.            */ | 
| 557   /*                                                                       */ | 490   /*                                                                       */ | 
| 558   /*    user :: A typeless pointer which is passed from the caller of the  */ | 491   /*    user :: A typeless pointer, which is passed from the caller of the */ | 
| 559   /*            decomposition function.                                    */ | 492   /*            decomposition function.                                    */ | 
| 560   /*                                                                       */ | 493   /*                                                                       */ | 
| 561   /* <Return>                                                              */ | 494   /* <Return>                                                              */ | 
| 562   /*    Error code.  0~means success.                                      */ | 495   /*    Error code.  0~means success.                                      */ | 
| 563   /*                                                                       */ | 496   /*                                                                       */ | 
| 564   typedef int | 497   typedef int | 
| 565   (*FT_Outline_MoveToFunc)( const FT_Vector*  to, | 498   (*FT_Outline_MoveToFunc)( const FT_Vector*  to, | 
| 566                             void*             user ); | 499                             void*             user ); | 
| 567 | 500 | 
| 568 #define FT_Outline_MoveTo_Func  FT_Outline_MoveToFunc | 501 #define FT_Outline_MoveTo_Func  FT_Outline_MoveToFunc | 
| 569 | 502 | 
| 570 | 503 | 
| 571   /*************************************************************************/ | 504   /*************************************************************************/ | 
| 572   /*                                                                       */ | 505   /*                                                                       */ | 
| 573   /* <FuncType>                                                            */ | 506   /* <FuncType>                                                            */ | 
| 574   /*    FT_Outline_LineToFunc                                              */ | 507   /*    FT_Outline_LineToFunc                                              */ | 
| 575   /*                                                                       */ | 508   /*                                                                       */ | 
| 576   /* <Description>                                                         */ | 509   /* <Description>                                                         */ | 
| 577   /*    A function pointer type used to describe the signature of a `line  */ | 510   /*    A function pointer type used to describe the signature of a `line  */ | 
| 578   /*    to' function during outline walking/decomposition.                 */ | 511   /*    to' function during outline walking/decomposition.                 */ | 
| 579   /*                                                                       */ | 512   /*                                                                       */ | 
| 580   /*    A `line to' is emitted to indicate a segment in the outline.       */ | 513   /*    A `line to' is emitted to indicate a segment in the outline.       */ | 
| 581   /*                                                                       */ | 514   /*                                                                       */ | 
| 582   /* <Input>                                                               */ | 515   /* <Input>                                                               */ | 
| 583   /*    to   :: A pointer to the target point of the `line to'.            */ | 516   /*    to   :: A pointer to the target point of the `line to'.            */ | 
| 584   /*                                                                       */ | 517   /*                                                                       */ | 
| 585   /*    user :: A typeless pointer which is passed from the caller of the  */ | 518   /*    user :: A typeless pointer, which is passed from the caller of the */ | 
| 586   /*            decomposition function.                                    */ | 519   /*            decomposition function.                                    */ | 
| 587   /*                                                                       */ | 520   /*                                                                       */ | 
| 588   /* <Return>                                                              */ | 521   /* <Return>                                                              */ | 
| 589   /*    Error code.  0~means success.                                      */ | 522   /*    Error code.  0~means success.                                      */ | 
| 590   /*                                                                       */ | 523   /*                                                                       */ | 
| 591   typedef int | 524   typedef int | 
| 592   (*FT_Outline_LineToFunc)( const FT_Vector*  to, | 525   (*FT_Outline_LineToFunc)( const FT_Vector*  to, | 
| 593                             void*             user ); | 526                             void*             user ); | 
| 594 | 527 | 
| 595 #define FT_Outline_LineTo_Func  FT_Outline_LineToFunc | 528 #define FT_Outline_LineTo_Func  FT_Outline_LineToFunc | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 606   /*                                                                       */ | 539   /*                                                                       */ | 
| 607   /*    A `conic to' is emitted to indicate a second-order Bézier arc in   */ | 540   /*    A `conic to' is emitted to indicate a second-order Bézier arc in   */ | 
| 608   /*    the outline.                                                       */ | 541   /*    the outline.                                                       */ | 
| 609   /*                                                                       */ | 542   /*                                                                       */ | 
| 610   /* <Input>                                                               */ | 543   /* <Input>                                                               */ | 
| 611   /*    control :: An intermediate control point between the last position */ | 544   /*    control :: An intermediate control point between the last position */ | 
| 612   /*               and the new target in `to'.                             */ | 545   /*               and the new target in `to'.                             */ | 
| 613   /*                                                                       */ | 546   /*                                                                       */ | 
| 614   /*    to      :: A pointer to the target end point of the conic arc.     */ | 547   /*    to      :: A pointer to the target end point of the conic arc.     */ | 
| 615   /*                                                                       */ | 548   /*                                                                       */ | 
| 616   /*    user    :: A typeless pointer which is passed from the caller of   */ | 549   /*    user    :: A typeless pointer, which is passed from the caller of  */ | 
| 617   /*               the decomposition function.                             */ | 550   /*               the decomposition function.                             */ | 
| 618   /*                                                                       */ | 551   /*                                                                       */ | 
| 619   /* <Return>                                                              */ | 552   /* <Return>                                                              */ | 
| 620   /*    Error code.  0~means success.                                      */ | 553   /*    Error code.  0~means success.                                      */ | 
| 621   /*                                                                       */ | 554   /*                                                                       */ | 
| 622   typedef int | 555   typedef int | 
| 623   (*FT_Outline_ConicToFunc)( const FT_Vector*  control, | 556   (*FT_Outline_ConicToFunc)( const FT_Vector*  control, | 
| 624                              const FT_Vector*  to, | 557                              const FT_Vector*  to, | 
| 625                              void*             user ); | 558                              void*             user ); | 
| 626 | 559 | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
| 638   /*                                                                       */ | 571   /*                                                                       */ | 
| 639   /*    A `cubic to' is emitted to indicate a third-order Bézier arc.      */ | 572   /*    A `cubic to' is emitted to indicate a third-order Bézier arc.      */ | 
| 640   /*                                                                       */ | 573   /*                                                                       */ | 
| 641   /* <Input>                                                               */ | 574   /* <Input>                                                               */ | 
| 642   /*    control1 :: A pointer to the first Bézier control point.           */ | 575   /*    control1 :: A pointer to the first Bézier control point.           */ | 
| 643   /*                                                                       */ | 576   /*                                                                       */ | 
| 644   /*    control2 :: A pointer to the second Bézier control point.          */ | 577   /*    control2 :: A pointer to the second Bézier control point.          */ | 
| 645   /*                                                                       */ | 578   /*                                                                       */ | 
| 646   /*    to       :: A pointer to the target end point.                     */ | 579   /*    to       :: A pointer to the target end point.                     */ | 
| 647   /*                                                                       */ | 580   /*                                                                       */ | 
| 648   /*    user     :: A typeless pointer which is passed from the caller of  */ | 581   /*    user     :: A typeless pointer, which is passed from the caller of */ | 
| 649   /*                the decomposition function.                            */ | 582   /*                the decomposition function.                            */ | 
| 650   /*                                                                       */ | 583   /*                                                                       */ | 
| 651   /* <Return>                                                              */ | 584   /* <Return>                                                              */ | 
| 652   /*    Error code.  0~means success.                                      */ | 585   /*    Error code.  0~means success.                                      */ | 
| 653   /*                                                                       */ | 586   /*                                                                       */ | 
| 654   typedef int | 587   typedef int | 
| 655   (*FT_Outline_CubicToFunc)( const FT_Vector*  control1, | 588   (*FT_Outline_CubicToFunc)( const FT_Vector*  control1, | 
| 656                              const FT_Vector*  control2, | 589                              const FT_Vector*  control2, | 
| 657                              const FT_Vector*  to, | 590                              const FT_Vector*  to, | 
| 658                              void*             user ); | 591                              void*             user ); | 
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 789     FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ), | 722     FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ), | 
| 790 | 723 | 
| 791     FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ), | 724     FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ), | 
| 792     FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP,    'b', 'i', 't', 's' ), | 725     FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP,    'b', 'i', 't', 's' ), | 
| 793     FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE,   'o', 'u', 't', 'l' ), | 726     FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE,   'o', 'u', 't', 'l' ), | 
| 794     FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER,   'p', 'l', 'o', 't' ) | 727     FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER,   'p', 'l', 'o', 't' ) | 
| 795 | 728 | 
| 796   } FT_Glyph_Format; | 729   } FT_Glyph_Format; | 
| 797 | 730 | 
| 798 | 731 | 
| 799   /*************************************************************************/ | 732   /* these constants are deprecated; use the corresponding */ | 
| 800   /*                                                                       */ | 733   /* `FT_Glyph_Format' values instead.                     */ | 
| 801   /* <Enum>                                                                */ |  | 
| 802   /*    ft_glyph_format_xxx                                                */ |  | 
| 803   /*                                                                       */ |  | 
| 804   /* <Description>                                                         */ |  | 
| 805   /*    A list of deprecated constants.  Use the corresponding             */ |  | 
| 806   /*    @FT_Glyph_Format values instead.                                   */ |  | 
| 807   /*                                                                       */ |  | 
| 808   /* <Values>                                                              */ |  | 
| 809   /*    ft_glyph_format_none      :: See @FT_GLYPH_FORMAT_NONE.            */ |  | 
| 810   /*    ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE.       */ |  | 
| 811   /*    ft_glyph_format_bitmap    :: See @FT_GLYPH_FORMAT_BITMAP.          */ |  | 
| 812   /*    ft_glyph_format_outline   :: See @FT_GLYPH_FORMAT_OUTLINE.         */ |  | 
| 813   /*    ft_glyph_format_plotter   :: See @FT_GLYPH_FORMAT_PLOTTER.         */ |  | 
| 814   /*                                                                       */ |  | 
| 815 #define ft_glyph_format_none       FT_GLYPH_FORMAT_NONE | 734 #define ft_glyph_format_none       FT_GLYPH_FORMAT_NONE | 
| 816 #define ft_glyph_format_composite  FT_GLYPH_FORMAT_COMPOSITE | 735 #define ft_glyph_format_composite  FT_GLYPH_FORMAT_COMPOSITE | 
| 817 #define ft_glyph_format_bitmap     FT_GLYPH_FORMAT_BITMAP | 736 #define ft_glyph_format_bitmap     FT_GLYPH_FORMAT_BITMAP | 
| 818 #define ft_glyph_format_outline    FT_GLYPH_FORMAT_OUTLINE | 737 #define ft_glyph_format_outline    FT_GLYPH_FORMAT_OUTLINE | 
| 819 #define ft_glyph_format_plotter    FT_GLYPH_FORMAT_PLOTTER | 738 #define ft_glyph_format_plotter    FT_GLYPH_FORMAT_PLOTTER | 
| 820 | 739 | 
| 821 | 740 | 
| 822   /*************************************************************************/ | 741   /*************************************************************************/ | 
| 823   /*************************************************************************/ | 742   /*************************************************************************/ | 
| 824   /*************************************************************************/ | 743   /*************************************************************************/ | 
| 825   /*****                                                               *****/ | 744   /*****                                                               *****/ | 
| 826   /*****            R A S T E R   D E F I N I T I O N S                *****/ | 745   /*****            R A S T E R   D E F I N I T I O N S                *****/ | 
| 827   /*****                                                               *****/ | 746   /*****                                                               *****/ | 
| 828   /*************************************************************************/ | 747   /*************************************************************************/ | 
| 829   /*************************************************************************/ | 748   /*************************************************************************/ | 
| 830   /*************************************************************************/ | 749   /*************************************************************************/ | 
| 831 | 750 | 
| 832 | 751 | 
| 833   /*************************************************************************/ | 752   /*************************************************************************/ | 
| 834   /*                                                                       */ | 753   /*                                                                       */ | 
| 835   /* A raster is a scan converter, in charge of rendering an outline into  */ | 754   /* A raster is a scan converter, in charge of rendering an outline into  */ | 
| 836   /* a a bitmap.  This section contains the public API for rasters.        */ | 755   /* a a bitmap.  This section contains the public API for rasters.        */ | 
| 837   /*                                                                       */ | 756   /*                                                                       */ | 
| 838   /* Note that in FreeType 2, all rasters are now encapsulated within      */ | 757   /* Note that in FreeType 2, all rasters are now encapsulated within      */ | 
| 839   /* specific modules called `renderers'.  See `freetype/ftrender.h' for   */ | 758   /* specific modules called `renderers'.  See `ftrender.h' for more       */ | 
| 840   /* more details on renderers.                                            */ | 759   /* details on renderers.                                                 */ | 
| 841   /*                                                                       */ | 760   /*                                                                       */ | 
| 842   /*************************************************************************/ | 761   /*************************************************************************/ | 
| 843 | 762 | 
| 844 | 763 | 
| 845   /*************************************************************************/ | 764   /*************************************************************************/ | 
| 846   /*                                                                       */ | 765   /*                                                                       */ | 
| 847   /* <Section>                                                             */ | 766   /* <Section>                                                             */ | 
| 848   /*    raster                                                             */ | 767   /*    raster                                                             */ | 
| 849   /*                                                                       */ | 768   /*                                                                       */ | 
| 850   /* <Title>                                                               */ | 769   /* <Title>                                                               */ | 
| 851   /*    Scanline Converter                                                 */ | 770   /*    Scanline Converter                                                 */ | 
| 852   /*                                                                       */ | 771   /*                                                                       */ | 
| 853   /* <Abstract>                                                            */ | 772   /* <Abstract>                                                            */ | 
| 854   /*    How vectorial outlines are converted into bitmaps and pixmaps.     */ | 773   /*    How vectorial outlines are converted into bitmaps and pixmaps.     */ | 
| 855   /*                                                                       */ | 774   /*                                                                       */ | 
| 856   /* <Description>                                                         */ | 775   /* <Description>                                                         */ | 
| 857   /*    This section contains technical definitions.                       */ | 776   /*    This section contains technical definitions.                       */ | 
| 858   /*                                                                       */ | 777   /*                                                                       */ | 
|  | 778   /* <Order>                                                               */ | 
|  | 779   /*    FT_Raster                                                          */ | 
|  | 780   /*    FT_Span                                                            */ | 
|  | 781   /*    FT_SpanFunc                                                        */ | 
|  | 782   /*                                                                       */ | 
|  | 783   /*    FT_Raster_Params                                                   */ | 
|  | 784   /*    FT_RASTER_FLAG_XXX                                                 */ | 
|  | 785   /*                                                                       */ | 
|  | 786   /*    FT_Raster_NewFunc                                                  */ | 
|  | 787   /*    FT_Raster_DoneFunc                                                 */ | 
|  | 788   /*    FT_Raster_ResetFunc                                                */ | 
|  | 789   /*    FT_Raster_SetModeFunc                                              */ | 
|  | 790   /*    FT_Raster_RenderFunc                                               */ | 
|  | 791   /*    FT_Raster_Funcs                                                    */ | 
|  | 792   /*                                                                       */ | 
| 859   /*************************************************************************/ | 793   /*************************************************************************/ | 
| 860 | 794 | 
| 861 | 795 | 
| 862   /*************************************************************************/ | 796   /*************************************************************************/ | 
| 863   /*                                                                       */ | 797   /*                                                                       */ | 
| 864   /* <Type>                                                                */ | 798   /* <Type>                                                                */ | 
| 865   /*    FT_Raster                                                          */ | 799   /*    FT_Raster                                                          */ | 
| 866   /*                                                                       */ | 800   /*                                                                       */ | 
| 867   /* <Description>                                                         */ | 801   /* <Description>                                                         */ | 
| 868   /*    A handle (pointer) to a raster object.  Each object can be used    */ | 802   /*    An opaque handle (pointer) to a raster object.  Each object can be */ | 
| 869   /*    independently to convert an outline into a bitmap or pixmap.       */ | 803   /*    used independently to convert an outline into a bitmap or pixmap.  */ | 
| 870   /*                                                                       */ | 804   /*                                                                       */ | 
| 871   typedef struct FT_RasterRec_*  FT_Raster; | 805   typedef struct FT_RasterRec_*  FT_Raster; | 
| 872 | 806 | 
| 873 | 807 | 
| 874   /*************************************************************************/ | 808   /*************************************************************************/ | 
| 875   /*                                                                       */ | 809   /*                                                                       */ | 
| 876   /* <Struct>                                                              */ | 810   /* <Struct>                                                              */ | 
| 877   /*    FT_Span                                                            */ | 811   /*    FT_Span                                                            */ | 
| 878   /*                                                                       */ | 812   /*                                                                       */ | 
| 879   /* <Description>                                                         */ | 813   /* <Description>                                                         */ | 
| 880   /*    A structure used to model a single span of gray (or black) pixels  */ | 814   /*    A structure used to model a single span of gray pixels when        */ | 
| 881   /*    when rendering a monochrome or anti-aliased bitmap.                */ | 815   /*    rendering an anti-aliased bitmap.                                  */ | 
| 882   /*                                                                       */ | 816   /*                                                                       */ | 
| 883   /* <Fields>                                                              */ | 817   /* <Fields>                                                              */ | 
| 884   /*    x        :: The span's horizontal start position.                  */ | 818   /*    x        :: The span's horizontal start position.                  */ | 
| 885   /*                                                                       */ | 819   /*                                                                       */ | 
| 886   /*    len      :: The span's length in pixels.                           */ | 820   /*    len      :: The span's length in pixels.                           */ | 
| 887   /*                                                                       */ | 821   /*                                                                       */ | 
| 888   /*    coverage :: The span color/coverage, ranging from 0 (background)   */ | 822   /*    coverage :: The span color/coverage, ranging from 0 (background)   */ | 
| 889   /*                to 255 (foreground).  Only used for anti-aliased       */ | 823   /*                to 255 (foreground).                                   */ | 
| 890   /*                rendering.                                             */ |  | 
| 891   /*                                                                       */ | 824   /*                                                                       */ | 
| 892   /* <Note>                                                                */ | 825   /* <Note>                                                                */ | 
| 893   /*    This structure is used by the span drawing callback type named     */ | 826   /*    This structure is used by the span drawing callback type named     */ | 
| 894   /*    @FT_SpanFunc which takes the y~coordinate of the span as a         */ | 827   /*    @FT_SpanFunc that takes the y~coordinate of the span as a          */ | 
| 895   /*    a parameter.                                                       */ | 828   /*    parameter.                                                         */ | 
| 896   /*                                                                       */ | 829   /*                                                                       */ | 
| 897   /*    The coverage value is always between 0 and 255.  If you want less  */ | 830   /*    The coverage value is always between 0 and 255.  If you want less  */ | 
| 898   /*    gray values, the callback function has to reduce them.             */ | 831   /*    gray values, the callback function has to reduce them.             */ | 
| 899   /*                                                                       */ | 832   /*                                                                       */ | 
| 900   typedef struct  FT_Span_ | 833   typedef struct  FT_Span_ | 
| 901   { | 834   { | 
| 902     short           x; | 835     short           x; | 
| 903     unsigned short  len; | 836     unsigned short  len; | 
| 904     unsigned char   coverage; | 837     unsigned char   coverage; | 
| 905 | 838 | 
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 950 | 883 | 
| 951 #define FT_Raster_Span_Func  FT_SpanFunc | 884 #define FT_Raster_Span_Func  FT_SpanFunc | 
| 952 | 885 | 
| 953 | 886 | 
| 954   /*************************************************************************/ | 887   /*************************************************************************/ | 
| 955   /*                                                                       */ | 888   /*                                                                       */ | 
| 956   /* <FuncType>                                                            */ | 889   /* <FuncType>                                                            */ | 
| 957   /*    FT_Raster_BitTest_Func                                             */ | 890   /*    FT_Raster_BitTest_Func                                             */ | 
| 958   /*                                                                       */ | 891   /*                                                                       */ | 
| 959   /* <Description>                                                         */ | 892   /* <Description>                                                         */ | 
| 960   /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */ | 893   /*    Deprecated, unimplemented.                                         */ | 
| 961   /*                                                                       */ |  | 
| 962   /*    A function used as a call-back by the monochrome scan-converter    */ |  | 
| 963   /*    to test whether a given target pixel is already set to the drawing */ |  | 
| 964   /*    `color'.  These tests are crucial to implement drop-out control    */ |  | 
| 965   /*    per-se the TrueType spec.                                          */ |  | 
| 966   /*                                                                       */ |  | 
| 967   /* <Input>                                                               */ |  | 
| 968   /*    y     :: The pixel's y~coordinate.                                 */ |  | 
| 969   /*                                                                       */ |  | 
| 970   /*    x     :: The pixel's x~coordinate.                                 */ |  | 
| 971   /*                                                                       */ |  | 
| 972   /*    user  :: User-supplied data that is passed to the callback.        */ |  | 
| 973   /*                                                                       */ |  | 
| 974   /* <Return>                                                              */ |  | 
| 975   /*   1~if the pixel is `set', 0~otherwise.                               */ |  | 
| 976   /*                                                                       */ | 894   /*                                                                       */ | 
| 977   typedef int | 895   typedef int | 
| 978   (*FT_Raster_BitTest_Func)( int    y, | 896   (*FT_Raster_BitTest_Func)( int    y, | 
| 979                              int    x, | 897                              int    x, | 
| 980                              void*  user ); | 898                              void*  user ); | 
| 981 | 899 | 
| 982 | 900 | 
| 983   /*************************************************************************/ | 901   /*************************************************************************/ | 
| 984   /*                                                                       */ | 902   /*                                                                       */ | 
| 985   /* <FuncType>                                                            */ | 903   /* <FuncType>                                                            */ | 
| 986   /*    FT_Raster_BitSet_Func                                              */ | 904   /*    FT_Raster_BitSet_Func                                              */ | 
| 987   /*                                                                       */ | 905   /*                                                                       */ | 
| 988   /* <Description>                                                         */ | 906   /* <Description>                                                         */ | 
| 989   /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */ | 907   /*    Deprecated, unimplemented.                                         */ | 
| 990   /*                                                                       */ |  | 
| 991   /*    A function used as a call-back by the monochrome scan-converter    */ |  | 
| 992   /*    to set an individual target pixel.  This is crucial to implement   */ |  | 
| 993   /*    drop-out control according to the TrueType specification.          */ |  | 
| 994   /*                                                                       */ |  | 
| 995   /* <Input>                                                               */ |  | 
| 996   /*    y     :: The pixel's y~coordinate.                                 */ |  | 
| 997   /*                                                                       */ |  | 
| 998   /*    x     :: The pixel's x~coordinate.                                 */ |  | 
| 999   /*                                                                       */ |  | 
| 1000   /*    user  :: User-supplied data that is passed to the callback.        */ |  | 
| 1001   /*                                                                       */ |  | 
| 1002   /* <Return>                                                              */ |  | 
| 1003   /*    1~if the pixel is `set', 0~otherwise.                              */ |  | 
| 1004   /*                                                                       */ | 908   /*                                                                       */ | 
| 1005   typedef void | 909   typedef void | 
| 1006   (*FT_Raster_BitSet_Func)( int    y, | 910   (*FT_Raster_BitSet_Func)( int    y, | 
| 1007                             int    x, | 911                             int    x, | 
| 1008                             void*  user ); | 912                             void*  user ); | 
| 1009 | 913 | 
| 1010 | 914 | 
| 1011   /*************************************************************************/ | 915   /*************************************************************************/ | 
| 1012   /*                                                                       */ | 916   /*                                                                       */ | 
| 1013   /* <Enum>                                                                */ | 917   /* <Enum>                                                                */ | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 1027   /*                                                                       */ | 931   /*                                                                       */ | 
| 1028   /*    FT_RASTER_FLAG_DIRECT  :: This flag is set to indicate direct      */ | 932   /*    FT_RASTER_FLAG_DIRECT  :: This flag is set to indicate direct      */ | 
| 1029   /*                              rendering.  In this mode, client         */ | 933   /*                              rendering.  In this mode, client         */ | 
| 1030   /*                              applications must provide their own span */ | 934   /*                              applications must provide their own span */ | 
| 1031   /*                              callback.  This lets them directly       */ | 935   /*                              callback.  This lets them directly       */ | 
| 1032   /*                              draw or compose over an existing bitmap. */ | 936   /*                              draw or compose over an existing bitmap. */ | 
| 1033   /*                              If this bit is not set, the target       */ | 937   /*                              If this bit is not set, the target       */ | 
| 1034   /*                              pixmap's buffer _must_ be zeroed before  */ | 938   /*                              pixmap's buffer _must_ be zeroed before  */ | 
| 1035   /*                              rendering.                               */ | 939   /*                              rendering.                               */ | 
| 1036   /*                                                                       */ | 940   /*                                                                       */ | 
| 1037   /*                              Note that for now, direct rendering is   */ | 941   /*                              Direct rendering is only possible with   */ | 
| 1038   /*                              only possible with anti-aliased glyphs.  */ | 942   /*                              anti-aliased glyphs.                     */ | 
| 1039   /*                                                                       */ | 943   /*                                                                       */ | 
| 1040   /*    FT_RASTER_FLAG_CLIP    :: This flag is only used in direct         */ | 944   /*    FT_RASTER_FLAG_CLIP    :: This flag is only used in direct         */ | 
| 1041   /*                              rendering mode.  If set, the output will */ | 945   /*                              rendering mode.  If set, the output will */ | 
| 1042   /*                              be clipped to a box specified in the     */ | 946   /*                              be clipped to a box specified in the     */ | 
| 1043   /*                              `clip_box' field of the                  */ | 947   /*                              `clip_box' field of the                  */ | 
| 1044   /*                              @FT_Raster_Params structure.             */ | 948   /*                              @FT_Raster_Params structure.             */ | 
| 1045   /*                                                                       */ | 949   /*                                                                       */ | 
| 1046   /*                              Note that by default, the glyph bitmap   */ | 950   /*                              Note that by default, the glyph bitmap   */ | 
| 1047   /*                              is clipped to the target pixmap, except  */ | 951   /*                              is clipped to the target pixmap, except  */ | 
| 1048   /*                              in direct rendering mode where all spans */ | 952   /*                              in direct rendering mode where all spans */ | 
| 1049   /*                              are generated if no clipping box is set. */ | 953   /*                              are generated if no clipping box is set. */ | 
| 1050   /*                                                                       */ | 954   /*                                                                       */ | 
| 1051 #define FT_RASTER_FLAG_DEFAULT  0x0 | 955 #define FT_RASTER_FLAG_DEFAULT  0x0 | 
| 1052 #define FT_RASTER_FLAG_AA       0x1 | 956 #define FT_RASTER_FLAG_AA       0x1 | 
| 1053 #define FT_RASTER_FLAG_DIRECT   0x2 | 957 #define FT_RASTER_FLAG_DIRECT   0x2 | 
| 1054 #define FT_RASTER_FLAG_CLIP     0x4 | 958 #define FT_RASTER_FLAG_CLIP     0x4 | 
| 1055 | 959 | 
| 1056   /* deprecated */ | 960   /* these constants are deprecated; use the corresponding */ | 
|  | 961   /* `FT_RASTER_FLAG_XXX' values instead                   */ | 
| 1057 #define ft_raster_flag_default  FT_RASTER_FLAG_DEFAULT | 962 #define ft_raster_flag_default  FT_RASTER_FLAG_DEFAULT | 
| 1058 #define ft_raster_flag_aa       FT_RASTER_FLAG_AA | 963 #define ft_raster_flag_aa       FT_RASTER_FLAG_AA | 
| 1059 #define ft_raster_flag_direct   FT_RASTER_FLAG_DIRECT | 964 #define ft_raster_flag_direct   FT_RASTER_FLAG_DIRECT | 
| 1060 #define ft_raster_flag_clip     FT_RASTER_FLAG_CLIP | 965 #define ft_raster_flag_clip     FT_RASTER_FLAG_CLIP | 
| 1061 | 966 | 
| 1062 | 967 | 
| 1063   /*************************************************************************/ | 968   /*************************************************************************/ | 
| 1064   /*                                                                       */ | 969   /*                                                                       */ | 
| 1065   /* <Struct>                                                              */ | 970   /* <Struct>                                                              */ | 
| 1066   /*    FT_Raster_Params                                                   */ | 971   /*    FT_Raster_Params                                                   */ | 
| 1067   /*                                                                       */ | 972   /*                                                                       */ | 
| 1068   /* <Description>                                                         */ | 973   /* <Description>                                                         */ | 
| 1069   /*    A structure to hold the arguments used by a raster's render        */ | 974   /*    A structure to hold the arguments used by a raster's render        */ | 
| 1070   /*    function.                                                          */ | 975   /*    function.                                                          */ | 
| 1071   /*                                                                       */ | 976   /*                                                                       */ | 
| 1072   /* <Fields>                                                              */ | 977   /* <Fields>                                                              */ | 
| 1073   /*    target      :: The target bitmap.                                  */ | 978   /*    target      :: The target bitmap.                                  */ | 
| 1074   /*                                                                       */ | 979   /*                                                                       */ | 
| 1075   /*    source      :: A pointer to the source glyph image (e.g., an       */ | 980   /*    source      :: A pointer to the source glyph image (e.g., an       */ | 
| 1076   /*                   @FT_Outline).                                       */ | 981   /*                   @FT_Outline).                                       */ | 
| 1077   /*                                                                       */ | 982   /*                                                                       */ | 
| 1078   /*    flags       :: The rendering flags.                                */ | 983   /*    flags       :: The rendering flags.                                */ | 
| 1079   /*                                                                       */ | 984   /*                                                                       */ | 
| 1080   /*    gray_spans  :: The gray span drawing callback.                     */ | 985   /*    gray_spans  :: The gray span drawing callback.                     */ | 
| 1081   /*                                                                       */ | 986   /*                                                                       */ | 
| 1082   /*    black_spans :: The black span drawing callback.  UNIMPLEMENTED!    */ | 987   /*    black_spans :: Unused.                                             */ | 
| 1083   /*                                                                       */ | 988   /*                                                                       */ | 
| 1084   /*    bit_test    :: The bit test callback.  UNIMPLEMENTED!              */ | 989   /*    bit_test    :: Unused.                                             */ | 
| 1085   /*                                                                       */ | 990   /*                                                                       */ | 
| 1086   /*    bit_set     :: The bit set callback.  UNIMPLEMENTED!               */ | 991   /*    bit_set     :: Unused.                                             */ | 
| 1087   /*                                                                       */ | 992   /*                                                                       */ | 
| 1088   /*    user        :: User-supplied data that is passed to each drawing   */ | 993   /*    user        :: User-supplied data that is passed to each drawing   */ | 
| 1089   /*                   callback.                                           */ | 994   /*                   callback.                                           */ | 
| 1090   /*                                                                       */ | 995   /*                                                                       */ | 
| 1091   /*    clip_box    :: An optional clipping box.  It is only used in       */ | 996   /*    clip_box    :: An optional clipping box.  It is only used in       */ | 
| 1092   /*                   direct rendering mode.  Note that coordinates here  */ | 997   /*                   direct rendering mode.  Note that coordinates here  */ | 
| 1093   /*                   should be expressed in _integer_ pixels (and not in */ | 998   /*                   should be expressed in _integer_ pixels (and not in */ | 
| 1094   /*                   26.6 fixed-point units).                            */ | 999   /*                   26.6 fixed-point units).                            */ | 
| 1095   /*                                                                       */ | 1000   /*                                                                       */ | 
| 1096   /* <Note>                                                                */ | 1001   /* <Note>                                                                */ | 
| 1097   /*    An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA    */ | 1002   /*    An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA    */ | 
| 1098   /*    bit flag is set in the `flags' field, otherwise a monochrome       */ | 1003   /*    bit flag is set in the `flags' field, otherwise a monochrome       */ | 
| 1099   /*    bitmap is generated.                                               */ | 1004   /*    bitmap is generated.                                               */ | 
| 1100   /*                                                                       */ | 1005   /*                                                                       */ | 
| 1101   /*    If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the      */ | 1006   /*    If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the      */ | 
| 1102   /*    raster will call the `gray_spans' callback to draw gray pixel      */ | 1007   /*    raster will call the `gray_spans' callback to draw gray pixel      */ | 
| 1103   /*    spans, in the case of an aa glyph bitmap, it will call             */ | 1008   /*    spans.  This allows direct composition over a pre-existing bitmap  */ | 
| 1104   /*    `black_spans', and `bit_test' and `bit_set' in the case of a       */ | 1009   /*    through user-provided callbacks to perform the span drawing and    */ | 
| 1105   /*    monochrome bitmap.  This allows direct composition over a          */ | 1010   /*    composition.    Not supported by the monochrome rasterizer.        */ | 
| 1106   /*    pre-existing bitmap through user-provided callbacks to perform the */ |  | 
| 1107   /*    span drawing/composition.                                          */ |  | 
| 1108   /*                                                                       */ |  | 
| 1109   /*    Note that the `bit_test' and `bit_set' callbacks are required when */ |  | 
| 1110   /*    rendering a monochrome bitmap, as they are crucial to implement    */ |  | 
| 1111   /*    correct drop-out control as defined in the TrueType specification. */ |  | 
| 1112   /*                                                                       */ | 1011   /*                                                                       */ | 
| 1113   typedef struct  FT_Raster_Params_ | 1012   typedef struct  FT_Raster_Params_ | 
| 1114   { | 1013   { | 
| 1115     const FT_Bitmap*        target; | 1014     const FT_Bitmap*        target; | 
| 1116     const void*             source; | 1015     const void*             source; | 
| 1117     int                     flags; | 1016     int                     flags; | 
| 1118     FT_SpanFunc             gray_spans; | 1017     FT_SpanFunc             gray_spans; | 
| 1119     FT_SpanFunc             black_spans;  /* doesn't work! */ | 1018     FT_SpanFunc             black_spans;  /* unused */ | 
| 1120     FT_Raster_BitTest_Func  bit_test;     /* doesn't work! */ | 1019     FT_Raster_BitTest_Func  bit_test;     /* unused */ | 
| 1121     FT_Raster_BitSet_Func   bit_set;      /* doesn't work! */ | 1020     FT_Raster_BitSet_Func   bit_set;      /* unused */ | 
| 1122     void*                   user; | 1021     void*                   user; | 
| 1123     FT_BBox                 clip_box; | 1022     FT_BBox                 clip_box; | 
| 1124 | 1023 | 
| 1125   } FT_Raster_Params; | 1024   } FT_Raster_Params; | 
| 1126 | 1025 | 
| 1127 | 1026 | 
| 1128   /*************************************************************************/ | 1027   /*************************************************************************/ | 
| 1129   /*                                                                       */ | 1028   /*                                                                       */ | 
| 1130   /* <FuncType>                                                            */ | 1029   /* <FuncType>                                                            */ | 
| 1131   /*    FT_Raster_NewFunc                                                  */ | 1030   /*    FT_Raster_NewFunc                                                  */ | 
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1258   /*    @FT_Outline or anything else in order to support a large array of  */ | 1157   /*    @FT_Outline or anything else in order to support a large array of  */ | 
| 1259   /*    glyph formats.                                                     */ | 1158   /*    glyph formats.                                                     */ | 
| 1260   /*                                                                       */ | 1159   /*                                                                       */ | 
| 1261   /*    Note also that the render function can fail and return a           */ | 1160   /*    Note also that the render function can fail and return a           */ | 
| 1262   /*    `FT_Err_Unimplemented_Feature' error code if the raster used does  */ | 1161   /*    `FT_Err_Unimplemented_Feature' error code if the raster used does  */ | 
| 1263   /*    not support direct composition.                                    */ | 1162   /*    not support direct composition.                                    */ | 
| 1264   /*                                                                       */ | 1163   /*                                                                       */ | 
| 1265   /*    XXX: For now, the standard raster doesn't support direct           */ | 1164   /*    XXX: For now, the standard raster doesn't support direct           */ | 
| 1266   /*         composition but this should change for the final release (see */ | 1165   /*         composition but this should change for the final release (see */ | 
| 1267   /*         the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c'    */ | 1166   /*         the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c'    */ | 
| 1268   /*         for examples of distinct implementations which support direct */ | 1167   /*         for examples of distinct implementations that support direct  */ | 
| 1269   /*         composition).                                                 */ | 1168   /*         composition).                                                 */ | 
| 1270   /*                                                                       */ | 1169   /*                                                                       */ | 
| 1271   typedef int | 1170   typedef int | 
| 1272   (*FT_Raster_RenderFunc)( FT_Raster                raster, | 1171   (*FT_Raster_RenderFunc)( FT_Raster                raster, | 
| 1273                            const FT_Raster_Params*  params ); | 1172                            const FT_Raster_Params*  params ); | 
| 1274 | 1173 | 
| 1275 #define FT_Raster_Render_Func  FT_Raster_RenderFunc | 1174 #define FT_Raster_Render_Func  FT_Raster_RenderFunc | 
| 1276 | 1175 | 
| 1277 | 1176 | 
| 1278   /*************************************************************************/ | 1177   /*************************************************************************/ | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
| 1298   { | 1197   { | 
| 1299     FT_Glyph_Format        glyph_format; | 1198     FT_Glyph_Format        glyph_format; | 
| 1300     FT_Raster_NewFunc      raster_new; | 1199     FT_Raster_NewFunc      raster_new; | 
| 1301     FT_Raster_ResetFunc    raster_reset; | 1200     FT_Raster_ResetFunc    raster_reset; | 
| 1302     FT_Raster_SetModeFunc  raster_set_mode; | 1201     FT_Raster_SetModeFunc  raster_set_mode; | 
| 1303     FT_Raster_RenderFunc   raster_render; | 1202     FT_Raster_RenderFunc   raster_render; | 
| 1304     FT_Raster_DoneFunc     raster_done; | 1203     FT_Raster_DoneFunc     raster_done; | 
| 1305 | 1204 | 
| 1306   } FT_Raster_Funcs; | 1205   } FT_Raster_Funcs; | 
| 1307 | 1206 | 
| 1308 |  | 
| 1309   /* */ | 1207   /* */ | 
| 1310 | 1208 | 
| 1311 | 1209 | 
| 1312 FT_END_HEADER | 1210 FT_END_HEADER | 
| 1313 | 1211 | 
| 1314 #endif /* __FTIMAGE_H__ */ | 1212 #endif /* __FTIMAGE_H__ */ | 
| 1315 | 1213 | 
| 1316 | 1214 | 
| 1317 /* END */ | 1215 /* END */ | 
| 1318 | 1216 | 
| 1319 | 1217 | 
| 1320 /* Local Variables: */ | 1218 /* Local Variables: */ | 
| 1321 /* coding: utf-8    */ | 1219 /* coding: utf-8    */ | 
| 1322 /* End:             */ | 1220 /* End:             */ | 
| OLD | NEW | 
|---|