misc/libfreetype/include/freetype/ftimage.h
author Joe Doyle (Ginto8) <ginto8@gmail.com>
Sat, 01 Dec 2012 15:56:19 -0500
changeset 8174 df02c2ad4a2c
parent 5172 88f2e05288ba
permissions -rw-r--r--
Fix more errors. It compiles!
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
/*  ftimage.h                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
/*    FreeType glyph image formats and default raster interface            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*    (specification).                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*            2010 by                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
/*  This file is part of the FreeType project, and may only be used,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
/*  modified, and distributed under the terms of the FreeType project      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*  this file you indicate that you have read the license and              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
  /* Note: A `raster' is simply a scan-line converter, used to render      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
  /*       FT_Outlines into FT_Bitmaps.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
#ifndef __FTIMAGE_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#define __FTIMAGE_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
  /* _STANDALONE_ is from ftgrays.c */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
#ifndef _STANDALONE_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
  /*    basic_types                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
  /*    FT_Pos                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  /*    The type FT_Pos is used to store vectorial coordinates.  Depending */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  /*    on the context, these can represent distances in integer font      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
  /*    units, or 16.16, or 26.6 fixed float pixel coordinates.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  typedef signed long  FT_Pos;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
  /*    FT_Vector                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
  /*    A simple structure used to store a 2D vector; coordinates are of   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  /*    the FT_Pos type.                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
  /*    x :: The horizontal coordinate.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
  /*    y :: The vertical coordinate.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
  typedef struct  FT_Vector_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
    FT_Pos  x;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
    FT_Pos  y;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
  } FT_Vector;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
  /*    FT_BBox                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
  /*    A structure used to hold an outline's bounding box, i.e., the      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  /*    coordinates of its extrema in the horizontal and vertical          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  /*    directions.                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
  /*    xMin :: The horizontal minimum (left-most).                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
  /*    yMin :: The vertical minimum (bottom-most).                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
  /*    xMax :: The horizontal maximum (right-most).                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
  /*    yMax :: The vertical maximum (top-most).                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
  /*    The bounding box is specified with the coordinates of the lower    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
  /*    left and the upper right corner.  In PostScript, those values are  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
  /*    often called (llx,lly) and (urx,ury), respectively.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
  /*    If `yMin' is negative, this value gives the glyph's descender.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
  /*    Otherwise, the glyph doesn't descend below the baseline.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
  /*    Similarly, if `ymax' is positive, this value gives the glyph's     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
  /*    ascender.                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
  /*    `xMin' gives the horizontal distance from the glyph's origin to    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
  /*    the left edge of the glyph's bounding box.  If `xMin' is negative, */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
  /*    the glyph extends to the left of the origin.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
  typedef struct  FT_BBox_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
    FT_Pos  xMin, yMin;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
    FT_Pos  xMax, yMax;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
  } FT_BBox;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
  /*    FT_Pixel_Mode                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
  /*    An enumeration type used to describe the format of pixels in a     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
  /*    given bitmap.  Note that additional formats may be added in the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
  /*    future.                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
  /*    FT_PIXEL_MODE_NONE ::                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  /*      Value~0 is reserved.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
  /*    FT_PIXEL_MODE_MONO ::                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  /*      A monochrome bitmap, using 1~bit per pixel.  Note that pixels    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
  /*      are stored in most-significant order (MSB), which means that     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
  /*      the left-most pixel in a byte has value 128.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
  /*    FT_PIXEL_MODE_GRAY ::                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
  /*      An 8-bit bitmap, generally used to represent anti-aliased glyph  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
  /*      images.  Each pixel is stored in one byte.  Note that the number */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  /*      of `gray' levels is stored in the `num_grays' field of the       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  /*      @FT_Bitmap structure (it generally is 256).                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
  /*    FT_PIXEL_MODE_GRAY2 ::                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
  /*      A 2-bit per pixel bitmap, used to represent embedded             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
  /*      anti-aliased bitmaps in font files according to the OpenType     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
  /*      specification.  We haven't found a single font using this        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
  /*      format, however.                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
  /*    FT_PIXEL_MODE_GRAY4 ::                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
  /*      A 4-bit per pixel bitmap, representing embedded anti-aliased     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
  /*      bitmaps in font files according to the OpenType specification.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
  /*      We haven't found a single font using this format, however.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
  /*    FT_PIXEL_MODE_LCD ::                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
  /*      An 8-bit bitmap, representing RGB or BGR decimated glyph images  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
  /*      used for display on LCD displays; the bitmap is three times      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
  /*      wider than the original glyph image.  See also                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
  /*      @FT_RENDER_MODE_LCD.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
  /*    FT_PIXEL_MODE_LCD_V ::                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
  /*      An 8-bit bitmap, representing RGB or BGR decimated glyph images  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
  /*      used for display on rotated LCD displays; the bitmap is three    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
  /*      times taller than the original glyph image.  See also            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
  /*      @FT_RENDER_MODE_LCD_V.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
  typedef enum  FT_Pixel_Mode_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
    FT_PIXEL_MODE_NONE = 0,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
    FT_PIXEL_MODE_MONO,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
    FT_PIXEL_MODE_GRAY,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
    FT_PIXEL_MODE_GRAY2,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
    FT_PIXEL_MODE_GRAY4,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
    FT_PIXEL_MODE_LCD,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
    FT_PIXEL_MODE_LCD_V,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
    FT_PIXEL_MODE_MAX      /* do not remove */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
  } FT_Pixel_Mode;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
  /*    ft_pixel_mode_xxx                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
  /*    A list of deprecated constants.  Use the corresponding             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
  /*    @FT_Pixel_Mode values instead.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
  /*    ft_pixel_mode_none  :: See @FT_PIXEL_MODE_NONE.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
  /*    ft_pixel_mode_mono  :: See @FT_PIXEL_MODE_MONO.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
  /*    ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
  /*    ft_pixel_mode_pal2  :: See @FT_PIXEL_MODE_GRAY2.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
  /*    ft_pixel_mode_pal4  :: See @FT_PIXEL_MODE_GRAY4.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
#define ft_pixel_mode_none   FT_PIXEL_MODE_NONE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
#define ft_pixel_mode_mono   FT_PIXEL_MODE_MONO
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
#define ft_pixel_mode_grays  FT_PIXEL_MODE_GRAY
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
#define ft_pixel_mode_pal2   FT_PIXEL_MODE_GRAY2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
#define ft_pixel_mode_pal4   FT_PIXEL_MODE_GRAY4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
 /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
#if 0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
  /*    FT_Palette_Mode                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT!                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
  /*    An enumeration type to describe the format of a bitmap palette,    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
  /*    used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
  /*    ft_palette_mode_rgb  :: The palette is an array of 3-byte RGB      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
  /*                            records.                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
  /*    ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
  /*                            records.                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
  /*    As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
  /*    FreeType, these types are not handled by the library itself.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
  typedef enum  FT_Palette_Mode_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
    ft_palette_mode_rgb = 0,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
    ft_palette_mode_rgba,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
    ft_palette_mode_max   /* do not remove */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
  } FT_Palette_Mode;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   248
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   249
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   250
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   251
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
  /*    FT_Bitmap                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
  /*    A structure used to describe a bitmap or pixmap to the raster.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
  /*    Note that we now manage pixmaps of various depths through the      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
  /*    `pixel_mode' field.                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
  /*    rows         :: The number of bitmap rows.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
  /*    width        :: The number of pixels in bitmap row.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   263
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   264
  /*    pitch        :: The pitch's absolute value is the number of bytes  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
  /*                    taken by one bitmap row, including padding.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
  /*                    However, the pitch is positive when the bitmap has */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   267
  /*                    a `down' flow, and negative when it has an `up'    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   268
  /*                    flow.  In all cases, the pitch is an offset to add */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
  /*                    to a bitmap pointer in order to go down one row.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   270
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   271
  /*                    Note that `padding' means the alignment of a       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
  /*                    bitmap to a byte border, and FreeType functions    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   273
  /*                    normally align to the smallest possible integer    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   274
  /*                    value.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   276
  /*                    For the B/W rasterizer, `pitch' is always an even  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   277
  /*                    number.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   278
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   279
  /*                    To change the pitch of a bitmap (say, to make it a */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
  /*                    multiple of 4), use @FT_Bitmap_Convert.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
  /*                    Alternatively, you might use callback functions to */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
  /*                    directly render to the application's surface; see  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
  /*                    the file `example2.cpp' in the tutorial for a      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
  /*                    demonstration.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
  /*    buffer       :: A typeless pointer to the bitmap buffer.  This     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   287
  /*                    value should be aligned on 32-bit boundaries in    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   288
  /*                    most cases.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   289
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
  /*    num_grays    :: This field is only used with                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
  /*                    @FT_PIXEL_MODE_GRAY; it gives the number of gray   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
  /*                    levels used in the bitmap.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   293
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   294
  /*    pixel_mode   :: The pixel mode, i.e., how pixel bits are stored.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
  /*                    See @FT_Pixel_Mode for possible values.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   297
  /*    palette_mode :: This field is intended for paletted pixel modes;   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   298
  /*                    it indicates how the palette is stored.  Not       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
  /*                    used currently.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   300
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   301
  /*    palette      :: A typeless pointer to the bitmap palette; this     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
  /*                    field is intended for paletted pixel modes.  Not   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
  /*                    used currently.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
  /*   For now, the only pixel modes supported by FreeType are mono and    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   307
  /*   grays.  However, drivers might be added in the future to support    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
  /*   more `colorful' options.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   310
  typedef struct  FT_Bitmap_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   311
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   312
    int             rows;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
    int             width;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
    int             pitch;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
    unsigned char*  buffer;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   316
    short           num_grays;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
    char            pixel_mode;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
    char            palette_mode;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
    void*           palette;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   320
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
  } FT_Bitmap;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
  /*    outline_processing                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   328
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   329
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   332
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   333
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
  /*    FT_Outline                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
  /*    This structure is used to describe an outline to the scan-line     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
  /*    converter.                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   341
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   342
  /*    n_contours :: The number of contours in the outline.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   343
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
  /*    n_points   :: The number of points in the outline.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   345
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   346
  /*    points     :: A pointer to an array of `n_points' @FT_Vector       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
  /*                  elements, giving the outline's point coordinates.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   349
  /*    tags       :: A pointer to an array of `n_points' chars, giving    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   350
  /*                  each outline point's type.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   351
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   352
  /*                  If bit~0 is unset, the point is `off' the curve,     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   353
  /*                  i.e., a Bézier control point, while it is `on' if    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   354
  /*                  set.                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   355
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   356
  /*                  Bit~1 is meaningful for `off' points only.  If set,  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   357
  /*                  it indicates a third-order Bézier arc control point; */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   358
  /*                  and a second-order control point if unset.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   359
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   360
  /*                  If bit~2 is set, bits 5-7 contain the drop-out mode  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   361
  /*                  (as defined in the OpenType specification; the value */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   362
  /*                  is the same as the argument to the SCANMODE          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   363
  /*                  instruction).                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   364
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   365
  /*                  Bits 3 and~4 are reserved for internal purposes.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   366
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   367
  /*    contours   :: An array of `n_contours' shorts, giving the end      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   368
  /*                  point of each contour within the outline.  For       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   369
  /*                  example, the first contour is defined by the points  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   370
  /*                  `0' to `contours[0]', the second one is defined by   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   371
  /*                  the points `contours[0]+1' to `contours[1]', etc.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   372
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   373
  /*    flags      :: A set of bit flags used to characterize the outline  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   374
  /*                  and give hints to the scan-converter and hinter on   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   375
  /*                  how to convert/grid-fit it.  See @FT_OUTLINE_FLAGS.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   376
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   377
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   378
  /*    The B/W rasterizer only checks bit~2 in the `tags' array for the   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   379
  /*    first point of each contour.  The drop-out mode as given with      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   380
  /*    @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   381
  /*    @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   382
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   383
  typedef struct  FT_Outline_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   384
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   385
    short       n_contours;      /* number of contours in glyph        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   386
    short       n_points;        /* number of points in the glyph      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   387
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   388
    FT_Vector*  points;          /* the outline's points               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   389
    char*       tags;            /* the points flags                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   390
    short*      contours;        /* the contour end points             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   391
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   392
    int         flags;           /* outline masks                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   393
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   394
  } FT_Outline;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   395
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   396
  /* Following limits must be consistent with */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   397
  /* FT_Outline.{n_contours,n_points}         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   398
#define FT_OUTLINE_CONTOURS_MAX  SHRT_MAX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   399
#define FT_OUTLINE_POINTS_MAX    SHRT_MAX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   400
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   401
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   402
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   403
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   404
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   405
  /*    FT_OUTLINE_FLAGS                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   406
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   407
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   408
  /*    A list of bit-field constants use for the flags in an outline's    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   409
  /*    `flags' field.                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   410
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   411
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   412
  /*    FT_OUTLINE_NONE ::                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   413
  /*      Value~0 is reserved.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   414
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   415
  /*    FT_OUTLINE_OWNER ::                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   416
  /*      If set, this flag indicates that the outline's field arrays      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   417
  /*      (i.e., `points', `flags', and `contours') are `owned' by the     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   418
  /*      outline object, and should thus be freed when it is destroyed.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   419
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   420
  /*    FT_OUTLINE_EVEN_ODD_FILL ::                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   421
  /*      By default, outlines are filled using the non-zero winding rule. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   422
  /*      If set to 1, the outline will be filled using the even-odd fill  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   423
  /*      rule (only works with the smooth rasterizer).                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   424
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   425
  /*    FT_OUTLINE_REVERSE_FILL ::                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   426
  /*      By default, outside contours of an outline are oriented in       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   427
  /*      clock-wise direction, as defined in the TrueType specification.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   428
  /*      This flag is set if the outline uses the opposite direction      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   429
  /*      (typically for Type~1 fonts).  This flag is ignored by the scan  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   430
  /*      converter.                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   431
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   432
  /*    FT_OUTLINE_IGNORE_DROPOUTS ::                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   433
  /*      By default, the scan converter will try to detect drop-outs in   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   434
  /*      an outline and correct the glyph bitmap to ensure consistent     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   435
  /*      shape continuity.  If set, this flag hints the scan-line         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   436
  /*      converter to ignore such cases.  See below for more information. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   437
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   438
  /*    FT_OUTLINE_SMART_DROPOUTS ::                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   439
  /*      Select smart dropout control.  If unset, use simple dropout      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   440
  /*      control.  Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set.  See    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   441
  /*      below for more information.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   442
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   443
  /*    FT_OUTLINE_INCLUDE_STUBS ::                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   444
  /*      If set, turn pixels on for `stubs', otherwise exclude them.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   445
  /*      Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set.  See below for    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   446
  /*      more information.                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   447
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   448
  /*    FT_OUTLINE_HIGH_PRECISION ::                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   449
  /*      This flag indicates that the scan-line converter should try to   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   450
  /*      convert this outline to bitmaps with the highest possible        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   451
  /*      quality.  It is typically set for small character sizes.  Note   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   452
  /*      that this is only a hint that might be completely ignored by a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   453
  /*      given scan-converter.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   454
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   455
  /*    FT_OUTLINE_SINGLE_PASS ::                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   456
  /*      This flag is set to force a given scan-converter to only use a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   457
  /*      single pass over the outline to render a bitmap glyph image.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   458
  /*      Normally, it is set for very large character sizes.  It is only  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   459
  /*      a hint that might be completely ignored by a given               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   460
  /*      scan-converter.                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   461
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   462
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   463
  /*    The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   464
  /*    and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   465
  /*    rasterizer.                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   466
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   467
  /*    There exists a second mechanism to pass the drop-out mode to the   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   468
  /*    B/W rasterizer; see the `tags' field in @FT_Outline.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   469
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   470
  /*    Please refer to the description of the `SCANTYPE' instruction in   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   471
  /*    the OpenType specification (in file `ttinst1.doc') how simple      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   472
  /*    drop-outs, smart drop-outs, and stubs are defined.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   473
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   474
#define FT_OUTLINE_NONE             0x0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   475
#define FT_OUTLINE_OWNER            0x1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   476
#define FT_OUTLINE_EVEN_ODD_FILL    0x2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   477
#define FT_OUTLINE_REVERSE_FILL     0x4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   478
#define FT_OUTLINE_IGNORE_DROPOUTS  0x8
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   479
#define FT_OUTLINE_SMART_DROPOUTS   0x10
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   480
#define FT_OUTLINE_INCLUDE_STUBS    0x20
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   481
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   482
#define FT_OUTLINE_HIGH_PRECISION   0x100
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   483
#define FT_OUTLINE_SINGLE_PASS      0x200
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   484
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   485
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   486
 /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   487
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   488
  * @enum:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   489
  *   ft_outline_flags
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   490
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   491
  * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   492
  *   These constants are deprecated.  Please use the corresponding
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   493
  *   @FT_OUTLINE_FLAGS values.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   494
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   495
  * @values:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   496
  *   ft_outline_none            :: See @FT_OUTLINE_NONE.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   497
  *   ft_outline_owner           :: See @FT_OUTLINE_OWNER.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   498
  *   ft_outline_even_odd_fill   :: See @FT_OUTLINE_EVEN_ODD_FILL.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   499
  *   ft_outline_reverse_fill    :: See @FT_OUTLINE_REVERSE_FILL.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   500
  *   ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   501
  *   ft_outline_high_precision  :: See @FT_OUTLINE_HIGH_PRECISION.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   502
  *   ft_outline_single_pass     :: See @FT_OUTLINE_SINGLE_PASS.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   503
  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   504
#define ft_outline_none             FT_OUTLINE_NONE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   505
#define ft_outline_owner            FT_OUTLINE_OWNER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   506
#define ft_outline_even_odd_fill    FT_OUTLINE_EVEN_ODD_FILL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   507
#define ft_outline_reverse_fill     FT_OUTLINE_REVERSE_FILL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   508
#define ft_outline_ignore_dropouts  FT_OUTLINE_IGNORE_DROPOUTS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   509
#define ft_outline_high_precision   FT_OUTLINE_HIGH_PRECISION
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   510
#define ft_outline_single_pass      FT_OUTLINE_SINGLE_PASS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   511
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   512
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   513
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   514
#define FT_CURVE_TAG( flag )  ( flag & 3 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   515
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   516
#define FT_CURVE_TAG_ON            1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   517
#define FT_CURVE_TAG_CONIC         0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   518
#define FT_CURVE_TAG_CUBIC         2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   519
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   520
#define FT_CURVE_TAG_HAS_SCANMODE  4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   521
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   522
#define FT_CURVE_TAG_TOUCH_X       8  /* reserved for the TrueType hinter */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   523
#define FT_CURVE_TAG_TOUCH_Y      16  /* reserved for the TrueType hinter */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   524
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   525
#define FT_CURVE_TAG_TOUCH_BOTH    ( FT_CURVE_TAG_TOUCH_X | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   526
                                     FT_CURVE_TAG_TOUCH_Y )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   527
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   528
#define FT_Curve_Tag_On       FT_CURVE_TAG_ON
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   529
#define FT_Curve_Tag_Conic    FT_CURVE_TAG_CONIC
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   530
#define FT_Curve_Tag_Cubic    FT_CURVE_TAG_CUBIC
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   531
#define FT_Curve_Tag_Touch_X  FT_CURVE_TAG_TOUCH_X
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   532
#define FT_Curve_Tag_Touch_Y  FT_CURVE_TAG_TOUCH_Y
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   533
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   534
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   535
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   536
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   537
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   538
  /*    FT_Outline_MoveToFunc                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   539
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   540
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   541
  /*    A function pointer type used to describe the signature of a `move  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   542
  /*    to' function during outline walking/decomposition.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   543
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   544
  /*    A `move to' is emitted to start a new contour in an outline.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   545
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   546
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   547
  /*    to   :: A pointer to the target point of the `move to'.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   548
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   549
  /*    user :: A typeless pointer which is passed from the caller of the  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   550
  /*            decomposition function.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   551
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   552
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   553
  /*    Error code.  0~means success.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   554
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   555
  typedef int
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   556
  (*FT_Outline_MoveToFunc)( const FT_Vector*  to,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   557
                            void*             user );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   558
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   559
#define FT_Outline_MoveTo_Func  FT_Outline_MoveToFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   560
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   561
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   562
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   563
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   564
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   565
  /*    FT_Outline_LineToFunc                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   566
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   567
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   568
  /*    A function pointer type used to describe the signature of a `line  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   569
  /*    to' function during outline walking/decomposition.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   570
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   571
  /*    A `line to' is emitted to indicate a segment in the outline.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   572
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   573
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   574
  /*    to   :: A pointer to the target point of the `line to'.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   575
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   576
  /*    user :: A typeless pointer which is passed from the caller of the  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   577
  /*            decomposition function.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   578
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   579
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   580
  /*    Error code.  0~means success.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   581
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   582
  typedef int
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   583
  (*FT_Outline_LineToFunc)( const FT_Vector*  to,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   584
                            void*             user );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   585
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   586
#define FT_Outline_LineTo_Func  FT_Outline_LineToFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   587
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   588
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   589
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   590
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   591
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   592
  /*    FT_Outline_ConicToFunc                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   593
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   594
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   595
  /*    A function pointer type used to describe the signature of a `conic */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   596
  /*    to' function during outline walking or decomposition.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   597
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   598
  /*    A `conic to' is emitted to indicate a second-order Bézier arc in   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   599
  /*    the outline.                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   600
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   601
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   602
  /*    control :: An intermediate control point between the last position */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   603
  /*               and the new target in `to'.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   604
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   605
  /*    to      :: A pointer to the target end point of the conic arc.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   606
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   607
  /*    user    :: A typeless pointer which is passed from the caller of   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   608
  /*               the decomposition function.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   609
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   610
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   611
  /*    Error code.  0~means success.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   612
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   613
  typedef int
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   614
  (*FT_Outline_ConicToFunc)( const FT_Vector*  control,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   615
                             const FT_Vector*  to,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   616
                             void*             user );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   617
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   618
#define FT_Outline_ConicTo_Func  FT_Outline_ConicToFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   619
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   620
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   621
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   622
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   623
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   624
  /*    FT_Outline_CubicToFunc                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   625
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   626
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   627
  /*    A function pointer type used to describe the signature of a `cubic */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   628
  /*    to' function during outline walking or decomposition.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   629
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   630
  /*    A `cubic to' is emitted to indicate a third-order Bézier arc.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   631
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   632
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   633
  /*    control1 :: A pointer to the first Bézier control point.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   634
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   635
  /*    control2 :: A pointer to the second Bézier control point.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   636
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   637
  /*    to       :: A pointer to the target end point.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   638
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   639
  /*    user     :: A typeless pointer which is passed from the caller of  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   640
  /*                the decomposition function.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   641
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   642
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   643
  /*    Error code.  0~means success.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   644
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   645
  typedef int
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   646
  (*FT_Outline_CubicToFunc)( const FT_Vector*  control1,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   647
                             const FT_Vector*  control2,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   648
                             const FT_Vector*  to,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   649
                             void*             user );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   650
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   651
#define FT_Outline_CubicTo_Func  FT_Outline_CubicToFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   652
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   653
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   654
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   655
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   656
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   657
  /*    FT_Outline_Funcs                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   658
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   659
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   660
  /*    A structure to hold various function pointers used during outline  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   661
  /*    decomposition in order to emit segments, conic, and cubic Béziers. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   662
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   663
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   664
  /*    move_to  :: The `move to' emitter.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   665
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   666
  /*    line_to  :: The segment emitter.                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   667
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   668
  /*    conic_to :: The second-order Bézier arc emitter.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   669
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   670
  /*    cubic_to :: The third-order Bézier arc emitter.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   671
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   672
  /*    shift    :: The shift that is applied to coordinates before they   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   673
  /*                are sent to the emitter.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   674
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   675
  /*    delta    :: The delta that is applied to coordinates before they   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   676
  /*                are sent to the emitter, but after the shift.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   677
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   678
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   679
  /*    The point coordinates sent to the emitters are the transformed     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   680
  /*    version of the original coordinates (this is important for high    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   681
  /*    accuracy during scan-conversion).  The transformation is simple:   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   682
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   683
  /*    {                                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   684
  /*      x' = (x << shift) - delta                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   685
  /*      y' = (x << shift) - delta                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   686
  /*    }                                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   687
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   688
  /*    Set the values of `shift' and `delta' to~0 to get the original     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   689
  /*    point coordinates.                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   690
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   691
  typedef struct  FT_Outline_Funcs_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   692
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   693
    FT_Outline_MoveToFunc   move_to;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   694
    FT_Outline_LineToFunc   line_to;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   695
    FT_Outline_ConicToFunc  conic_to;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   696
    FT_Outline_CubicToFunc  cubic_to;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   697
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   698
    int                     shift;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   699
    FT_Pos                  delta;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   700
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   701
  } FT_Outline_Funcs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   702
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   703
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   704
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   705
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   706
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   707
  /*    basic_types                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   708
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   709
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   710
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   711
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   712
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   713
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   714
  /* <Macro>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   715
  /*    FT_IMAGE_TAG                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   716
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   717
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   718
  /*    This macro converts four-letter tags to an unsigned long type.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   719
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   720
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   721
  /*    Since many 16-bit compilers don't like 32-bit enumerations, you    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   722
  /*    should redefine this macro in case of problems to something like   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   723
  /*    this:                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   724
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   725
  /*    {                                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   726
  /*      #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  value         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   727
  /*    }                                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   728
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   729
  /*    to get a simple enumeration without assigning special numbers.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   730
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   731
#ifndef FT_IMAGE_TAG
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   732
#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   733
          value = ( ( (unsigned long)_x1 << 24 ) | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   734
                    ( (unsigned long)_x2 << 16 ) | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   735
                    ( (unsigned long)_x3 << 8  ) | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   736
                      (unsigned long)_x4         )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   737
#endif /* FT_IMAGE_TAG */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   738
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   739
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   740
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   741
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   742
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   743
  /*    FT_Glyph_Format                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   744
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   745
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   746
  /*    An enumeration type used to describe the format of a given glyph   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   747
  /*    image.  Note that this version of FreeType only supports two image */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   748
  /*    formats, even though future font drivers will be able to register  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   749
  /*    their own format.                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   750
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   751
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   752
  /*    FT_GLYPH_FORMAT_NONE ::                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   753
  /*      The value~0 is reserved.                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   754
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   755
  /*    FT_GLYPH_FORMAT_COMPOSITE ::                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   756
  /*      The glyph image is a composite of several other images.  This    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   757
  /*      format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   758
  /*      report compound glyphs (like accented characters).               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   759
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   760
  /*    FT_GLYPH_FORMAT_BITMAP ::                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   761
  /*      The glyph image is a bitmap, and can be described as an          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   762
  /*      @FT_Bitmap.  You generally need to access the `bitmap' field of  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   763
  /*      the @FT_GlyphSlotRec structure to read it.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   764
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   765
  /*    FT_GLYPH_FORMAT_OUTLINE ::                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   766
  /*      The glyph image is a vectorial outline made of line segments     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   767
  /*      and Bézier arcs; it can be described as an @FT_Outline; you      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   768
  /*      generally want to access the `outline' field of the              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   769
  /*      @FT_GlyphSlotRec structure to read it.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   770
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   771
  /*    FT_GLYPH_FORMAT_PLOTTER ::                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   772
  /*      The glyph image is a vectorial path with no inside and outside   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   773
  /*      contours.  Some Type~1 fonts, like those in the Hershey family,  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   774
  /*      contain glyphs in this format.  These are described as           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   775
  /*      @FT_Outline, but FreeType isn't currently capable of rendering   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   776
  /*      them correctly.                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   777
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   778
  typedef enum  FT_Glyph_Format_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   779
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   780
    FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   781
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   782
    FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   783
    FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP,    'b', 'i', 't', 's' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   784
    FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE,   'o', 'u', 't', 'l' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   785
    FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER,   'p', 'l', 'o', 't' )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   786
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   787
  } FT_Glyph_Format;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   788
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   789
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   790
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   791
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   792
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   793
  /*    ft_glyph_format_xxx                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   794
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   795
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   796
  /*    A list of deprecated constants.  Use the corresponding             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   797
  /*    @FT_Glyph_Format values instead.                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   798
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   799
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   800
  /*    ft_glyph_format_none      :: See @FT_GLYPH_FORMAT_NONE.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   801
  /*    ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   802
  /*    ft_glyph_format_bitmap    :: See @FT_GLYPH_FORMAT_BITMAP.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   803
  /*    ft_glyph_format_outline   :: See @FT_GLYPH_FORMAT_OUTLINE.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   804
  /*    ft_glyph_format_plotter   :: See @FT_GLYPH_FORMAT_PLOTTER.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   805
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   806
#define ft_glyph_format_none       FT_GLYPH_FORMAT_NONE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   807
#define ft_glyph_format_composite  FT_GLYPH_FORMAT_COMPOSITE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   808
#define ft_glyph_format_bitmap     FT_GLYPH_FORMAT_BITMAP
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   809
#define ft_glyph_format_outline    FT_GLYPH_FORMAT_OUTLINE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   810
#define ft_glyph_format_plotter    FT_GLYPH_FORMAT_PLOTTER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   811
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   812
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   813
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   814
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   815
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   816
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   817
  /*****            R A S T E R   D E F I N I T I O N S                *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   818
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   819
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   820
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   821
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   822
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   823
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   824
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   825
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   826
  /* A raster is a scan converter, in charge of rendering an outline into  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   827
  /* a a bitmap.  This section contains the public API for rasters.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   828
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   829
  /* Note that in FreeType 2, all rasters are now encapsulated within      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   830
  /* specific modules called `renderers'.  See `freetype/ftrender.h' for   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   831
  /* more details on renderers.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   832
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   833
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   834
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   835
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   836
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   837
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   838
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   839
  /*    raster                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   840
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   841
  /* <Title>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   842
  /*    Scanline Converter                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   843
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   844
  /* <Abstract>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   845
  /*    How vectorial outlines are converted into bitmaps and pixmaps.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   846
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   847
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   848
  /*    This section contains technical definitions.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   849
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   850
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   851
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   852
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   853
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   854
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   855
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   856
  /*    FT_Raster                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   857
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   858
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   859
  /*    A handle (pointer) to a raster object.  Each object can be used    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   860
  /*    independently to convert an outline into a bitmap or pixmap.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   861
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   862
  typedef struct FT_RasterRec_*  FT_Raster;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   863
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   864
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   865
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   866
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   867
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   868
  /*    FT_Span                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   869
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   870
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   871
  /*    A structure used to model a single span of gray (or black) pixels  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   872
  /*    when rendering a monochrome or anti-aliased bitmap.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   873
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   874
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   875
  /*    x        :: The span's horizontal start position.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   876
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   877
  /*    len      :: The span's length in pixels.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   878
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   879
  /*    coverage :: The span color/coverage, ranging from 0 (background)   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   880
  /*                to 255 (foreground).  Only used for anti-aliased       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   881
  /*                rendering.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   882
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   883
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   884
  /*    This structure is used by the span drawing callback type named     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   885
  /*    @FT_SpanFunc which takes the y~coordinate of the span as a         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   886
  /*    a parameter.                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   887
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   888
  /*    The coverage value is always between 0 and 255.  If you want less  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   889
  /*    gray values, the callback function has to reduce them.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   890
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   891
  typedef struct  FT_Span_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   892
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   893
    short           x;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   894
    unsigned short  len;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   895
    unsigned char   coverage;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   896
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   897
  } FT_Span;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   898
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   899
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   900
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   901
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   902
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   903
  /*    FT_SpanFunc                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   904
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   905
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   906
  /*    A function used as a call-back by the anti-aliased renderer in     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   907
  /*    order to let client applications draw themselves the gray pixel    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   908
  /*    spans on each scan line.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   909
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   910
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   911
  /*    y     :: The scanline's y~coordinate.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   912
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   913
  /*    count :: The number of spans to draw on this scanline.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   914
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   915
  /*    spans :: A table of `count' spans to draw on the scanline.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   916
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   917
  /*    user  :: User-supplied data that is passed to the callback.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   918
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   919
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   920
  /*    This callback allows client applications to directly render the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   921
  /*    gray spans of the anti-aliased bitmap to any kind of surfaces.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   922
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   923
  /*    This can be used to write anti-aliased outlines directly to a      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   924
  /*    given background bitmap, and even perform translucency.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   925
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   926
  /*    Note that the `count' field cannot be greater than a fixed value   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   927
  /*    defined by the `FT_MAX_GRAY_SPANS' configuration macro in          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   928
  /*    `ftoption.h'.  By default, this value is set to~32, which means    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   929
  /*    that if there are more than 32~spans on a given scanline, the      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   930
  /*    callback is called several times with the same `y' parameter in    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   931
  /*    order to draw all callbacks.                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   932
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   933
  /*    Otherwise, the callback is only called once per scan-line, and     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   934
  /*    only for those scanlines that do have `gray' pixels on them.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   935
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   936
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   937
  (*FT_SpanFunc)( int             y,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   938
                  int             count,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   939
                  const FT_Span*  spans,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   940
                  void*           user );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   941
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   942
#define FT_Raster_Span_Func  FT_SpanFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   943
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   944
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   945
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   946
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   947
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   948
  /*    FT_Raster_BitTest_Func                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   949
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   950
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   951
  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   952
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   953
  /*    A function used as a call-back by the monochrome scan-converter    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   954
  /*    to test whether a given target pixel is already set to the drawing */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   955
  /*    `color'.  These tests are crucial to implement drop-out control    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   956
  /*    per-se the TrueType spec.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   957
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   958
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   959
  /*    y     :: The pixel's y~coordinate.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   960
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   961
  /*    x     :: The pixel's x~coordinate.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   962
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   963
  /*    user  :: User-supplied data that is passed to the callback.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   964
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   965
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   966
  /*   1~if the pixel is `set', 0~otherwise.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   967
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   968
  typedef int
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   969
  (*FT_Raster_BitTest_Func)( int    y,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   970
                             int    x,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   971
                             void*  user );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   972
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   973
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   974
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   975
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   976
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   977
  /*    FT_Raster_BitSet_Func                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   978
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   979
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   980
  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   981
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   982
  /*    A function used as a call-back by the monochrome scan-converter    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   983
  /*    to set an individual target pixel.  This is crucial to implement   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   984
  /*    drop-out control according to the TrueType specification.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   985
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   986
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   987
  /*    y     :: The pixel's y~coordinate.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   988
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   989
  /*    x     :: The pixel's x~coordinate.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   990
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   991
  /*    user  :: User-supplied data that is passed to the callback.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   992
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   993
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   994
  /*    1~if the pixel is `set', 0~otherwise.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   995
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   996
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   997
  (*FT_Raster_BitSet_Func)( int    y,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   998
                            int    x,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   999
                            void*  user );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1000
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1001
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1002
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1003
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1004
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1005
  /*    FT_RASTER_FLAG_XXX                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1006
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1007
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1008
  /*    A list of bit flag constants as used in the `flags' field of a     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1009
  /*    @FT_Raster_Params structure.                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1010
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1011
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1012
  /*    FT_RASTER_FLAG_DEFAULT :: This value is 0.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1013
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1014
  /*    FT_RASTER_FLAG_AA      :: This flag is set to indicate that an     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1015
  /*                              anti-aliased glyph image should be       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1016
  /*                              generated.  Otherwise, it will be        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1017
  /*                              monochrome (1-bit).                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1018
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1019
  /*    FT_RASTER_FLAG_DIRECT  :: This flag is set to indicate direct      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1020
  /*                              rendering.  In this mode, client         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1021
  /*                              applications must provide their own span */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1022
  /*                              callback.  This lets them directly       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1023
  /*                              draw or compose over an existing bitmap. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1024
  /*                              If this bit is not set, the target       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1025
  /*                              pixmap's buffer _must_ be zeroed before  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1026
  /*                              rendering.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1027
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1028
  /*                              Note that for now, direct rendering is   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1029
  /*                              only possible with anti-aliased glyphs.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1030
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1031
  /*    FT_RASTER_FLAG_CLIP    :: This flag is only used in direct         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1032
  /*                              rendering mode.  If set, the output will */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1033
  /*                              be clipped to a box specified in the     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1034
  /*                              `clip_box' field of the                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1035
  /*                              @FT_Raster_Params structure.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1036
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1037
  /*                              Note that by default, the glyph bitmap   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1038
  /*                              is clipped to the target pixmap, except  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1039
  /*                              in direct rendering mode where all spans */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1040
  /*                              are generated if no clipping box is set. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1041
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1042
#define FT_RASTER_FLAG_DEFAULT  0x0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1043
#define FT_RASTER_FLAG_AA       0x1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1044
#define FT_RASTER_FLAG_DIRECT   0x2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1045
#define FT_RASTER_FLAG_CLIP     0x4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1046
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1047
  /* deprecated */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1048
