vrshoot

diff libs/ft2static/freetype/ftstroke.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libs/ft2static/freetype/ftstroke.h	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,716 @@
     1.4 +/***************************************************************************/
     1.5 +/*                                                                         */
     1.6 +/*  ftstroke.h                                                             */
     1.7 +/*                                                                         */
     1.8 +/*    FreeType path stroker (specification).                               */
     1.9 +/*                                                                         */
    1.10 +/*  Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009 by                  */
    1.11 +/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
    1.12 +/*                                                                         */
    1.13 +/*  This file is part of the FreeType project, and may only be used,       */
    1.14 +/*  modified, and distributed under the terms of the FreeType project      */
    1.15 +/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
    1.16 +/*  this file you indicate that you have read the license and              */
    1.17 +/*  understand and accept it fully.                                        */
    1.18 +/*                                                                         */
    1.19 +/***************************************************************************/
    1.20 +
    1.21 +
    1.22 +#ifndef __FT_STROKE_H__
    1.23 +#define __FT_STROKE_H__
    1.24 +
    1.25 +#include <ft2build.h>
    1.26 +#include FT_OUTLINE_H
    1.27 +#include FT_GLYPH_H
    1.28 +
    1.29 +
    1.30 +FT_BEGIN_HEADER
    1.31 +
    1.32 +
    1.33 + /************************************************************************
    1.34 +  *
    1.35 +  * @section:
    1.36 +  *    glyph_stroker
    1.37 +  *
    1.38 +  * @title:
    1.39 +  *    Glyph Stroker
    1.40 +  *
    1.41 +  * @abstract:
    1.42 +  *    Generating bordered and stroked glyphs.
    1.43 +  *
    1.44 +  * @description:
    1.45 +  *    This component generates stroked outlines of a given vectorial
    1.46 +  *    glyph.  It also allows you to retrieve the `outside' and/or the
    1.47 +  *    `inside' borders of the stroke.
    1.48 +  *
    1.49 +  *    This can be useful to generate `bordered' glyph, i.e., glyphs
    1.50 +  *    displayed with a coloured (and anti-aliased) border around their
    1.51 +  *    shape.
    1.52 +  */
    1.53 +
    1.54 +
    1.55 + /**************************************************************
    1.56 +  *
    1.57 +  * @type:
    1.58 +  *   FT_Stroker
    1.59 +  *
    1.60 +  * @description:
    1.61 +  *   Opaque handler to a path stroker object.
    1.62 +  */
    1.63 +  typedef struct FT_StrokerRec_*  FT_Stroker;
    1.64 +
    1.65 +
    1.66 +  /**************************************************************
    1.67 +   *
    1.68 +   * @enum:
    1.69 +   *   FT_Stroker_LineJoin
    1.70 +   *
    1.71 +   * @description:
    1.72 +   *   These values determine how two joining lines are rendered
    1.73 +   *   in a stroker.
    1.74 +   *
    1.75 +   * @values:
    1.76 +   *   FT_STROKER_LINEJOIN_ROUND ::
    1.77 +   *     Used to render rounded line joins.  Circular arcs are used
    1.78 +   *     to join two lines smoothly.
    1.79 +   *
    1.80 +   *   FT_STROKER_LINEJOIN_BEVEL ::
    1.81 +   *     Used to render beveled line joins; i.e., the two joining lines
    1.82 +   *     are extended until they intersect.
    1.83 +   *
    1.84 +   *   FT_STROKER_LINEJOIN_MITER ::
    1.85 +   *     Same as beveled rendering, except that an additional line
    1.86 +   *     break is added if the angle between the two joining lines
    1.87 +   *     is too closed (this is useful to avoid unpleasant spikes
    1.88 +   *     in beveled rendering).
    1.89 +   */
    1.90 +  typedef enum  FT_Stroker_LineJoin_
    1.91 +  {
    1.92 +    FT_STROKER_LINEJOIN_ROUND = 0,
    1.93 +    FT_STROKER_LINEJOIN_BEVEL,
    1.94 +    FT_STROKER_LINEJOIN_MITER
    1.95 +
    1.96 +  } FT_Stroker_LineJoin;
    1.97 +
    1.98 +
    1.99 +  /**************************************************************
   1.100 +   *
   1.101 +   * @enum:
   1.102 +   *   FT_Stroker_LineCap
   1.103 +   *
   1.104 +   * @description:
   1.105 +   *   These values determine how the end of opened sub-paths are
   1.106 +   *   rendered in a stroke.
   1.107 +   *
   1.108 +   * @values:
   1.109 +   *   FT_STROKER_LINECAP_BUTT ::
   1.110 +   *     The end of lines is rendered as a full stop on the last
   1.111 +   *     point itself.
   1.112 +   *
   1.113 +   *   FT_STROKER_LINECAP_ROUND ::
   1.114 +   *     The end of lines is rendered as a half-circle around the
   1.115 +   *     last point.
   1.116 +   *
   1.117 +   *   FT_STROKER_LINECAP_SQUARE ::
   1.118 +   *     The end of lines is rendered as a square around the
   1.119 +   *     last point.
   1.120 +   */
   1.121 +  typedef enum  FT_Stroker_LineCap_
   1.122 +  {
   1.123 +    FT_STROKER_LINECAP_BUTT = 0,
   1.124 +    FT_STROKER_LINECAP_ROUND,
   1.125 +    FT_STROKER_LINECAP_SQUARE
   1.126 +
   1.127 +  } FT_Stroker_LineCap;
   1.128 +
   1.129 +
   1.130 +  /**************************************************************
   1.131 +   *
   1.132 +   * @enum:
   1.133 +   *   FT_StrokerBorder
   1.134 +   *
   1.135 +   * @description:
   1.136 +   *   These values are used to select a given stroke border
   1.137 +   *   in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder.
   1.138 +   *
   1.139 +   * @values:
   1.140 +   *   FT_STROKER_BORDER_LEFT ::
   1.141 +   *     Select the left border, relative to the drawing direction.
   1.142 +   *
   1.143 +   *   FT_STROKER_BORDER_RIGHT ::
   1.144 +   *     Select the right border, relative to the drawing direction.
   1.145 +   *
   1.146 +   * @note:
   1.147 +   *   Applications are generally interested in the `inside' and `outside'
   1.148 +   *   borders.  However, there is no direct mapping between these and the
   1.149 +   *   `left' and `right' ones, since this really depends on the glyph's
   1.150 +   *   drawing orientation, which varies between font formats.
   1.151 +   *
   1.152 +   *   You can however use @FT_Outline_GetInsideBorder and
   1.153 +   *   @FT_Outline_GetOutsideBorder to get these.
   1.154 +   */
   1.155 +  typedef enum  FT_StrokerBorder_
   1.156 +  {
   1.157 +    FT_STROKER_BORDER_LEFT = 0,
   1.158 +    FT_STROKER_BORDER_RIGHT
   1.159 +
   1.160 +  } FT_StrokerBorder;
   1.161 +
   1.162 +
   1.163 +  /**************************************************************
   1.164 +   *
   1.165 +   * @function:
   1.166 +   *   FT_Outline_GetInsideBorder
   1.167 +   *
   1.168 +   * @description:
   1.169 +   *   Retrieve the @FT_StrokerBorder value corresponding to the
   1.170 +   *   `inside' borders of a given outline.
   1.171 +   *
   1.172 +   * @input:
   1.173 +   *   outline ::
   1.174 +   *     The source outline handle.
   1.175 +   *
   1.176 +   * @return:
   1.177 +   *   The border index.  @FT_STROKER_BORDER_RIGHT for empty or invalid
   1.178 +   *   outlines.
   1.179 +   */
   1.180 +  FT_EXPORT( FT_StrokerBorder )
   1.181 +  FT_Outline_GetInsideBorder( FT_Outline*  outline );
   1.182 +
   1.183 +
   1.184 +  /**************************************************************
   1.185 +   *
   1.186 +   * @function:
   1.187 +   *   FT_Outline_GetOutsideBorder
   1.188 +   *
   1.189 +   * @description:
   1.190 +   *   Retrieve the @FT_StrokerBorder value corresponding to the
   1.191 +   *   `outside' borders of a given outline.
   1.192 +   *
   1.193 +   * @input:
   1.194 +   *   outline ::
   1.195 +   *     The source outline handle.
   1.196 +   *
   1.197 +   * @return:
   1.198 +   *   The border index.  @FT_STROKER_BORDER_LEFT for empty or invalid
   1.199 +   *   outlines.
   1.200 +   */
   1.201 +  FT_EXPORT( FT_StrokerBorder )
   1.202 +  FT_Outline_GetOutsideBorder( FT_Outline*  outline );
   1.203 +
   1.204 +
   1.205 +  /**************************************************************
   1.206 +   *
   1.207 +   * @function:
   1.208 +   *   FT_Stroker_New
   1.209 +   *
   1.210 +   * @description:
   1.211 +   *   Create a new stroker object.
   1.212 +   *
   1.213 +   * @input:
   1.214 +   *   library ::
   1.215 +   *     FreeType library handle.
   1.216 +   *
   1.217 +   * @output:
   1.218 +   *   astroker ::
   1.219 +   *     A new stroker object handle.  NULL in case of error.
   1.220 +   *
   1.221 +   * @return:
   1.222 +   *    FreeType error code.  0~means success.
   1.223 +   */
   1.224 +  FT_EXPORT( FT_Error )
   1.225 +  FT_Stroker_New( FT_Library   library,
   1.226 +                  FT_Stroker  *astroker );
   1.227 +
   1.228 +
   1.229 +  /**************************************************************
   1.230 +   *
   1.231 +   * @function:
   1.232 +   *   FT_Stroker_Set
   1.233 +   *
   1.234 +   * @description:
   1.235 +   *   Reset a stroker object's attributes.
   1.236 +   *
   1.237 +   * @input:
   1.238 +   *   stroker ::
   1.239 +   *     The target stroker handle.
   1.240 +   *
   1.241 +   *   radius ::
   1.242 +   *     The border radius.
   1.243 +   *
   1.244 +   *   line_cap ::
   1.245 +   *     The line cap style.
   1.246 +   *
   1.247 +   *   line_join ::
   1.248 +   *     The line join style.
   1.249 +   *
   1.250 +   *   miter_limit ::
   1.251 +   *     The miter limit for the FT_STROKER_LINEJOIN_MITER style,
   1.252 +   *     expressed as 16.16 fixed point value.
   1.253 +   *
   1.254 +   * @note:
   1.255 +   *   The radius is expressed in the same units as the outline
   1.256 +   *   coordinates.
   1.257 +   */
   1.258 +  FT_EXPORT( void )
   1.259 +  FT_Stroker_Set( FT_Stroker           stroker,
   1.260 +                  FT_Fixed             radius,
   1.261 +                  FT_Stroker_LineCap   line_cap,
   1.262 +                  FT_Stroker_LineJoin  line_join,
   1.263 +                  FT_Fixed             miter_limit );
   1.264 +
   1.265 +
   1.266 +  /**************************************************************
   1.267 +   *
   1.268 +   * @function:
   1.269 +   *   FT_Stroker_Rewind
   1.270 +   *
   1.271 +   * @description:
   1.272 +   *   Reset a stroker object without changing its attributes.
   1.273 +   *   You should call this function before beginning a new
   1.274 +   *   series of calls to @FT_Stroker_BeginSubPath or
   1.275 +   *   @FT_Stroker_EndSubPath.
   1.276 +   *
   1.277 +   * @input:
   1.278 +   *   stroker ::
   1.279 +   *     The target stroker handle.
   1.280 +   */
   1.281 +  FT_EXPORT( void )
   1.282 +  FT_Stroker_Rewind( FT_Stroker  stroker );
   1.283 +
   1.284 +
   1.285 +  /**************************************************************
   1.286 +   *
   1.287 +   * @function:
   1.288 +   *   FT_Stroker_ParseOutline
   1.289 +   *
   1.290 +   * @description:
   1.291 +   *   A convenience function used to parse a whole outline with
   1.292 +   *   the stroker.  The resulting outline(s) can be retrieved
   1.293 +   *   later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export.
   1.294 +   *
   1.295 +   * @input:
   1.296 +   *   stroker ::
   1.297 +   *     The target stroker handle.
   1.298 +   *
   1.299 +   *   outline ::
   1.300 +   *     The source outline.
   1.301 +   *
   1.302 +   *   opened ::
   1.303 +   *     A boolean.  If~1, the outline is treated as an open path instead
   1.304 +   *     of a closed one.
   1.305 +   *
   1.306 +   * @return:
   1.307 +   *   FreeType error code.  0~means success.
   1.308 +   *
   1.309 +   * @note:
   1.310 +   *   If `opened' is~0 (the default), the outline is treated as a closed
   1.311 +   *   path, and the stroker generates two distinct `border' outlines.
   1.312 +   *
   1.313 +   *   If `opened' is~1, the outline is processed as an open path, and the
   1.314 +   *   stroker generates a single `stroke' outline.
   1.315 +   *
   1.316 +   *   This function calls @FT_Stroker_Rewind automatically.
   1.317 +   */
   1.318 +  FT_EXPORT( FT_Error )
   1.319 +  FT_Stroker_ParseOutline( FT_Stroker   stroker,
   1.320 +                           FT_Outline*  outline,
   1.321 +                           FT_Bool      opened );
   1.322 +
   1.323 +
   1.324 +  /**************************************************************
   1.325 +   *
   1.326 +   * @function:
   1.327 +   *   FT_Stroker_BeginSubPath
   1.328 +   *
   1.329 +   * @description:
   1.330 +   *   Start a new sub-path in the stroker.
   1.331 +   *
   1.332 +   * @input:
   1.333 +   *   stroker ::
   1.334 +   *     The target stroker handle.
   1.335 +   *
   1.336 +   *   to ::
   1.337 +   *     A pointer to the start vector.
   1.338 +   *
   1.339 +   *   open ::
   1.340 +   *     A boolean.  If~1, the sub-path is treated as an open one.
   1.341 +   *
   1.342 +   * @return:
   1.343 +   *   FreeType error code.  0~means success.
   1.344 +   *
   1.345 +   * @note:
   1.346 +   *   This function is useful when you need to stroke a path that is
   1.347 +   *   not stored as an @FT_Outline object.
   1.348 +   */
   1.349 +  FT_EXPORT( FT_Error )
   1.350 +  FT_Stroker_BeginSubPath( FT_Stroker  stroker,
   1.351 +                           FT_Vector*  to,
   1.352 +                           FT_Bool     open );
   1.353 +
   1.354 +
   1.355 +  /**************************************************************
   1.356 +   *
   1.357 +   * @function:
   1.358 +   *   FT_Stroker_EndSubPath
   1.359 +   *
   1.360 +   * @description:
   1.361 +   *   Close the current sub-path in the stroker.
   1.362 +   *
   1.363 +   * @input:
   1.364 +   *   stroker ::
   1.365 +   *     The target stroker handle.
   1.366 +   *
   1.367 +   * @return:
   1.368 +   *   FreeType error code.  0~means success.
   1.369 +   *
   1.370 +   * @note:
   1.371 +   *   You should call this function after @FT_Stroker_BeginSubPath.
   1.372 +   *   If the subpath was not `opened', this function `draws' a
   1.373 +   *   single line segment to the start position when needed.
   1.374 +   */
   1.375 +  FT_EXPORT( FT_Error )
   1.376 +  FT_Stroker_EndSubPath( FT_Stroker  stroker );
   1.377 +
   1.378 +
   1.379 +  /**************************************************************
   1.380 +   *
   1.381 +   * @function:
   1.382 +   *   FT_Stroker_LineTo
   1.383 +   *
   1.384 +   * @description:
   1.385 +   *   `Draw' a single line segment in the stroker's current sub-path,
   1.386 +   *   from the last position.
   1.387 +   *
   1.388 +   * @input:
   1.389 +   *   stroker ::
   1.390 +   *     The target stroker handle.
   1.391 +   *
   1.392 +   *   to ::
   1.393 +   *     A pointer to the destination point.
   1.394 +   *
   1.395 +   * @return:
   1.396 +   *   FreeType error code.  0~means success.
   1.397 +   *
   1.398 +   * @note:
   1.399 +   *   You should call this function between @FT_Stroker_BeginSubPath and
   1.400 +   *   @FT_Stroker_EndSubPath.
   1.401 +   */
   1.402 +  FT_EXPORT( FT_Error )
   1.403 +  FT_Stroker_LineTo( FT_Stroker  stroker,
   1.404 +                     FT_Vector*  to );
   1.405 +
   1.406 +
   1.407 +  /**************************************************************
   1.408 +   *
   1.409 +   * @function:
   1.410 +   *   FT_Stroker_ConicTo
   1.411 +   *
   1.412 +   * @description:
   1.413 +   *   `Draw' a single quadratic Bézier in the stroker's current sub-path,
   1.414 +   *   from the last position.
   1.415 +   *
   1.416 +   * @input:
   1.417 +   *   stroker ::
   1.418 +   *     The target stroker handle.
   1.419 +   *
   1.420 +   *   control ::
   1.421 +   *     A pointer to a Bézier control point.
   1.422 +   *
   1.423 +   *   to ::
   1.424 +   *     A pointer to the destination point.
   1.425 +   *
   1.426 +   * @return:
   1.427 +   *   FreeType error code.  0~means success.
   1.428 +   *
   1.429 +   * @note:
   1.430 +   *   You should call this function between @FT_Stroker_BeginSubPath and
   1.431 +   *   @FT_Stroker_EndSubPath.
   1.432 +   */
   1.433 +  FT_EXPORT( FT_Error )
   1.434 +  FT_Stroker_ConicTo( FT_Stroker  stroker,
   1.435 +                      FT_Vector*  control,
   1.436 +                      FT_Vector*  to );
   1.437 +
   1.438 +
   1.439 +  /**************************************************************
   1.440 +   *
   1.441 +   * @function:
   1.442 +   *   FT_Stroker_CubicTo
   1.443 +   *
   1.444 +   * @description:
   1.445 +   *   `Draw' a single cubic Bézier in the stroker's current sub-path,
   1.446 +   *   from the last position.
   1.447 +   *
   1.448 +   * @input:
   1.449 +   *   stroker ::
   1.450 +   *     The target stroker handle.
   1.451 +   *
   1.452 +   *   control1 ::
   1.453 +   *     A pointer to the first Bézier control point.
   1.454 +   *
   1.455 +   *   control2 ::
   1.456 +   *     A pointer to second Bézier control point.
   1.457 +   *
   1.458 +   *   to ::
   1.459 +   *     A pointer to the destination point.
   1.460 +   *
   1.461 +   * @return:
   1.462 +   *   FreeType error code.  0~means success.
   1.463 +   *
   1.464 +   * @note:
   1.465 +   *   You should call this function between @FT_Stroker_BeginSubPath and
   1.466 +   *   @FT_Stroker_EndSubPath.
   1.467 +   */
   1.468 +  FT_EXPORT( FT_Error )
   1.469 +  FT_Stroker_CubicTo( FT_Stroker  stroker,
   1.470 +                      FT_Vector*  control1,
   1.471 +                      FT_Vector*  control2,
   1.472 +                      FT_Vector*  to );
   1.473 +
   1.474 +
   1.475 +  /**************************************************************
   1.476 +   *
   1.477 +   * @function:
   1.478 +   *   FT_Stroker_GetBorderCounts
   1.479 +   *
   1.480 +   * @description:
   1.481 +   *   Call this function once you have finished parsing your paths
   1.482 +   *   with the stroker.  It returns the number of points and
   1.483 +   *   contours necessary to export one of the `border' or `stroke'
   1.484 +   *   outlines generated by the stroker.
   1.485 +   *
   1.486 +   * @input:
   1.487 +   *   stroker ::
   1.488 +   *     The target stroker handle.
   1.489 +   *
   1.490 +   *   border ::
   1.491 +   *     The border index.
   1.492 +   *
   1.493 +   * @output:
   1.494 +   *   anum_points ::
   1.495 +   *     The number of points.
   1.496 +   *
   1.497 +   *   anum_contours ::
   1.498 +   *     The number of contours.
   1.499 +   *
   1.500 +   * @return:
   1.501 +   *   FreeType error code.  0~means success.
   1.502 +   *
   1.503 +   * @note:
   1.504 +   *   When an outline, or a sub-path, is `closed', the stroker generates
   1.505 +   *   two independent `border' outlines, named `left' and `right'.
   1.506 +   *
   1.507 +   *   When the outline, or a sub-path, is `opened', the stroker merges
   1.508 +   *   the `border' outlines with caps.  The `left' border receives all
   1.509 +   *   points, while the `right' border becomes empty.
   1.510 +   *
   1.511 +   *   Use the function @FT_Stroker_GetCounts instead if you want to
   1.512 +   *   retrieve the counts associated to both borders.
   1.513 +   */
   1.514 +  FT_EXPORT( FT_Error )
   1.515 +  FT_Stroker_GetBorderCounts( FT_Stroker        stroker,
   1.516 +                              FT_StrokerBorder  border,
   1.517 +                              FT_UInt          *anum_points,
   1.518 +                              FT_UInt          *anum_contours );
   1.519 +
   1.520 +
   1.521 +  /**************************************************************
   1.522 +   *
   1.523 +   * @function:
   1.524 +   *   FT_Stroker_ExportBorder
   1.525 +   *
   1.526 +   * @description:
   1.527 +   *   Call this function after @FT_Stroker_GetBorderCounts to
   1.528 +   *   export the corresponding border to your own @FT_Outline
   1.529 +   *   structure.
   1.530 +   *
   1.531 +   *   Note that this function appends the border points and
   1.532 +   *   contours to your outline, but does not try to resize its
   1.533 +   *   arrays.
   1.534 +   *
   1.535 +   * @input:
   1.536 +   *   stroker ::
   1.537 +   *     The target stroker handle.
   1.538 +   *
   1.539 +   *   border ::
   1.540 +   *     The border index.
   1.541 +   *
   1.542 +   *   outline ::
   1.543 +   *     The target outline handle.
   1.544 +   *
   1.545 +   * @note:
   1.546 +   *   Always call this function after @FT_Stroker_GetBorderCounts to
   1.547 +   *   get sure that there is enough room in your @FT_Outline object to
   1.548 +   *   receive all new data.
   1.549 +   *
   1.550 +   *   When an outline, or a sub-path, is `closed', the stroker generates
   1.551 +   *   two independent `border' outlines, named `left' and `right'
   1.552 +   *
   1.553 +   *   When the outline, or a sub-path, is `opened', the stroker merges
   1.554 +   *   the `border' outlines with caps. The `left' border receives all
   1.555 +   *   points, while the `right' border becomes empty.
   1.556 +   *
   1.557 +   *   Use the function @FT_Stroker_Export instead if you want to
   1.558 +   *   retrieve all borders at once.
   1.559 +   */
   1.560 +  FT_EXPORT( void )
   1.561 +  FT_Stroker_ExportBorder( FT_Stroker        stroker,
   1.562 +                           FT_StrokerBorder  border,
   1.563 +                           FT_Outline*       outline );
   1.564 +
   1.565 +
   1.566 +  /**************************************************************
   1.567 +   *
   1.568 +   * @function:
   1.569 +   *   FT_Stroker_GetCounts
   1.570 +   *
   1.571 +   * @description:
   1.572 +   *   Call this function once you have finished parsing your paths
   1.573 +   *   with the stroker.  It returns the number of points and
   1.574 +   *   contours necessary to export all points/borders from the stroked
   1.575 +   *   outline/path.
   1.576 +   *
   1.577 +   * @input:
   1.578 +   *   stroker ::
   1.579 +   *     The target stroker handle.
   1.580 +   *
   1.581 +   * @output:
   1.582 +   *   anum_points ::
   1.583 +   *     The number of points.
   1.584 +   *
   1.585 +   *   anum_contours ::
   1.586 +   *     The number of contours.
   1.587 +   *
   1.588 +   * @return:
   1.589 +   *   FreeType error code.  0~means success.
   1.590 +   */
   1.591 +  FT_EXPORT( FT_Error )
   1.592 +  FT_Stroker_GetCounts( FT_Stroker  stroker,
   1.593 +                        FT_UInt    *anum_points,
   1.594 +                        FT_UInt    *anum_contours );
   1.595 +
   1.596 +
   1.597 +  /**************************************************************
   1.598 +   *
   1.599 +   * @function:
   1.600 +   *   FT_Stroker_Export
   1.601 +   *
   1.602 +   * @description:
   1.603 +   *   Call this function after @FT_Stroker_GetBorderCounts to
   1.604 +   *   export all borders to your own @FT_Outline structure.
   1.605 +   *
   1.606 +   *   Note that this function appends the border points and
   1.607 +   *   contours to your outline, but does not try to resize its
   1.608 +   *   arrays.
   1.609 +   *
   1.610 +   * @input:
   1.611 +   *   stroker ::
   1.612 +   *     The target stroker handle.
   1.613 +   *
   1.614 +   *   outline ::
   1.615 +   *     The target outline handle.
   1.616 +   */
   1.617 +  FT_EXPORT( void )
   1.618 +  FT_Stroker_Export( FT_Stroker   stroker,
   1.619 +                     FT_Outline*  outline );
   1.620 +
   1.621 +
   1.622 +  /**************************************************************
   1.623 +   *
   1.624 +   * @function:
   1.625 +   *   FT_Stroker_Done
   1.626 +   *
   1.627 +   * @description:
   1.628 +   *   Destroy a stroker object.
   1.629 +   *
   1.630 +   * @input:
   1.631 +   *   stroker ::
   1.632 +   *     A stroker handle.  Can be NULL.
   1.633 +   */
   1.634 +  FT_EXPORT( void )
   1.635 +  FT_Stroker_Done( FT_Stroker  stroker );
   1.636 +
   1.637 +
   1.638 +  /**************************************************************
   1.639 +   *
   1.640 +   * @function:
   1.641 +   *   FT_Glyph_Stroke
   1.642 +   *
   1.643 +   * @description:
   1.644 +   *   Stroke a given outline glyph object with a given stroker.
   1.645 +   *
   1.646 +   * @inout:
   1.647 +   *   pglyph ::
   1.648 +   *     Source glyph handle on input, new glyph handle on output.
   1.649 +   *
   1.650 +   * @input:
   1.651 +   *   stroker ::
   1.652 +   *     A stroker handle.
   1.653 +   *
   1.654 +   *   destroy ::
   1.655 +   *     A Boolean.  If~1, the source glyph object is destroyed
   1.656 +   *     on success.
   1.657 +   *
   1.658 +   * @return:
   1.659 +   *    FreeType error code.  0~means success.
   1.660 +   *
   1.661 +   * @note:
   1.662 +   *   The source glyph is untouched in case of error.
   1.663 +   */
   1.664 +  FT_EXPORT( FT_Error )
   1.665 +  FT_Glyph_Stroke( FT_Glyph    *pglyph,
   1.666 +                   FT_Stroker   stroker,
   1.667 +                   FT_Bool      destroy );
   1.668 +
   1.669 +
   1.670 +  /**************************************************************
   1.671 +   *
   1.672 +   * @function:
   1.673 +   *   FT_Glyph_StrokeBorder
   1.674 +   *
   1.675 +   * @description:
   1.676 +   *   Stroke a given outline glyph object with a given stroker, but
   1.677 +   *   only return either its inside or outside border.
   1.678 +   *
   1.679 +   * @inout:
   1.680 +   *   pglyph ::
   1.681 +   *     Source glyph handle on input, new glyph handle on output.
   1.682 +   *
   1.683 +   * @input:
   1.684 +   *   stroker ::
   1.685 +   *     A stroker handle.
   1.686 +   *
   1.687 +   *   inside ::
   1.688 +   *     A Boolean.  If~1, return the inside border, otherwise
   1.689 +   *     the outside border.
   1.690 +   *
   1.691 +   *   destroy ::
   1.692 +   *     A Boolean.  If~1, the source glyph object is destroyed
   1.693 +   *     on success.
   1.694 +   *
   1.695 +   * @return:
   1.696 +   *    FreeType error code.  0~means success.
   1.697 +   *
   1.698 +   * @note:
   1.699 +   *   The source glyph is untouched in case of error.
   1.700 +   */
   1.701 +  FT_EXPORT( FT_Error )
   1.702 +  FT_Glyph_StrokeBorder( FT_Glyph    *pglyph,
   1.703 +                         FT_Stroker   stroker,
   1.704 +                         FT_Bool      inside,
   1.705 +                         FT_Bool      destroy );
   1.706 +
   1.707 + /* */
   1.708 +
   1.709 +FT_END_HEADER
   1.710 +
   1.711 +#endif /* __FT_STROKE_H__ */
   1.712 +
   1.713 +
   1.714 +/* END */
   1.715 +
   1.716 +
   1.717 +/* Local Variables: */
   1.718 +/* coding: utf-8    */
   1.719 +/* End:             */