| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* ftstroke.h */ | 3 /* ftstroke.h */ |
| 4 /* */ | 4 /* */ |
| 5 /* FreeType path stroker (specification). */ | 5 /* FreeType path stroker (specification). */ |
| 6 /* */ | 6 /* */ |
| 7 /* Copyright 2002-2006, 2008, 2009, 2011-2012 by */ | 7 /* Copyright 2002-2006, 2008, 2009, 2011-2012, 2014 by */ |
| 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 9 /* */ | 9 /* */ |
| 10 /* This file is part of the FreeType project, and may only be used, */ | 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 */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
| 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
| 14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
| 15 /* */ | 15 /* */ |
| 16 /***************************************************************************/ | 16 /***************************************************************************/ |
| 17 | 17 |
| 18 | 18 |
| 19 #ifndef __FT_STROKE_H__ | 19 #ifndef __FT_STROKE_H__ |
| 20 #define __FT_STROKE_H__ | 20 #define __FT_STROKE_H__ |
| 21 | 21 |
| 22 #include "../ft2build.h" | 22 #include <ft2build.h> |
| 23 #include "ftoutln.h" | 23 #include FT_OUTLINE_H |
| 24 #include "ftglyph.h" | 24 #include FT_GLYPH_H |
| 25 | 25 |
| 26 | 26 |
| 27 FT_BEGIN_HEADER | 27 FT_BEGIN_HEADER |
| 28 | 28 |
| 29 | 29 |
| 30 /************************************************************************ | 30 /************************************************************************ |
| 31 * | 31 * |
| 32 * @section: | 32 * @section: |
| 33 * glyph_stroker | 33 * glyph_stroker |
| 34 * | 34 * |
| 35 * @title: | 35 * @title: |
| 36 * Glyph Stroker | 36 * Glyph Stroker |
| 37 * | 37 * |
| 38 * @abstract: | 38 * @abstract: |
| 39 * Generating bordered and stroked glyphs. | 39 * Generating bordered and stroked glyphs. |
| 40 * | 40 * |
| 41 * @description: | 41 * @description: |
| 42 * This component generates stroked outlines of a given vectorial | 42 * This component generates stroked outlines of a given vectorial |
| 43 * glyph. It also allows you to retrieve the `outside' and/or the | 43 * glyph. It also allows you to retrieve the `outside' and/or the |
| 44 * `inside' borders of the stroke. | 44 * `inside' borders of the stroke. |
| 45 * | 45 * |
| 46 * This can be useful to generate `bordered' glyph, i.e., glyphs | 46 * This can be useful to generate `bordered' glyph, i.e., glyphs |
| 47 * displayed with a coloured (and anti-aliased) border around their | 47 * displayed with a coloured (and anti-aliased) border around their |
| 48 * shape. | 48 * shape. |
| 49 * |
| 50 * @order: |
| 51 * FT_Stroker |
| 52 * |
| 53 * FT_Stroker_LineJoin |
| 54 * FT_Stroker_LineCap |
| 55 * FT_StrokerBorder |
| 56 * |
| 57 * FT_Outline_GetInsideBorder |
| 58 * FT_Outline_GetOutsideBorder |
| 59 * |
| 60 * FT_Glyph_Stroke |
| 61 * FT_Glyph_StrokeBorder |
| 62 * |
| 63 * FT_Stroker_New |
| 64 * FT_Stroker_Set |
| 65 * FT_Stroker_Rewind |
| 66 * FT_Stroker_ParseOutline |
| 67 * FT_Stroker_Done |
| 68 * |
| 69 * FT_Stroker_BeginSubPath |
| 70 * FT_Stroker_EndSubPath |
| 71 * |
| 72 * FT_Stroker_LineTo |
| 73 * FT_Stroker_ConicTo |
| 74 * FT_Stroker_CubicTo |
| 75 * |
| 76 * FT_Stroker_GetBorderCounts |
| 77 * FT_Stroker_ExportBorder |
| 78 * FT_Stroker_GetCounts |
| 79 * FT_Stroker_Export |
| 80 * |
| 49 */ | 81 */ |
| 50 | 82 |
| 51 | 83 |
| 52 /************************************************************** | 84 /************************************************************** |
| 53 * | 85 * |
| 54 * @type: | 86 * @type: |
| 55 * FT_Stroker | 87 * FT_Stroker |
| 56 * | 88 * |
| 57 * @description: | 89 * @description: |
| 58 * Opaque handler to a path stroker object. | 90 * Opaque handle to a path stroker object. |
| 59 */ | 91 */ |
| 60 typedef struct FT_StrokerRec_* FT_Stroker; | 92 typedef struct FT_StrokerRec_* FT_Stroker; |
| 61 | 93 |
| 62 | 94 |
| 63 /************************************************************** | 95 /************************************************************** |
| 64 * | 96 * |
| 65 * @enum: | 97 * @enum: |
| 66 * FT_Stroker_LineJoin | 98 * FT_Stroker_LineJoin |
| 67 * | 99 * |
| 68 * @description: | 100 * @description: |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 * The line join style. | 301 * The line join style. |
| 270 * | 302 * |
| 271 * miter_limit :: | 303 * miter_limit :: |
| 272 * The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and | 304 * The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and |
| 273 * FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles, | 305 * FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles, |
| 274 * expressed as 16.16 fixed-point value. | 306 * expressed as 16.16 fixed-point value. |
| 275 * | 307 * |
| 276 * @note: | 308 * @note: |
| 277 * The radius is expressed in the same units as the outline | 309 * The radius is expressed in the same units as the outline |
| 278 * coordinates. | 310 * coordinates. |
| 311 * |
| 312 * This function calls @FT_Stroker_Rewind automatically. |
| 279 */ | 313 */ |
| 280 FT_EXPORT( void ) | 314 FT_EXPORT( void ) |
| 281 FT_Stroker_Set( FT_Stroker stroker, | 315 FT_Stroker_Set( FT_Stroker stroker, |
| 282 FT_Fixed radius, | 316 FT_Fixed radius, |
| 283 FT_Stroker_LineCap line_cap, | 317 FT_Stroker_LineCap line_cap, |
| 284 FT_Stroker_LineJoin line_join, | 318 FT_Stroker_LineJoin line_join, |
| 285 FT_Fixed miter_limit ); | 319 FT_Fixed miter_limit ); |
| 286 | 320 |
| 287 | 321 |
| 288 /************************************************************** | 322 /************************************************************** |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 * | 597 * |
| 564 * outline :: | 598 * outline :: |
| 565 * The target outline handle. | 599 * The target outline handle. |
| 566 * | 600 * |
| 567 * @note: | 601 * @note: |
| 568 * Always call this function after @FT_Stroker_GetBorderCounts to | 602 * Always call this function after @FT_Stroker_GetBorderCounts to |
| 569 * get sure that there is enough room in your @FT_Outline object to | 603 * get sure that there is enough room in your @FT_Outline object to |
| 570 * receive all new data. | 604 * receive all new data. |
| 571 * | 605 * |
| 572 * When an outline, or a sub-path, is `closed', the stroker generates | 606 * When an outline, or a sub-path, is `closed', the stroker generates |
| 573 * two independent `border' outlines, named `left' and `right' | 607 * two independent `border' outlines, named `left' and `right'. |
| 574 * | 608 * |
| 575 * When the outline, or a sub-path, is `opened', the stroker merges | 609 * When the outline, or a sub-path, is `opened', the stroker merges |
| 576 * the `border' outlines with caps. The `left' border receives all | 610 * the `border' outlines with caps. The `left' border receives all |
| 577 * points, while the `right' border becomes empty. | 611 * points, while the `right' border becomes empty. |
| 578 * | 612 * |
| 579 * Use the function @FT_Stroker_Export instead if you want to | 613 * Use the function @FT_Stroker_Export instead if you want to |
| 580 * retrieve all borders at once. | 614 * retrieve all borders at once. |
| 581 */ | 615 */ |
| 582 FT_EXPORT( void ) | 616 FT_EXPORT( void ) |
| 583 FT_Stroker_ExportBorder( FT_Stroker stroker, | 617 FT_Stroker_ExportBorder( FT_Stroker stroker, |
| 584 FT_StrokerBorder border, | 618 FT_StrokerBorder border, |
| 585 FT_Outline* outline ); | 619 FT_Outline* outline ); |
| 586 | 620 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 * depending on how large of a radius was used to stroke the glyph. You | 763 * depending on how large of a radius was used to stroke the glyph. You |
| 730 * may need to manually adjust horizontal and vertical advance amounts | 764 * may need to manually adjust horizontal and vertical advance amounts |
| 731 * to account for this added size. | 765 * to account for this added size. |
| 732 */ | 766 */ |
| 733 FT_EXPORT( FT_Error ) | 767 FT_EXPORT( FT_Error ) |
| 734 FT_Glyph_StrokeBorder( FT_Glyph *pglyph, | 768 FT_Glyph_StrokeBorder( FT_Glyph *pglyph, |
| 735 FT_Stroker stroker, | 769 FT_Stroker stroker, |
| 736 FT_Bool inside, | 770 FT_Bool inside, |
| 737 FT_Bool destroy ); | 771 FT_Bool destroy ); |
| 738 | 772 |
| 739 /* */ | 773 /* */ |
| 740 | 774 |
| 741 FT_END_HEADER | 775 FT_END_HEADER |
| 742 | 776 |
| 743 #endif /* __FT_STROKE_H__ */ | 777 #endif /* __FT_STROKE_H__ */ |
| 744 | 778 |
| 745 | 779 |
| 746 /* END */ | 780 /* END */ |
| 747 | 781 |
| 748 | 782 |
| 749 /* Local Variables: */ | 783 /* Local Variables: */ |
| 750 /* coding: utf-8 */ | 784 /* coding: utf-8 */ |
| 751 /* End: */ | 785 /* End: */ |
| OLD | NEW |