ftstroke.h 21 KB

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