#define ft_raster_flag_default  FT_RASTER_FLAG_DEFAULT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1049
#define ft_raster_flag_aa       FT_RASTER_FLAG_AA
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1050
#define ft_raster_flag_direct   FT_RASTER_FLAG_DIRECT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1051
#define ft_raster_flag_clip     FT_RASTER_FLAG_CLIP
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1052
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1053
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1054
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1055
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1056
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1057
  /*    FT_Raster_Params                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1058
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1059
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1060
  /*    A structure to hold the arguments used by a raster's render        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1061
  /*    function.                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1062
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1063
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1064
  /*    target      :: The target bitmap.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1065
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1066
  /*    source      :: A pointer to the source glyph image (e.g., an       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1067
  /*                   @FT_Outline).                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1068
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1069
  /*    flags       :: The rendering flags.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1070
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1071
  /*    gray_spans  :: The gray span drawing callback.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1072
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1073
  /*    black_spans :: The black span drawing callback.  UNIMPLEMENTED!    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1074
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1075
  /*    bit_test    :: The bit test callback.  UNIMPLEMENTED!              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1076
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1077
  /*    bit_set     :: The bit set callback.  UNIMPLEMENTED!               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1078
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1079
  /*    user        :: User-supplied data that is passed to each drawing   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1080
  /*                   callback.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1081
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1082
  /*    clip_box    :: An optional clipping box.  It is only used in       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1083
  /*                   direct rendering mode.  Note that coordinates here  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1084
  /*                   should be expressed in _integer_ pixels (and not in */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1085
  /*                   26.6 fixed-point units).                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1086
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1087
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1088
  /*    An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1089
  /*    bit flag is set in the `flags' field, otherwise a monochrome       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1090
  /*    bitmap is generated.                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1091
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1092
  /*    If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1093
  /*    raster will call the `gray_spans' callback to draw gray pixel      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1094
  /*    spans, in the case of an aa glyph bitmap, it will call             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1095
  /*    `black_spans', and `bit_test' and `bit_set' in the case of a       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1096
  /*    monochrome bitmap.  This allows direct composition over a          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1097
  /*    pre-existing bitmap through user-provided callbacks to perform the */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1098
  /*    span drawing/composition.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1099
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1100
  /*    Note that the `bit_test' and `bit_set' callbacks are required when */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1101
  /*    rendering a monochrome bitmap, as they are crucial to implement    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1102
  /*    correct drop-out control as defined in the TrueType specification. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1103
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1104
  typedef struct  FT_Raster_Params_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1105
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1106
    const FT_Bitmap*        target;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1107
    const void*             source;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1108
    int                     flags;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1109
    FT_SpanFunc             gray_spans;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1110
    FT_SpanFunc             black_spans;  /* doesn't work! */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1111
    FT_Raster_BitTest_Func  bit_test;     /* doesn't work! */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1112
    FT_Raster_BitSet_Func   bit_set;      /* doesn't work! */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1113
    void*                   user;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1114
    FT_BBox                 clip_box;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1115
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1116
  } FT_Raster_Params;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1117
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1118
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1119
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1120
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1121
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1122
  /*    FT_Raster_NewFunc                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1123
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1124
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1125
  /*    A function used to create a new raster object.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1126
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1127
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1128
  /*    memory :: A handle to the memory allocator.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1129
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1130
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1131
  /*    raster :: A handle to the new raster object.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1132
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1133
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1134
  /*    Error code.  0~means success.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1135
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1136
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1137
  /*    The `memory' parameter is a typeless pointer in order to avoid     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1138
  /*    un-wanted dependencies on the rest of the FreeType code.  In       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1139
  /*    practice, it is an @FT_Memory object, i.e., a handle to the        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1140
  /*    standard FreeType memory allocator.  However, this field can be    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1141
  /*    completely ignored by a given raster implementation.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1142
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1143
  typedef int
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1144
  (*FT_Raster_NewFunc)( void*       memory,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1145
                        FT_Raster*  raster );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1146
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1147
#define FT_Raster_New_Func  FT_Raster_NewFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1148
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1149
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1150
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1151
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1152
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1153
  /*    FT_Raster_DoneFunc                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1154
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1155
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1156
  /*    A function used to destroy a given raster object.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1157
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1158
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1159
  /*    raster :: A handle to the raster object.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1160
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1161
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1162
  (*FT_Raster_DoneFunc)( FT_Raster  raster );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1163
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1164
#define FT_Raster_Done_Func  FT_Raster_DoneFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1165
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1166
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1167
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1168
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1169
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1170
  /*    FT_Raster_ResetFunc                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1171
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1172
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1173
  /*    FreeType provides an area of memory called the `render pool',      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1174
  /*    available to all registered rasters.  This pool can be freely used */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1175
  /*    during a given scan-conversion but is shared by all rasters.  Its  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1176
  /*    content is thus transient.                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1177
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1178
  /*    This function is called each time the render pool changes, or just */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1179
  /*    after a new raster object is created.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1180
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1181
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1182
  /*    raster    :: A handle to the new raster object.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1183
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1184
  /*    pool_base :: The address in memory of the render pool.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1185
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1186
  /*    pool_size :: The size in bytes of the render pool.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1187
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1188
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1189
  /*    Rasters can ignore the render pool and rely on dynamic memory      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1190
  /*    allocation if they want to (a handle to the memory allocator is    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1191
  /*    passed to the raster constructor).  However, this is not           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1192
  /*    recommended for efficiency purposes.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1193
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1194
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1195
  (*FT_Raster_ResetFunc)( FT_Raster       raster,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1196
                          unsigned char*  pool_base,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1197
                          unsigned long   pool_size );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1198
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1199
#define FT_Raster_Reset_Func  FT_Raster_ResetFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1200
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1201
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1202
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1203
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1204
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1205
  /*    FT_Raster_SetModeFunc                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1206
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1207
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1208
  /*    This function is a generic facility to change modes or attributes  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1209
  /*    in a given raster.  This can be used for debugging purposes, or    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1210
  /*    simply to allow implementation-specific `features' in a given      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1211
  /*    raster module.                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1212
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1213
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1214
  /*    raster :: A handle to the new raster object.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1215
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1216
  /*    mode   :: A 4-byte tag used to name the mode or property.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1217
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1218
  /*    args   :: A pointer to the new mode/property to use.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1219
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1220
  typedef int
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1221
  (*FT_Raster_SetModeFunc)( FT_Raster      raster,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1222
                            unsigned long  mode,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1223
                            void*          args );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1224
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1225
#define FT_Raster_Set_Mode_Func  FT_Raster_SetModeFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1226
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1227
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1228
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1229
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1230
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1231
  /*    FT_Raster_RenderFunc                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1232
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1233
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1234
  /*    Invoke a given raster to scan-convert a given glyph image into a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1235
  /*    target bitmap.                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1236
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1237
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1238
  /*    raster :: A handle to the raster object.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1239
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1240
  /*    params :: A pointer to an @FT_Raster_Params structure used to      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1241
  /*              store the rendering parameters.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1242
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1243
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1244
  /*    Error code.  0~means success.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1245
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1246
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1247
  /*    The exact format of the source image depends on the raster's glyph */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1248
  /*    format defined in its @FT_Raster_Funcs structure.  It can be an    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1249
  /*    @FT_Outline or anything else in order to support a large array of  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1250
  /*    glyph formats.                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1251
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1252
  /*    Note also that the render function can fail and return a           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1253
  /*    `FT_Err_Unimplemented_Feature' error code if the raster used does  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1254
  /*    not support direct composition.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1255
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1256
  /*    XXX: For now, the standard raster doesn't support direct           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1257
  /*         composition but this should change for the final release (see */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1258
  /*         the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c'    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1259
  /*         for examples of distinct implementations which support direct */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1260
  /*         composition).                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1261
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1262
  typedef int
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1263
  (*FT_Raster_RenderFunc)( FT_Raster                raster,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1264
                           const FT_Raster_Params*  params );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1265
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1266
#define FT_Raster_Render_Func  FT_Raster_RenderFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1267
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1268
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1269
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1270
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1271
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1272
  /*    FT_Raster_Funcs                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1273
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1274
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1275
  /*   A structure used to describe a given raster class to the library.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1276
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1277
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1278
  /*    glyph_format  :: The supported glyph format for this raster.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1279
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1280
  /*    raster_new    :: The raster constructor.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1281
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1282
  /*    raster_reset  :: Used to reset the render pool within the raster.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1283
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1284
  /*    raster_render :: A function to render a glyph into a given bitmap. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1285
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1286
  /*    raster_done   :: The raster destructor.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1287
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1288
  typedef struct  FT_Raster_Funcs_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1289
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1290
    FT_Glyph_Format        glyph_format;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1291
    FT_Raster_NewFunc      raster_new;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1292
    FT_Raster_ResetFunc    raster_reset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1293
    FT_Raster_SetModeFunc  raster_set_mode;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1294
    FT_Raster_RenderFunc   raster_render;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1295
    FT_Raster_DoneFunc     raster_done;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1296
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1297
  } FT_Raster_Funcs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1298
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1299
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1300
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1301
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1302
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1303
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1304
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1305
#endif /* __FTIMAGE_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1306
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1307
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1308
/* END */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1309
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1310
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1311
/* Local Variables: */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1312
/* coding: utf-8    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1313
/* End:             */