ftstroke.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785
  1. /***************************************************************************/
  2. /* */
  3. /* ftstroke.h */
  4. /* */
  5. /* FreeType path stroker (specification). */
  6. /* */
  7. /* Copyright 2002-2006, 2008, 2009, 2011-2012, 2014 by */
  8. /* David Turner, Robert Wilhelm, and Werner Lemberg. */
  9. /* */
  10. /* This file is part of the FreeType project, and may only be used, */
  11. /* modified, and distributed under the terms of the FreeType project */
  12. /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
  13. /* this file you indicate that you have read the license and */
  14. /* understand and accept it fully. */
  15. /* */
  16. /***************************************************************************/
  17. #ifndef __FT_STROKE_H__
  18. #define __FT_STROKE_H__
  19. #include <ft2build.h>
  20. #include FT_OUTLINE_H
  21. #include FT_GLYPH_H
  22. FT_BEGIN_HEADER
  23. /************************************************************************
  24. *
  25. * @section:
  26. * glyph_stroker
  27. *
  28. * @title:
  29. * Glyph Stroker
  30. *
  31. * @abstract:
  32. * Generating bordered and stroked glyphs.
  33. *
  34. * @description:
  35. * This component generates stroked outlines of a given vectorial
  36. * glyph. It also allows you to retrieve the `outside' and/or the
  37. * `inside' borders of the stroke.
  38. *
  39. * This can be useful to generate `bordered' glyph, i.e., glyphs
  40. * displayed with a coloured (and anti-aliased) border around their
  41. * shape.
  42. *
  43. * @order:
  44. * FT_Stroker
  45. *
  46. * FT_Stroker_LineJoin
  47. * FT_Stroker_LineCap
  48. * FT_StrokerBorder
  49. *
  50. * FT_Outline_GetInsideBorder
  51. * FT_Outline_GetOutsideBorder
  52. *
  53. * FT_Glyph_Stroke
  54. * FT_Glyph_StrokeBorder
  55. *
  56. * FT_Stroker_New
  57. * FT_Stroker_Set
  58. * FT_Stroker_Rewind
  59. * FT_Stroker_ParseOutline
  60. * FT_Stroker_Done
  61. *
  62. * FT_Stroker_BeginSubPath
  63. * FT_Stroker_EndSubPath
  64. *
  65. * FT_Stroker_LineTo
  66. * FT_Stroker_ConicTo
  67. * FT_Stroker_CubicTo
  68. *
  69. * FT_Stroker_GetBorderCounts
  70. * FT_Stroker_ExportBorder
  71. * FT_Stroker_GetCounts
  72. * FT_Stroker_Export
  73. *
  74. */
  75. /**************************************************************
  76. *
  77. * @type:
  78. * FT_Stroker
  79. *
  80. * @description:
  81. * Opaque handle to a path stroker object.
  82. */
  83. typedef struct FT_StrokerRec_* FT_Stroker;
  84. /**************************************************************
  85. *
  86. * @enum:
  87. * FT_Stroker_LineJoin
  88. *
  89. * @description:
  90. * These values determine how two joining lines are rendered
  91. * in a stroker.
  92. *
  93. * @values:
  94. * FT_STROKER_LINEJOIN_ROUND ::
  95. * Used to render rounded line joins. Circular arcs are used
  96. * to join two lines smoothly.
  97. *
  98. * FT_STROKER_LINEJOIN_BEVEL ::
  99. * Used to render beveled line joins. The outer corner of
  100. * the joined lines is filled by enclosing the triangular
  101. * region of the corner with a straight line between the
  102. * outer corners of each stroke.
  103. *
  104. * FT_STROKER_LINEJOIN_MITER_FIXED ::
  105. * Used to render mitered line joins, with fixed bevels if the
  106. * miter limit is exceeded. The outer edges of the strokes
  107. * for the two segments are extended until they meet at an
  108. * angle. If the segments meet at too sharp an angle (such
  109. * that the miter would extend from the intersection of the
  110. * segments a distance greater than the product of the miter
  111. * limit value and the border radius), then a bevel join (see
  112. * above) is used instead. This prevents long spikes being
  113. * created. FT_STROKER_LINEJOIN_MITER_FIXED generates a miter
  114. * line join as used in PostScript and PDF.
  115. *
  116. * FT_STROKER_LINEJOIN_MITER_VARIABLE ::
  117. * FT_STROKER_LINEJOIN_MITER ::
  118. * Used to render mitered line joins, with variable bevels if
  119. * the miter limit is exceeded. The intersection of the
  120. * strokes is clipped at a line perpendicular to the bisector
  121. * of the angle between the strokes, at the distance from the
  122. * intersection of the segments equal to the product of the
  123. * miter limit value and the border radius. This prevents
  124. * long spikes being created.
  125. * FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line
  126. * join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias
  127. * for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for
  128. * backwards compatibility.
  129. */
  130. typedef enum FT_Stroker_LineJoin_
  131. {
  132. FT_STROKER_LINEJOIN_ROUND = 0,
  133. FT_STROKER_LINEJOIN_BEVEL = 1,
  134. FT_STROKER_LINEJOIN_MITER_VARIABLE = 2,
  135. FT_STROKER_LINEJOIN_MITER = FT_STROKER_LINEJOIN_MITER_VARIABLE,
  136. FT_STROKER_LINEJOIN_MITER_FIXED = 3
  137. } FT_Stroker_LineJoin;
  138. /**************************************************************
  139. *
  140. * @enum:
  141. * FT_Stroker_LineCap
  142. *
  143. * @description:
  144. * These values determine how the end of opened sub-paths are
  145. * rendered in a stroke.
  146. *
  147. * @values:
  148. * FT_STROKER_LINECAP_BUTT ::
  149. * The end of lines is rendered as a full stop on the last
  150. * point itself.
  151. *
  152. * FT_STROKER_LINECAP_ROUND ::
  153. * The end of lines is rendered as a half-circle around the
  154. * last point.
  155. *
  156. * FT_STROKER_LINECAP_SQUARE ::
  157. * The end of lines is rendered as a square around the
  158. * last point.
  159. */
  160. typedef enum FT_Stroker_LineCap_
  161. {
  162. FT_STROKER_LINECAP_BUTT = 0,
  163. FT_STROKER_LINECAP_ROUND,
  164. FT_STROKER_LINECAP_SQUARE
  165. } FT_Stroker_LineCap;
  166. /**************************************************************
  167. *
  168. * @enum:
  169. * FT_StrokerBorder
  170. *
  171. * @description:
  172. * These values are used to select a given stroke border
  173. * in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder.
  174. *
  175. * @values:
  176. * FT_STROKER_BORDER_LEFT ::
  177. * Select the left border, relative to the drawing direction.
  178. *
  179. * FT_STROKER_BORDER_RIGHT ::
  180. * Select the right border, relative to the drawing direction.
  181. *
  182. * @note:
  183. * Applications are generally interested in the `inside' and `outside'
  184. * borders. However, there is no direct mapping between these and the
  185. * `left' and `right' ones, since this really depends on the glyph's
  186. * drawing orientation, which varies between font formats.
  187. *
  188. * You can however use @FT_Outline_GetInsideBorder and
  189. * @FT_Outline_GetOutsideBorder to get these.
  190. */
  191. typedef enum FT_StrokerBorder_
  192. {
  193. FT_STROKER_BORDER_LEFT = 0,
  194. FT_STROKER_BORDER_RIGHT
  195. } FT_StrokerBorder;
  196. /**************************************************************
  197. *
  198. * @function:
  199. * FT_Outline_GetInsideBorder
  200. *
  201. * @description:
  202. * Retrieve the @FT_StrokerBorder value corresponding to the
  203. * `inside' borders of a given outline.
  204. *
  205. * @input:
  206. * outline ::
  207. * The source outline handle.
  208. *
  209. * @return:
  210. * The border index. @FT_STROKER_BORDER_RIGHT for empty or invalid
  211. * outlines.
  212. */
  213. FT_EXPORT( FT_StrokerBorder )
  214. FT_Outline_GetInsideBorder( FT_Outline* outline );
  215. /**************************************************************
  216. *
  217. * @function:
  218. * FT_Outline_GetOutsideBorder
  219. *
  220. * @description:
  221. * Retrieve the @FT_StrokerBorder value corresponding to the
  222. * `outside' borders of a given outline.
  223. *
  224. * @input:
  225. * outline ::
  226. * The source outline handle.
  227. *
  228. * @return:
  229. * The border index. @FT_STROKER_BORDER_LEFT for empty or invalid
  230. * outlines.
  231. */
  232. FT_EXPORT( FT_StrokerBorder )
  233. FT_Outline_GetOutsideBorder( FT_Outline* outline );
  234. /**************************************************************
  235. *
  236. * @function:
  237. * FT_Stroker_New
  238. *
  239. * @description:
  240. * Create a new stroker object.
  241. *
  242. * @input:
  243. * library ::
  244. * FreeType library handle.
  245. *
  246. * @output:
  247. * astroker ::
  248. * A new stroker object handle. NULL in case of error.
  249. *
  250. * @return:
  251. * FreeType error code. 0~means success.
  252. */
  253. FT_EXPORT( FT_Error )
  254. FT_Stroker_New( FT_Library library,
  255. FT_Stroker *astroker );
  256. /**************************************************************
  257. *
  258. * @function:
  259. * FT_Stroker_Set
  260. *
  261. * @description:
  262. * Reset a stroker object's attributes.
  263. *
  264. * @input:
  265. * stroker ::
  266. * The target stroker handle.
  267. *
  268. * radius ::
  269. * The border radius.
  270. *
  271. * line_cap ::
  272. * The line cap style.
  273. *
  274. * line_join ::
  275. * The line join style.
  276. *
  277. * miter_limit ::
  278. * The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and
  279. * FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles,
  280. * expressed as 16.16 fixed-point value.
  281. *
  282. * @note:
  283. * The radius is expressed in the same units as the outline
  284. * coordinates.
  285. *
  286. * This function calls @FT_Stroker_Rewind automatically.
  287. */
  288. FT_EXPORT( void )
  289. FT_Stroker_Set( FT_Stroker stroker,
  290. FT_Fixed radius,
  291. FT_Stroker_LineCap line_cap,
  292. FT_Stroker_LineJoin line_join,
  293. FT_Fixed miter_limit );
  294. /**************************************************************
  295. *
  296. * @function:
  297. * FT_Stroker_Rewind
  298. *
  299. * @description:
  300. * Reset a stroker object without changing its attributes.
  301. * You should call this function before beginning a new
  302. * series of calls to @FT_Stroker_BeginSubPath or
  303. * @FT_Stroker_EndSubPath.
  304. *
  305. * @input:
  306. * stroker ::
  307. * The target stroker handle.
  308. */
  309. FT_EXPORT( void )
  310. FT_Stroker_Rewind( FT_Stroker stroker );
  311. /**************************************************************
  312. *
  313. * @function:
  314. * FT_Stroker_ParseOutline
  315. *
  316. * @description:
  317. * A convenience function used to parse a whole outline with
  318. * the stroker. The resulting outline(s) can be retrieved
  319. * later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export.
  320. *
  321. * @input:
  322. * stroker ::
  323. * The target stroker handle.
  324. *
  325. * outline ::
  326. * The source outline.
  327. *
  328. * opened ::
  329. * A boolean. If~1, the outline is treated as an open path instead
  330. * of a closed one.
  331. *
  332. * @return:
  333. * FreeType error code. 0~means success.
  334. *
  335. * @note:
  336. * If `opened' is~0 (the default), the outline is treated as a closed
  337. * path, and the stroker generates two distinct `border' outlines.
  338. *
  339. * If `opened' is~1, the outline is processed as an open path, and the
  340. * stroker generates a single `stroke' outline.
  341. *
  342. * This function calls @FT_Stroker_Rewind automatically.
  343. */
  344. FT_EXPORT( FT_Error )
  345. FT_Stroker_ParseOutline( FT_Stroker stroker,
  346. FT_Outline* outline,
  347. FT_Bool opened );
  348. /**************************************************************
  349. *
  350. * @function:
  351. * FT_Stroker_BeginSubPath
  352. *
  353. * @description:
  354. * Start a new sub-path in the stroker.
  355. *
  356. * @input:
  357. * stroker ::
  358. * The target stroker handle.
  359. *
  360. * to ::
  361. * A pointer to the start vector.
  362. *
  363. * open ::
  364. * A boolean. If~1, the sub-path is treated as an open one.
  365. *
  366. * @return:
  367. * FreeType error code. 0~means success.
  368. *
  369. * @note:
  370. * This function is useful when you need to stroke a path that is
  371. * not stored as an @FT_Outline object.
  372. */
  373. FT_EXPORT( FT_Error )
  374. FT_Stroker_BeginSubPath( FT_Stroker stroker,
  375. FT_Vector* to,
  376. FT_Bool open );
  377. /**************************************************************
  378. *
  379. * @function:
  380. * FT_Stroker_EndSubPath
  381. *
  382. * @description:
  383. * Close the current sub-path in the stroker.
  384. *
  385. * @input:
  386. * stroker ::
  387. * The target stroker handle.
  388. *
  389. * @return:
  390. * FreeType error code. 0~means success.
  391. *
  392. * @note:
  393. * You should call this function after @FT_Stroker_BeginSubPath.
  394. * If the subpath was not `opened', this function `draws' a
  395. * single line segment to the start position when needed.
  396. */
  397. FT_EXPORT( FT_Error )
  398. FT_Stroker_EndSubPath( FT_Stroker stroker );
  399. /**************************************************************
  400. *
  401. * @function:
  402. * FT_Stroker_LineTo
  403. *
  404. * @description:
  405. * `Draw' a single line segment in the stroker's current sub-path,
  406. * from the last position.
  407. *
  408. * @input:
  409. * stroker ::
  410. * The target stroker handle.
  411. *
  412. * to ::
  413. * A pointer to the destination point.
  414. *
  415. * @return:
  416. * FreeType error code. 0~means success.
  417. *
  418. * @note:
  419. * You should call this function between @FT_Stroker_BeginSubPath and
  420. * @FT_Stroker_EndSubPath.
  421. */
  422. FT_EXPORT( FT_Error )
  423. FT_Stroker_LineTo( FT_Stroker stroker,
  424. FT_Vector* to );
  425. /**************************************************************
  426. *
  427. * @function:
  428. * FT_Stroker_ConicTo
  429. *
  430. * @description:
  431. * `Draw' a single quadratic Bézier in the stroker's current sub-path,
  432. * from the last position.
  433. *
  434. * @input:
  435. * stroker ::
  436. * The target stroker handle.
  437. *
  438. * control ::
  439. * A pointer to a Bézier control point.
  440. *
  441. * to ::
  442. * A pointer to the destination point.
  443. *
  444. * @return:
  445. * FreeType error code. 0~means success.
  446. *
  447. * @note:
  448. * You should call this function between @FT_Stroker_BeginSubPath and
  449. * @FT_Stroker_EndSubPath.
  450. */
  451. FT_EXPORT( FT_Error )
  452. FT_Stroker_ConicTo( FT_Stroker stroker,
  453. FT_Vector* control,
  454. FT_Vector* to );
  455. /**************************************************************
  456. *
  457. * @function:
  458. * FT_Stroker_CubicTo
  459. *
  460. * @description:
  461. * `Draw' a single cubic Bézier in the stroker's current sub-path,
  462. * from the last position.
  463. *
  464. * @input:
  465. * stroker ::
  466. * The target stroker handle.
  467. *
  468. * control1 ::
  469. * A pointer to the first Bézier control point.
  470. *
  471. * control2 ::
  472. * A pointer to second Bézier control point.
  473. *
  474. * to ::
  475. * A pointer to the destination point.
  476. *
  477. * @return:
  478. * FreeType error code. 0~means success.
  479. *
  480. * @note:
  481. * You should call this function between @FT_Stroker_BeginSubPath and
  482. * @FT_Stroker_EndSubPath.
  483. */
  484. FT_EXPORT( FT_Error )
  485. FT_Stroker_CubicTo( FT_Stroker stroker,
  486. FT_Vector* control1,
  487. FT_Vector* control2,
  488. FT_Vector* to );
  489. /**************************************************************
  490. *
  491. * @function:
  492. * FT_Stroker_GetBorderCounts
  493. *
  494. * @description:
  495. * Call this function once you have finished parsing your paths
  496. * with the stroker. It returns the number of points and
  497. * contours necessary to export one of the `border' or `stroke'
  498. * outlines generated by the stroker.
  499. *
  500. * @input:
  501. * stroker ::
  502. * The target stroker handle.
  503. *
  504. * border ::
  505. * The border index.
  506. *
  507. * @output:
  508. * anum_points ::
  509. * The number of points.
  510. *
  511. * anum_contours ::
  512. * The number of contours.
  513. *
  514. * @return:
  515. * FreeType error code. 0~means success.
  516. *
  517. * @note:
  518. * When an outline, or a sub-path, is `closed', the stroker generates
  519. * two independent `border' outlines, named `left' and `right'.
  520. *
  521. * When the outline, or a sub-path, is `opened', the stroker merges
  522. * the `border' outlines with caps. The `left' border receives all
  523. * points, while the `right' border becomes empty.
  524. *
  525. * Use the function @FT_Stroker_GetCounts instead if you want to
  526. * retrieve the counts associated to both borders.
  527. */
  528. FT_EXPORT( FT_Error )
  529. FT_Stroker_GetBorderCounts( FT_Stroker stroker,
  530. FT_StrokerBorder border,
  531. FT_UInt *anum_points,
  532. FT_UInt *anum_contours );
  533. /**************************************************************
  534. *
  535. * @function:
  536. * FT_Stroker_ExportBorder
  537. *
  538. * @description:
  539. * Call this function after @FT_Stroker_GetBorderCounts to
  540. * export the corresponding border to your own @FT_Outline
  541. * structure.
  542. *
  543. * Note that this function appends the border points and
  544. * contours to your outline, but does not try to resize its
  545. * arrays.
  546. *
  547. * @input:
  548. * stroker ::
  549. * The target stroker handle.
  550. *
  551. * border ::
  552. * The border index.
  553. *
  554. * outline ::
  555. * The target outline handle.
  556. *
  557. * @note:
  558. * Always call this function after @FT_Stroker_GetBorderCounts to
  559. * get sure that there is enough room in your @FT_Outline object to
  560. * receive all new data.
  561. *
  562. * When an outline, or a sub-path, is `closed', the stroker generates
  563. * two independent `border' outlines, named `left' and `right'.
  564. *
  565. * When the outline, or a sub-path, is `opened', the stroker merges
  566. * the `border' outlines with caps. The `left' border receives all
  567. * points, while the `right' border becomes empty.
  568. *
  569. * Use the function @FT_Stroker_Export instead if you want to
  570. * retrieve all borders at once.
  571. */
  572. FT_EXPORT( void )
  573. FT_Stroker_ExportBorder( FT_Stroker stroker,
  574. FT_StrokerBorder border,
  575. FT_Outline* outline );
  576. /**************************************************************
  577. *
  578. * @function:
  579. * FT_Stroker_GetCounts
  580. *
  581. * @description:
  582. * Call this function once you have finished parsing your paths
  583. * with the stroker. It returns the number of points and
  584. * contours necessary to export all points/borders from the stroked
  585. * outline/path.
  586. *
  587. * @input:
  588. * stroker ::
  589. * The target stroker handle.
  590. *
  591. * @output:
  592. * anum_points ::
  593. * The number of points.
  594. *
  595. * anum_contours ::
  596. * The number of contours.
  597. *
  598. * @return:
  599. * FreeType error code. 0~means success.
  600. */
  601. FT_EXPORT( FT_Error )
  602. FT_Stroker_GetCounts( FT_Stroker stroker,
  603. FT_UInt *anum_points,
  604. FT_UInt *anum_contours );
  605. /**************************************************************
  606. *
  607. * @function:
  608. * FT_Stroker_Export
  609. *
  610. * @description:
  611. * Call this function after @FT_Stroker_GetBorderCounts to
  612. * export all borders to your own @FT_Outline structure.
  613. *
  614. * Note that this function appends the border points and
  615. * contours to your outline, but does not try to resize its
  616. * arrays.
  617. *
  618. * @input:
  619. * stroker ::
  620. * The target stroker handle.
  621. *
  622. * outline ::
  623. * The target outline handle.
  624. */
  625. FT_EXPORT( void )
  626. FT_Stroker_Export( FT_Stroker stroker,
  627. FT_Outline* outline );
  628. /**************************************************************
  629. *
  630. * @function:
  631. * FT_Stroker_Done
  632. *
  633. * @description:
  634. * Destroy a stroker object.
  635. *
  636. * @input:
  637. * stroker ::
  638. * A stroker handle. Can be NULL.
  639. */
  640. FT_EXPORT( void )
  641. FT_Stroker_Done( FT_Stroker stroker );
  642. /**************************************************************
  643. *
  644. * @function:
  645. * FT_Glyph_Stroke
  646. *
  647. * @description:
  648. * Stroke a given outline glyph object with a given stroker.
  649. *
  650. * @inout:
  651. * pglyph ::
  652. * Source glyph handle on input, new glyph handle on output.
  653. *
  654. * @input:
  655. * stroker ::
  656. * A stroker handle.
  657. *
  658. * destroy ::
  659. * A Boolean. If~1, the source glyph object is destroyed
  660. * on success.
  661. *
  662. * @return:
  663. * FreeType error code. 0~means success.
  664. *
  665. * @note:
  666. * The source glyph is untouched in case of error.
  667. *
  668. * Adding stroke may yield a significantly wider and taller glyph
  669. * depending on how large of a radius was used to stroke the glyph. You
  670. * may need to manually adjust horizontal and vertical advance amounts
  671. * to account for this added size.
  672. */
  673. FT_EXPORT( FT_Error )
  674. FT_Glyph_Stroke( FT_Glyph *pglyph,
  675. FT_Stroker stroker,
  676. FT_Bool destroy );
  677. /**************************************************************
  678. *
  679. * @function:
  680. * FT_Glyph_StrokeBorder
  681. *
  682. * @description:
  683. * Stroke a given outline glyph object with a given stroker, but
  684. * only return either its inside or outside border.
  685. *
  686. * @inout:
  687. * pglyph ::
  688. * Source glyph handle on input, new glyph handle on output.
  689. *
  690. * @input:
  691. * stroker ::
  692. * A stroker handle.
  693. *
  694. * inside ::
  695. * A Boolean. If~1, return the inside border, otherwise
  696. * the outside border.
  697. *
  698. * destroy ::
  699. * A Boolean. If~1, the source glyph object is destroyed
  700. * on success.
  701. *
  702. * @return:
  703. * FreeType error code. 0~means success.
  704. *
  705. * @note:
  706. * The source glyph is untouched in case of error.
  707. *
  708. * Adding stroke may yield a significantly wider and taller glyph
  709. * depending on how large of a radius was used to stroke the glyph. You
  710. * may need to manually adjust horizontal and vertical advance amounts
  711. * to account for this added size.
  712. */
  713. FT_EXPORT( FT_Error )
  714. FT_Glyph_StrokeBorder( FT_Glyph *pglyph,
  715. FT_Stroker stroker,
  716. FT_Bool inside,
  717. FT_Bool destroy );
  718. /* */
  719. FT_END_HEADER
  720. #endif /* __FT_STROKE_H__ */
  721. /* END */
  722. /* Local Variables: */
  723. /* coding: utf-8 */
  724. /* End: */