< prev index next >

src/java.desktop/share/native/libfreetype/include/freetype/ftimage.h

Print this page




 852   {
 853     short           x;
 854     unsigned short  len;
 855     unsigned char   coverage;
 856 
 857   } FT_Span;
 858 
 859 
 860   /**************************************************************************
 861    *
 862    * @functype:
 863    *   FT_SpanFunc
 864    *
 865    * @description:
 866    *   A function used as a call-back by the anti-aliased renderer in order
 867    *   to let client applications draw themselves the gray pixel spans on
 868    *   each scan line.
 869    *
 870    * @input:
 871    *   y ::
 872    *     The scanline's y~coordinate.
 873    *
 874    *   count ::
 875    *     The number of spans to draw on this scanline.
 876    *
 877    *   spans ::
 878    *     A table of `count` spans to draw on the scanline.
 879    *
 880    *   user ::
 881    *     User-supplied data that is passed to the callback.
 882    *
 883    * @note:
 884    *   This callback allows client applications to directly render the gray
 885    *   spans of the anti-aliased bitmap to any kind of surfaces.
 886    *
 887    *   This can be used to write anti-aliased outlines directly to a given
 888    *   background bitmap, and even perform translucency.
 889    */
 890   typedef void
 891   (*FT_SpanFunc)( int             y,
 892                   int             count,


 928    *
 929    * @enum:
 930    *   FT_RASTER_FLAG_XXX
 931    *
 932    * @description:
 933    *   A list of bit flag constants as used in the `flags` field of a
 934    *   @FT_Raster_Params structure.
 935    *
 936    * @values:
 937    *   FT_RASTER_FLAG_DEFAULT ::
 938    *     This value is 0.
 939    *
 940    *   FT_RASTER_FLAG_AA ::
 941    *     This flag is set to indicate that an anti-aliased glyph image should
 942    *     be generated.  Otherwise, it will be monochrome (1-bit).
 943    *
 944    *   FT_RASTER_FLAG_DIRECT ::
 945    *     This flag is set to indicate direct rendering.  In this mode, client
 946    *     applications must provide their own span callback.  This lets them
 947    *     directly draw or compose over an existing bitmap.  If this bit is
 948    *     not set, the target pixmap's buffer _must_ be zeroed before
 949    *     rendering.
 950    *
 951    *     Direct rendering is only possible with anti-aliased glyphs.
 952    *
 953    *   FT_RASTER_FLAG_CLIP ::
 954    *     This flag is only used in direct rendering mode.  If set, the output
 955    *     will be clipped to a box specified in the `clip_box` field of the
 956    *     @FT_Raster_Params structure.
 957    *
 958    *     Note that by default, the glyph bitmap is clipped to the target
 959    *     pixmap, except in direct rendering mode where all spans are
 960    *     generated if no clipping box is set.
 961    */
 962 #define FT_RASTER_FLAG_DEFAULT  0x0
 963 #define FT_RASTER_FLAG_AA       0x1
 964 #define FT_RASTER_FLAG_DIRECT   0x2
 965 #define FT_RASTER_FLAG_CLIP     0x4
 966 
 967   /* these constants are deprecated; use the corresponding */
 968   /* `FT_RASTER_FLAG_XXX` values instead                   */
 969 #define ft_raster_flag_default  FT_RASTER_FLAG_DEFAULT
 970 #define ft_raster_flag_aa       FT_RASTER_FLAG_AA
 971 #define ft_raster_flag_direct   FT_RASTER_FLAG_DIRECT
 972 #define ft_raster_flag_clip     FT_RASTER_FLAG_CLIP
 973 
 974 
 975   /**************************************************************************
 976    *
 977    * @struct:
 978    *   FT_Raster_Params
 979    *
 980    * @description:
 981    *   A structure to hold the arguments used by a raster's render function.

 982    *
 983    * @fields:
 984    *   target ::
 985    *     The target bitmap.
 986    *
 987    *   source ::
 988    *     A pointer to the source glyph image (e.g., an @FT_Outline).
 989    *
 990    *   flags ::
 991    *     The rendering flags.
 992    *
 993    *   gray_spans ::
 994    *     The gray span drawing callback.
 995    *
 996    *   black_spans ::
 997    *     Unused.
 998    *
 999    *   bit_test ::
1000    *     Unused.
1001    *




 852   {
 853     short           x;
 854     unsigned short  len;
 855     unsigned char   coverage;
 856 
 857   } FT_Span;
 858 
 859 
 860   /**************************************************************************
 861    *
 862    * @functype:
 863    *   FT_SpanFunc
 864    *
 865    * @description:
 866    *   A function used as a call-back by the anti-aliased renderer in order
 867    *   to let client applications draw themselves the gray pixel spans on
 868    *   each scan line.
 869    *
 870    * @input:
 871    *   y ::
 872    *     The scanline's upward y~coordinate.
 873    *
 874    *   count ::
 875    *     The number of spans to draw on this scanline.
 876    *
 877    *   spans ::
 878    *     A table of `count` spans to draw on the scanline.
 879    *
 880    *   user ::
 881    *     User-supplied data that is passed to the callback.
 882    *
 883    * @note:
 884    *   This callback allows client applications to directly render the gray
 885    *   spans of the anti-aliased bitmap to any kind of surfaces.
 886    *
 887    *   This can be used to write anti-aliased outlines directly to a given
 888    *   background bitmap, and even perform translucency.
 889    */
 890   typedef void
 891   (*FT_SpanFunc)( int             y,
 892                   int             count,


 928    *
 929    * @enum:
 930    *   FT_RASTER_FLAG_XXX
 931    *
 932    * @description:
 933    *   A list of bit flag constants as used in the `flags` field of a
 934    *   @FT_Raster_Params structure.
 935    *
 936    * @values:
 937    *   FT_RASTER_FLAG_DEFAULT ::
 938    *     This value is 0.
 939    *
 940    *   FT_RASTER_FLAG_AA ::
 941    *     This flag is set to indicate that an anti-aliased glyph image should
 942    *     be generated.  Otherwise, it will be monochrome (1-bit).
 943    *
 944    *   FT_RASTER_FLAG_DIRECT ::
 945    *     This flag is set to indicate direct rendering.  In this mode, client
 946    *     applications must provide their own span callback.  This lets them
 947    *     directly draw or compose over an existing bitmap.  If this bit is
 948    *     _not_ set, the target pixmap's buffer _must_ be zeroed before
 949    *     rendering and the output will be clipped to its size.
 950    *
 951    *     Direct rendering is only possible with anti-aliased glyphs.
 952    *
 953    *   FT_RASTER_FLAG_CLIP ::
 954    *     This flag is only used in direct rendering mode.  If set, the output
 955    *     will be clipped to a box specified in the `clip_box` field of the
 956    *     @FT_Raster_Params structure.  Otherwise, the `clip_box` is
 957    *     effectively set to the bounding box and all spans are generated.



 958    */
 959 #define FT_RASTER_FLAG_DEFAULT  0x0
 960 #define FT_RASTER_FLAG_AA       0x1
 961 #define FT_RASTER_FLAG_DIRECT   0x2
 962 #define FT_RASTER_FLAG_CLIP     0x4
 963 
 964   /* these constants are deprecated; use the corresponding */
 965   /* `FT_RASTER_FLAG_XXX` values instead                   */
 966 #define ft_raster_flag_default  FT_RASTER_FLAG_DEFAULT
 967 #define ft_raster_flag_aa       FT_RASTER_FLAG_AA
 968 #define ft_raster_flag_direct   FT_RASTER_FLAG_DIRECT
 969 #define ft_raster_flag_clip     FT_RASTER_FLAG_CLIP
 970 
 971 
 972   /**************************************************************************
 973    *
 974    * @struct:
 975    *   FT_Raster_Params
 976    *
 977    * @description:
 978    *   A structure to hold the parameters used by a raster's render function,
 979    *   passed as an argument to @FT_Outline_Render.
 980    *
 981    * @fields:
 982    *   target ::
 983    *     The target bitmap.
 984    *
 985    *   source ::
 986    *     A pointer to the source glyph image (e.g., an @FT_Outline).
 987    *
 988    *   flags ::
 989    *     The rendering flags.
 990    *
 991    *   gray_spans ::
 992    *     The gray span drawing callback.
 993    *
 994    *   black_spans ::
 995    *     Unused.
 996    *
 997    *   bit_test ::
 998    *     Unused.
 999    *


< prev index next >