• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2<!doctype html>
3<html lang="en" class="no-js">
4  <head>
5
6      <meta charset="utf-8">
7      <meta name="viewport" content="width=device-width,initial-scale=1">
8
9        <meta name="description" content="API Reference Documentation for FreeType-2.12.1">
10
11
12
13        <meta name="author" content="FreeType Contributors">
14
15
16      <link rel="icon" href="images/favico.ico">
17      <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9">
18
19
20
21        <title>Glyph Layer Management - FreeType-2.12.1 API Reference</title>
22
23
24
25      <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css">
26
27
28        <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css">
29
30
31
32          <meta name="theme-color" content="#4cae4f">
33
34
35
36
37
38
39
40        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
41        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback">
42        <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style>
43
44
45
46
47      <link rel="stylesheet" href="stylesheets/extra.css">
48
49
50
51
52
53
54
55  </head>
56
57
58
59
60
61
62
63    <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green">
64
65
66    <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
67
68    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
69    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
70    <label class="md-overlay" for="__drawer"></label>
71    <div data-md-component="skip">
72
73
74        <a href="#glyph-layer-management" class="md-skip">
75          Skip to content
76        </a>
77
78    </div>
79    <div data-md-component="announce">
80
81    </div>
82
83      <header class="md-header" data-md-component="header">
84  <nav class="md-header__inner md-grid" aria-label="Header">
85    <a href="index.html" title="FreeType-2.12.1 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.1 API Reference" data-md-component="logo">
86
87  <img src="images/favico.ico" alt="logo">
88
89    </a>
90    <label class="md-header__button md-icon" for="__drawer">
91      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
92    </label>
93    <div class="md-header__title" data-md-component="header-title">
94      <div class="md-header__ellipsis">
95        <div class="md-header__topic">
96          <span class="md-ellipsis">
97            FreeType-2.12.1 API Reference
98          </span>
99        </div>
100        <div class="md-header__topic" data-md-component="header-topic">
101          <span class="md-ellipsis">
102
103              Glyph Layer Management
104
105          </span>
106        </div>
107      </div>
108    </div>
109
110
111
112      <label class="md-header__button md-icon" for="__search">
113        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
114      </label>
115
116<div class="md-search" data-md-component="search" role="dialog">
117  <label class="md-search__overlay" for="__search"></label>
118  <div class="md-search__inner" role="search">
119    <form class="md-search__form" name="search">
120      <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
121      <label class="md-search__icon md-icon" for="__search">
122        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
123        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
124      </label>
125      <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
126        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
127      </button>
128    </form>
129    <div class="md-search__output">
130      <div class="md-search__scrollwrap" data-md-scrollfix>
131        <div class="md-search-result" data-md-component="search-result">
132          <div class="md-search-result__meta">
133            Initializing search
134          </div>
135          <ol class="md-search-result__list"></ol>
136        </div>
137      </div>
138    </div>
139  </div>
140</div>
141
142
143  </nav>
144</header>
145
146    <div class="md-container" data-md-component="container">
147
148
149
150
151      <main class="md-main" data-md-component="main">
152        <div class="md-main__inner md-grid">
153
154
155
156              <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
157                <div class="md-sidebar__scrollwrap">
158                  <div class="md-sidebar__inner">
159
160
161
162<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
163  <label class="md-nav__title" for="__drawer">
164    <a href="index.html" title="FreeType-2.12.1 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.1 API Reference" data-md-component="logo">
165
166  <img src="images/favico.ico" alt="logo">
167
168    </a>
169    FreeType-2.12.1 API Reference
170  </label>
171
172  <ul class="md-nav__list" data-md-scrollfix>
173
174
175
176
177
178
179
180
181    <li class="md-nav__item">
182      <a href="index.html" class="md-nav__link">
183        TOC
184      </a>
185    </li>
186
187
188
189
190
191
192
193
194
195
196    <li class="md-nav__item">
197      <a href="ft2-index.html" class="md-nav__link">
198        Index
199      </a>
200    </li>
201
202
203
204
205
206
207
208
209
210
211
212    <li class="md-nav__item md-nav__item--nested">
213
214
215        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" >
216
217      <label class="md-nav__link" for="__nav_3">
218        General Remarks
219        <span class="md-nav__icon md-icon"></span>
220      </label>
221      <nav class="md-nav" aria-label="General Remarks" data-md-level="1">
222        <label class="md-nav__title" for="__nav_3">
223          <span class="md-nav__icon md-icon"></span>
224          General Remarks
225        </label>
226        <ul class="md-nav__list" data-md-scrollfix>
227
228
229
230
231
232    <li class="md-nav__item">
233      <a href="ft2-preamble.html" class="md-nav__link">
234        Preamble
235      </a>
236    </li>
237
238
239
240
241
242
243
244    <li class="md-nav__item">
245      <a href="ft2-header_inclusion.html" class="md-nav__link">
246        FreeType's header inclusion scheme
247      </a>
248    </li>
249
250
251
252
253
254
255
256    <li class="md-nav__item">
257      <a href="ft2-user_allocation.html" class="md-nav__link">
258        User allocation
259      </a>
260    </li>
261
262
263
264        </ul>
265      </nav>
266    </li>
267
268
269
270
271
272
273
274
275
276
277
278
279
280    <li class="md-nav__item md-nav__item--active md-nav__item--nested">
281
282
283        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" checked>
284
285      <label class="md-nav__link" for="__nav_4">
286        Core API
287        <span class="md-nav__icon md-icon"></span>
288      </label>
289      <nav class="md-nav" aria-label="Core API" data-md-level="1">
290        <label class="md-nav__title" for="__nav_4">
291          <span class="md-nav__icon md-icon"></span>
292          Core API
293        </label>
294        <ul class="md-nav__list" data-md-scrollfix>
295
296
297
298
299
300    <li class="md-nav__item">
301      <a href="ft2-version.html" class="md-nav__link">
302        FreeType Version
303      </a>
304    </li>
305
306
307
308
309
310
311
312    <li class="md-nav__item">
313      <a href="ft2-basic_types.html" class="md-nav__link">
314        Basic Data Types
315      </a>
316    </li>
317
318
319
320
321
322
323
324    <li class="md-nav__item">
325      <a href="ft2-base_interface.html" class="md-nav__link">
326        Base Interface
327      </a>
328    </li>
329
330
331
332
333
334
335
336    <li class="md-nav__item">
337      <a href="ft2-glyph_variants.html" class="md-nav__link">
338        Unicode Variation Sequences
339      </a>
340    </li>
341
342
343
344
345
346
347
348    <li class="md-nav__item">
349      <a href="ft2-color_management.html" class="md-nav__link">
350        Glyph Color Management
351      </a>
352    </li>
353
354
355
356
357
358
359
360
361
362    <li class="md-nav__item md-nav__item--active">
363
364      <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
365
366
367
368
369
370        <label class="md-nav__link md-nav__link--active" for="__toc">
371          Glyph Layer Management
372          <span class="md-nav__icon md-icon"></span>
373        </label>
374
375      <a href="ft2-layer_management.html" class="md-nav__link md-nav__link--active">
376        Glyph Layer Management
377      </a>
378
379
380<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
381
382
383
384
385
386
387    <label class="md-nav__title" for="__toc">
388      <span class="md-nav__icon md-icon"></span>
389      Table of contents
390    </label>
391    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
392
393        <li class="md-nav__item">
394  <a href="#synopsis" class="md-nav__link">
395    Synopsis
396  </a>
397
398</li>
399
400        <li class="md-nav__item">
401  <a href="#ft_layeriterator" class="md-nav__link">
402    FT_LayerIterator
403  </a>
404
405</li>
406
407        <li class="md-nav__item">
408  <a href="#ft_get_color_glyph_layer" class="md-nav__link">
409    FT_Get_Color_Glyph_Layer
410  </a>
411
412</li>
413
414        <li class="md-nav__item">
415  <a href="#ft_paintformat" class="md-nav__link">
416    FT_PaintFormat
417  </a>
418
419</li>
420
421        <li class="md-nav__item">
422  <a href="#ft_colorstopiterator" class="md-nav__link">
423    FT_ColorStopIterator
424  </a>
425
426</li>
427
428        <li class="md-nav__item">
429  <a href="#ft_colorindex" class="md-nav__link">
430    FT_ColorIndex
431  </a>
432
433</li>
434
435        <li class="md-nav__item">
436  <a href="#ft_colorstop" class="md-nav__link">
437    FT_ColorStop
438  </a>
439
440</li>
441
442        <li class="md-nav__item">
443  <a href="#ft_paintextend" class="md-nav__link">
444    FT_PaintExtend
445  </a>
446
447</li>
448
449        <li class="md-nav__item">
450  <a href="#ft_colorline" class="md-nav__link">
451    FT_ColorLine
452  </a>
453
454</li>
455
456        <li class="md-nav__item">
457  <a href="#ft_affine23" class="md-nav__link">
458    FT_Affine23
459  </a>
460
461</li>
462
463        <li class="md-nav__item">
464  <a href="#ft_composite_mode" class="md-nav__link">
465    FT_Composite_Mode
466  </a>
467
468</li>
469
470        <li class="md-nav__item">
471  <a href="#ft_opaquepaint" class="md-nav__link">
472    FT_OpaquePaint
473  </a>
474
475</li>
476
477        <li class="md-nav__item">
478  <a href="#ft_paintcolrlayers" class="md-nav__link">
479    FT_PaintColrLayers
480  </a>
481
482</li>
483
484        <li class="md-nav__item">
485  <a href="#ft_paintsolid" class="md-nav__link">
486    FT_PaintSolid
487  </a>
488
489</li>
490
491        <li class="md-nav__item">
492  <a href="#ft_paintlineargradient" class="md-nav__link">
493    FT_PaintLinearGradient
494  </a>
495
496</li>
497
498        <li class="md-nav__item">
499  <a href="#ft_paintradialgradient" class="md-nav__link">
500    FT_PaintRadialGradient
501  </a>
502
503</li>
504
505        <li class="md-nav__item">
506  <a href="#ft_paintsweepgradient" class="md-nav__link">
507    FT_PaintSweepGradient
508  </a>
509
510</li>
511
512        <li class="md-nav__item">
513  <a href="#ft_paintglyph" class="md-nav__link">
514    FT_PaintGlyph
515  </a>
516
517</li>
518
519        <li class="md-nav__item">
520  <a href="#ft_paintcolrglyph" class="md-nav__link">
521    FT_PaintColrGlyph
522  </a>
523
524</li>
525
526        <li class="md-nav__item">
527  <a href="#ft_painttransform" class="md-nav__link">
528    FT_PaintTransform
529  </a>
530
531</li>
532
533        <li class="md-nav__item">
534  <a href="#ft_painttranslate" class="md-nav__link">
535    FT_PaintTranslate
536  </a>
537
538</li>
539
540        <li class="md-nav__item">
541  <a href="#ft_paintscale" class="md-nav__link">
542    FT_PaintScale
543  </a>
544
545</li>
546
547        <li class="md-nav__item">
548  <a href="#ft_paintrotate" class="md-nav__link">
549    FT_PaintRotate
550  </a>
551
552</li>
553
554        <li class="md-nav__item">
555  <a href="#ft_paintskew" class="md-nav__link">
556    FT_PaintSkew
557  </a>
558
559</li>
560
561        <li class="md-nav__item">
562  <a href="#ft_paintcomposite" class="md-nav__link">
563    FT_PaintComposite
564  </a>
565
566</li>
567
568        <li class="md-nav__item">
569  <a href="#ft_colr_paint" class="md-nav__link">
570    FT_COLR_Paint
571  </a>
572
573</li>
574
575        <li class="md-nav__item">
576  <a href="#ft_color_root_transform" class="md-nav__link">
577    FT_Color_Root_Transform
578  </a>
579
580</li>
581
582        <li class="md-nav__item">
583  <a href="#ft_clipbox" class="md-nav__link">
584    FT_ClipBox
585  </a>
586
587</li>
588
589        <li class="md-nav__item">
590  <a href="#ft_get_color_glyph_paint" class="md-nav__link">
591    FT_Get_Color_Glyph_Paint
592  </a>
593
594</li>
595
596        <li class="md-nav__item">
597  <a href="#ft_get_color_glyph_clipbox" class="md-nav__link">
598    FT_Get_Color_Glyph_ClipBox
599  </a>
600
601</li>
602
603        <li class="md-nav__item">
604  <a href="#ft_get_paint_layers" class="md-nav__link">
605    FT_Get_Paint_Layers
606  </a>
607
608</li>
609
610        <li class="md-nav__item">
611  <a href="#ft_get_colorline_stops" class="md-nav__link">
612    FT_Get_Colorline_Stops
613  </a>
614
615</li>
616
617        <li class="md-nav__item">
618  <a href="#ft_get_paint" class="md-nav__link">
619    FT_Get_Paint
620  </a>
621
622</li>
623
624    </ul>
625
626</nav>
627
628    </li>
629
630
631
632
633
634
635
636    <li class="md-nav__item">
637      <a href="ft2-glyph_management.html" class="md-nav__link">
638        Glyph Management
639      </a>
640    </li>
641
642
643
644
645
646
647
648    <li class="md-nav__item">
649      <a href="ft2-mac_specific.html" class="md-nav__link">
650        Mac Specific Interface
651      </a>
652    </li>
653
654
655
656
657
658
659
660    <li class="md-nav__item">
661      <a href="ft2-sizes_management.html" class="md-nav__link">
662        Size Management
663      </a>
664    </li>
665
666
667
668
669
670
671
672    <li class="md-nav__item">
673      <a href="ft2-header_file_macros.html" class="md-nav__link">
674        Header File Macros
675      </a>
676    </li>
677
678
679
680        </ul>
681      </nav>
682    </li>
683
684
685
686
687
688
689
690
691
692
693
694    <li class="md-nav__item md-nav__item--nested">
695
696
697        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" >
698
699      <label class="md-nav__link" for="__nav_5">
700        Format-Specific API
701        <span class="md-nav__icon md-icon"></span>
702      </label>
703      <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1">
704        <label class="md-nav__title" for="__nav_5">
705          <span class="md-nav__icon md-icon"></span>
706          Format-Specific API
707        </label>
708        <ul class="md-nav__list" data-md-scrollfix>
709
710
711
712
713
714    <li class="md-nav__item">
715      <a href="ft2-multiple_masters.html" class="md-nav__link">
716        Multiple Masters
717      </a>
718    </li>
719
720
721
722
723
724
725
726    <li class="md-nav__item">
727      <a href="ft2-truetype_tables.html" class="md-nav__link">
728        TrueType Tables
729      </a>
730    </li>
731
732
733
734
735
736
737
738    <li class="md-nav__item">
739      <a href="ft2-type1_tables.html" class="md-nav__link">
740        Type 1 Tables
741      </a>
742    </li>
743
744
745
746
747
748
749
750    <li class="md-nav__item">
751      <a href="ft2-sfnt_names.html" class="md-nav__link">
752        SFNT Names
753      </a>
754    </li>
755
756
757
758
759
760
761
762    <li class="md-nav__item">
763      <a href="ft2-bdf_fonts.html" class="md-nav__link">
764        BDF and PCF Files
765      </a>
766    </li>
767
768
769
770
771
772
773
774    <li class="md-nav__item">
775      <a href="ft2-cid_fonts.html" class="md-nav__link">
776        CID Fonts
777      </a>
778    </li>
779
780
781
782
783
784
785
786    <li class="md-nav__item">
787      <a href="ft2-pfr_fonts.html" class="md-nav__link">
788        PFR Fonts
789      </a>
790    </li>
791
792
793
794
795
796
797
798    <li class="md-nav__item">
799      <a href="ft2-winfnt_fonts.html" class="md-nav__link">
800        Window FNT Files
801      </a>
802    </li>
803
804
805
806
807
808
809
810    <li class="md-nav__item">
811      <a href="ft2-svg_fonts.html" class="md-nav__link">
812        OpenType SVG Fonts
813      </a>
814    </li>
815
816
817
818
819
820
821
822    <li class="md-nav__item">
823      <a href="ft2-font_formats.html" class="md-nav__link">
824        Font Formats
825      </a>
826    </li>
827
828
829
830
831
832
833
834    <li class="md-nav__item">
835      <a href="ft2-gasp_table.html" class="md-nav__link">
836        Gasp Table
837      </a>
838    </li>
839
840
841
842        </ul>
843      </nav>
844    </li>
845
846
847
848
849
850
851
852
853
854
855
856    <li class="md-nav__item md-nav__item--nested">
857
858
859        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" >
860
861      <label class="md-nav__link" for="__nav_6">
862        Controlling FreeType Modules
863        <span class="md-nav__icon md-icon"></span>
864      </label>
865      <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1">
866        <label class="md-nav__title" for="__nav_6">
867          <span class="md-nav__icon md-icon"></span>
868          Controlling FreeType Modules
869        </label>
870        <ul class="md-nav__list" data-md-scrollfix>
871
872
873
874
875
876    <li class="md-nav__item">
877      <a href="ft2-auto_hinter.html" class="md-nav__link">
878        The auto-hinter
879      </a>
880    </li>
881
882
883
884
885
886
887
888    <li class="md-nav__item">
889      <a href="ft2-cff_driver.html" class="md-nav__link">
890        The CFF driver
891      </a>
892    </li>
893
894
895
896
897
898
899
900    <li class="md-nav__item">
901      <a href="ft2-t1_cid_driver.html" class="md-nav__link">
902        The Type 1 and CID drivers
903      </a>
904    </li>
905
906
907
908
909
910
911
912    <li class="md-nav__item">
913      <a href="ft2-tt_driver.html" class="md-nav__link">
914        The TrueType driver
915      </a>
916    </li>
917
918
919
920
921
922
923
924    <li class="md-nav__item">
925      <a href="ft2-pcf_driver.html" class="md-nav__link">
926        The PCF driver
927      </a>
928    </li>
929
930
931
932
933
934
935
936    <li class="md-nav__item">
937      <a href="ft2-ot_svg_driver.html" class="md-nav__link">
938        The SVG driver
939      </a>
940    </li>
941
942
943
944
945
946
947
948    <li class="md-nav__item">
949      <a href="ft2-properties.html" class="md-nav__link">
950        Driver properties
951      </a>
952    </li>
953
954
955
956
957
958
959
960    <li class="md-nav__item">
961      <a href="ft2-parameter_tags.html" class="md-nav__link">
962        Parameter Tags
963      </a>
964    </li>
965
966
967
968
969
970
971
972    <li class="md-nav__item">
973      <a href="ft2-lcd_rendering.html" class="md-nav__link">
974        Subpixel Rendering
975      </a>
976    </li>
977
978
979
980        </ul>
981      </nav>
982    </li>
983
984
985
986
987
988
989
990
991
992
993
994    <li class="md-nav__item md-nav__item--nested">
995
996
997        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" >
998
999      <label class="md-nav__link" for="__nav_7">
1000        Cache Sub-System
1001        <span class="md-nav__icon md-icon"></span>
1002      </label>
1003      <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1">
1004        <label class="md-nav__title" for="__nav_7">
1005          <span class="md-nav__icon md-icon"></span>
1006          Cache Sub-System
1007        </label>
1008        <ul class="md-nav__list" data-md-scrollfix>
1009
1010
1011
1012
1013
1014    <li class="md-nav__item">
1015      <a href="ft2-cache_subsystem.html" class="md-nav__link">
1016        Cache Sub-System
1017      </a>
1018    </li>
1019
1020
1021
1022        </ul>
1023      </nav>
1024    </li>
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036    <li class="md-nav__item md-nav__item--nested">
1037
1038
1039        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" >
1040
1041      <label class="md-nav__link" for="__nav_8">
1042        Support API
1043        <span class="md-nav__icon md-icon"></span>
1044      </label>
1045      <nav class="md-nav" aria-label="Support API" data-md-level="1">
1046        <label class="md-nav__title" for="__nav_8">
1047          <span class="md-nav__icon md-icon"></span>
1048          Support API
1049        </label>
1050        <ul class="md-nav__list" data-md-scrollfix>
1051
1052
1053
1054
1055
1056    <li class="md-nav__item">
1057      <a href="ft2-computations.html" class="md-nav__link">
1058        Computations
1059      </a>
1060    </li>
1061
1062
1063
1064
1065
1066
1067
1068    <li class="md-nav__item">
1069      <a href="ft2-list_processing.html" class="md-nav__link">
1070        List Processing
1071      </a>
1072    </li>
1073
1074
1075
1076
1077
1078
1079
1080    <li class="md-nav__item">
1081      <a href="ft2-outline_processing.html" class="md-nav__link">
1082        Outline Processing
1083      </a>
1084    </li>
1085
1086
1087
1088
1089
1090
1091
1092    <li class="md-nav__item">
1093      <a href="ft2-quick_advance.html" class="md-nav__link">
1094        Quick retrieval of advance values
1095      </a>
1096    </li>
1097
1098
1099
1100
1101
1102
1103
1104    <li class="md-nav__item">
1105      <a href="ft2-bitmap_handling.html" class="md-nav__link">
1106        Bitmap Handling
1107      </a>
1108    </li>
1109
1110
1111
1112
1113
1114
1115
1116    <li class="md-nav__item">
1117      <a href="ft2-raster.html" class="md-nav__link">
1118        Scanline Converter
1119      </a>
1120    </li>
1121
1122
1123
1124
1125
1126
1127
1128    <li class="md-nav__item">
1129      <a href="ft2-glyph_stroker.html" class="md-nav__link">
1130        Glyph Stroker
1131      </a>
1132    </li>
1133
1134
1135
1136
1137
1138
1139
1140    <li class="md-nav__item">
1141      <a href="ft2-system_interface.html" class="md-nav__link">
1142        System Interface
1143      </a>
1144    </li>
1145
1146
1147
1148
1149
1150
1151
1152    <li class="md-nav__item">
1153      <a href="ft2-module_management.html" class="md-nav__link">
1154        Module Management
1155      </a>
1156    </li>
1157
1158
1159
1160
1161
1162
1163
1164    <li class="md-nav__item">
1165      <a href="ft2-gzip.html" class="md-nav__link">
1166        GZIP Streams
1167      </a>
1168    </li>
1169
1170
1171
1172
1173
1174
1175
1176    <li class="md-nav__item">
1177      <a href="ft2-lzw.html" class="md-nav__link">
1178        LZW Streams
1179      </a>
1180    </li>
1181
1182
1183
1184
1185
1186
1187
1188    <li class="md-nav__item">
1189      <a href="ft2-bzip2.html" class="md-nav__link">
1190        BZIP2 Streams
1191      </a>
1192    </li>
1193
1194
1195
1196
1197
1198
1199
1200    <li class="md-nav__item">
1201      <a href="ft2-debugging_apis.html" class="md-nav__link">
1202        External Debugging APIs
1203      </a>
1204    </li>
1205
1206
1207
1208        </ul>
1209      </nav>
1210    </li>
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222    <li class="md-nav__item md-nav__item--nested">
1223
1224
1225        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" >
1226
1227      <label class="md-nav__link" for="__nav_9">
1228        Error Codes
1229        <span class="md-nav__icon md-icon"></span>
1230      </label>
1231      <nav class="md-nav" aria-label="Error Codes" data-md-level="1">
1232        <label class="md-nav__title" for="__nav_9">
1233          <span class="md-nav__icon md-icon"></span>
1234          Error Codes
1235        </label>
1236        <ul class="md-nav__list" data-md-scrollfix>
1237
1238
1239
1240
1241
1242    <li class="md-nav__item">
1243      <a href="ft2-error_enumerations.html" class="md-nav__link">
1244        Error Enumerations
1245      </a>
1246    </li>
1247
1248
1249
1250
1251
1252
1253
1254    <li class="md-nav__item">
1255      <a href="ft2-error_code_values.html" class="md-nav__link">
1256        Error Code Values
1257      </a>
1258    </li>
1259
1260
1261
1262        </ul>
1263      </nav>
1264    </li>
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276    <li class="md-nav__item md-nav__item--nested">
1277
1278
1279        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" >
1280
1281      <label class="md-nav__link" for="__nav_10">
1282        Miscellaneous
1283        <span class="md-nav__icon md-icon"></span>
1284      </label>
1285      <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1">
1286        <label class="md-nav__title" for="__nav_10">
1287          <span class="md-nav__icon md-icon"></span>
1288          Miscellaneous
1289        </label>
1290        <ul class="md-nav__list" data-md-scrollfix>
1291
1292
1293
1294
1295
1296    <li class="md-nav__item">
1297      <a href="ft2-gx_validation.html" class="md-nav__link">
1298        TrueTypeGX/AAT Validation
1299      </a>
1300    </li>
1301
1302
1303
1304
1305
1306
1307
1308    <li class="md-nav__item">
1309      <a href="ft2-incremental.html" class="md-nav__link">
1310        Incremental Loading
1311      </a>
1312    </li>
1313
1314
1315
1316
1317
1318
1319
1320    <li class="md-nav__item">
1321      <a href="ft2-truetype_engine.html" class="md-nav__link">
1322        The TrueType Engine
1323      </a>
1324    </li>
1325
1326
1327
1328
1329
1330
1331
1332    <li class="md-nav__item">
1333      <a href="ft2-ot_validation.html" class="md-nav__link">
1334        OpenType Validation
1335      </a>
1336    </li>
1337
1338
1339
1340        </ul>
1341      </nav>
1342    </li>
1343
1344
1345
1346  </ul>
1347</nav>
1348                  </div>
1349                </div>
1350              </div>
1351
1352
1353
1354              <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
1355                <div class="md-sidebar__scrollwrap">
1356                  <div class="md-sidebar__inner">
1357
1358<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
1359
1360
1361
1362
1363
1364
1365    <label class="md-nav__title" for="__toc">
1366      <span class="md-nav__icon md-icon"></span>
1367      Table of contents
1368    </label>
1369    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
1370
1371        <li class="md-nav__item">
1372  <a href="#synopsis" class="md-nav__link">
1373    Synopsis
1374  </a>
1375
1376</li>
1377
1378        <li class="md-nav__item">
1379  <a href="#ft_layeriterator" class="md-nav__link">
1380    FT_LayerIterator
1381  </a>
1382
1383</li>
1384
1385        <li class="md-nav__item">
1386  <a href="#ft_get_color_glyph_layer" class="md-nav__link">
1387    FT_Get_Color_Glyph_Layer
1388  </a>
1389
1390</li>
1391
1392        <li class="md-nav__item">
1393  <a href="#ft_paintformat" class="md-nav__link">
1394    FT_PaintFormat
1395  </a>
1396
1397</li>
1398
1399        <li class="md-nav__item">
1400  <a href="#ft_colorstopiterator" class="md-nav__link">
1401    FT_ColorStopIterator
1402  </a>
1403
1404</li>
1405
1406        <li class="md-nav__item">
1407  <a href="#ft_colorindex" class="md-nav__link">
1408    FT_ColorIndex
1409  </a>
1410
1411</li>
1412
1413        <li class="md-nav__item">
1414  <a href="#ft_colorstop" class="md-nav__link">
1415    FT_ColorStop
1416  </a>
1417
1418</li>
1419
1420        <li class="md-nav__item">
1421  <a href="#ft_paintextend" class="md-nav__link">
1422    FT_PaintExtend
1423  </a>
1424
1425</li>
1426
1427        <li class="md-nav__item">
1428  <a href="#ft_colorline" class="md-nav__link">
1429    FT_ColorLine
1430  </a>
1431
1432</li>
1433
1434        <li class="md-nav__item">
1435  <a href="#ft_affine23" class="md-nav__link">
1436    FT_Affine23
1437  </a>
1438
1439</li>
1440
1441        <li class="md-nav__item">
1442  <a href="#ft_composite_mode" class="md-nav__link">
1443    FT_Composite_Mode
1444  </a>
1445
1446</li>
1447
1448        <li class="md-nav__item">
1449  <a href="#ft_opaquepaint" class="md-nav__link">
1450    FT_OpaquePaint
1451  </a>
1452
1453</li>
1454
1455        <li class="md-nav__item">
1456  <a href="#ft_paintcolrlayers" class="md-nav__link">
1457    FT_PaintColrLayers
1458  </a>
1459
1460</li>
1461
1462        <li class="md-nav__item">
1463  <a href="#ft_paintsolid" class="md-nav__link">
1464    FT_PaintSolid
1465  </a>
1466
1467</li>
1468
1469        <li class="md-nav__item">
1470  <a href="#ft_paintlineargradient" class="md-nav__link">
1471    FT_PaintLinearGradient
1472  </a>
1473
1474</li>
1475
1476        <li class="md-nav__item">
1477  <a href="#ft_paintradialgradient" class="md-nav__link">
1478    FT_PaintRadialGradient
1479  </a>
1480
1481</li>
1482
1483        <li class="md-nav__item">
1484  <a href="#ft_paintsweepgradient" class="md-nav__link">
1485    FT_PaintSweepGradient
1486  </a>
1487
1488</li>
1489
1490        <li class="md-nav__item">
1491  <a href="#ft_paintglyph" class="md-nav__link">
1492    FT_PaintGlyph
1493  </a>
1494
1495</li>
1496
1497        <li class="md-nav__item">
1498  <a href="#ft_paintcolrglyph" class="md-nav__link">
1499    FT_PaintColrGlyph
1500  </a>
1501
1502</li>
1503
1504        <li class="md-nav__item">
1505  <a href="#ft_painttransform" class="md-nav__link">
1506    FT_PaintTransform
1507  </a>
1508
1509</li>
1510
1511        <li class="md-nav__item">
1512  <a href="#ft_painttranslate" class="md-nav__link">
1513    FT_PaintTranslate
1514  </a>
1515
1516</li>
1517
1518        <li class="md-nav__item">
1519  <a href="#ft_paintscale" class="md-nav__link">
1520    FT_PaintScale
1521  </a>
1522
1523</li>
1524
1525        <li class="md-nav__item">
1526  <a href="#ft_paintrotate" class="md-nav__link">
1527    FT_PaintRotate
1528  </a>
1529
1530</li>
1531
1532        <li class="md-nav__item">
1533  <a href="#ft_paintskew" class="md-nav__link">
1534    FT_PaintSkew
1535  </a>
1536
1537</li>
1538
1539        <li class="md-nav__item">
1540  <a href="#ft_paintcomposite" class="md-nav__link">
1541    FT_PaintComposite
1542  </a>
1543
1544</li>
1545
1546        <li class="md-nav__item">
1547  <a href="#ft_colr_paint" class="md-nav__link">
1548    FT_COLR_Paint
1549  </a>
1550
1551</li>
1552
1553        <li class="md-nav__item">
1554  <a href="#ft_color_root_transform" class="md-nav__link">
1555    FT_Color_Root_Transform
1556  </a>
1557
1558</li>
1559
1560        <li class="md-nav__item">
1561  <a href="#ft_clipbox" class="md-nav__link">
1562    FT_ClipBox
1563  </a>
1564
1565</li>
1566
1567        <li class="md-nav__item">
1568  <a href="#ft_get_color_glyph_paint" class="md-nav__link">
1569    FT_Get_Color_Glyph_Paint
1570  </a>
1571
1572</li>
1573
1574        <li class="md-nav__item">
1575  <a href="#ft_get_color_glyph_clipbox" class="md-nav__link">
1576    FT_Get_Color_Glyph_ClipBox
1577  </a>
1578
1579</li>
1580
1581        <li class="md-nav__item">
1582  <a href="#ft_get_paint_layers" class="md-nav__link">
1583    FT_Get_Paint_Layers
1584  </a>
1585
1586</li>
1587
1588        <li class="md-nav__item">
1589  <a href="#ft_get_colorline_stops" class="md-nav__link">
1590    FT_Get_Colorline_Stops
1591  </a>
1592
1593</li>
1594
1595        <li class="md-nav__item">
1596  <a href="#ft_get_paint" class="md-nav__link">
1597    FT_Get_Paint
1598  </a>
1599
1600</li>
1601
1602    </ul>
1603
1604</nav>
1605                  </div>
1606                </div>
1607              </div>
1608
1609
1610          <div class="md-content" data-md-component="content">
1611            <article class="md-content__inner md-typeset">
1612
1613
1614
1615                <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#core-api">Core API</a> &raquo; Glyph Layer Management</p>
1616<hr />
1617<h1 id="glyph-layer-management">Glyph Layer Management<a class="headerlink" href="#glyph-layer-management" title="Permanent link">&para;</a></h1>
1618<h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2>
1619<p>The functions described here allow access of colored glyph layer data in OpenType's &lsquo;COLR&rsquo; tables.</p>
1620<h2 id="ft_layeriterator">FT_LayerIterator<a class="headerlink" href="#ft_layeriterator" title="Permanent link">&para;</a></h2>
1621<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
1622<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_LayerIterator_
1623  {
1624    <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>   num_layers;
1625    <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>   layer;
1626    <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>*  p;
1627
1628  } <b>FT_LayerIterator</b>;
1629</code></pre></div>
1630
1631<p>This iterator object is needed for <code><a href="ft2-layer_management.html#ft_get_color_glyph_layer">FT_Get_Color_Glyph_Layer</a></code>.</p>
1632<h4>fields</h4>
1633<table class="fields">
1634<tr><td class="val" id="num_layers">num_layers</td><td class="desc">
1635<p>The number of glyph layers for the requested glyph index. Will be set by <code><a href="ft2-layer_management.html#ft_get_color_glyph_layer">FT_Get_Color_Glyph_Layer</a></code>.</p>
1636</td></tr>
1637<tr><td class="val" id="layer">layer</td><td class="desc">
1638<p>The current layer. Will be set by <code><a href="ft2-layer_management.html#ft_get_color_glyph_layer">FT_Get_Color_Glyph_Layer</a></code>.</p>
1639</td></tr>
1640<tr><td class="val" id="p">p</td><td class="desc">
1641<p>An opaque pointer into &lsquo;COLR&rsquo; table data. The caller must set this to <code>NULL</code> before the first call of <code><a href="ft2-layer_management.html#ft_get_color_glyph_layer">FT_Get_Color_Glyph_Layer</a></code>.</p>
1642</td></tr>
1643</table>
1644
1645<hr>
1646
1647<h2 id="ft_get_color_glyph_layer">FT_Get_Color_Glyph_Layer<a class="headerlink" href="#ft_get_color_glyph_layer" title="Permanent link">&para;</a></h2>
1648<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
1649<div class = "codehilite"><pre><code>  FT_EXPORT( <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> )
1650  <b>FT_Get_Color_Glyph_Layer</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a>            face,
1651                            <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>            base_glyph,
1652                            <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>           *aglyph_index,
1653                            <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>           *acolor_index,
1654                            <a href="ft2-layer_management.html#ft_layeriterator">FT_LayerIterator</a>*  iterator );
1655</code></pre></div>
1656
1657<p>This is an interface to the &lsquo;COLR&rsquo; table in OpenType fonts to iteratively retrieve the colored glyph layers associated with the current glyph slot.</p>
1658<p><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/colr">https://docs.microsoft.com/en-us/typography/opentype/spec/colr</a></p>
1659<p>The glyph layer data for a given glyph index, if present, provides an alternative, multi-color glyph representation: Instead of rendering the outline or bitmap with the given glyph index, glyphs with the indices and colors returned by this function are rendered layer by layer.</p>
1660<p>The returned elements are ordered in the z&nbsp;direction from bottom to top; the 'n'th element should be rendered with the associated palette color and blended on top of the already rendered layers (elements 0, 1, &hellip;, n-1).</p>
1661<h4>input</h4>
1662<table class="fields">
1663<tr><td class="val" id="face">face</td><td class="desc">
1664<p>A handle to the parent face object.</p>
1665</td></tr>
1666<tr><td class="val" id="base_glyph">base_glyph</td><td class="desc">
1667<p>The glyph index the colored glyph layers are associated with.</p>
1668</td></tr>
1669</table>
1670
1671<h4>inout</h4>
1672<table class="fields">
1673<tr><td class="val" id="iterator">iterator</td><td class="desc">
1674<p>An <code><a href="ft2-layer_management.html#ft_layeriterator">FT_LayerIterator</a></code> object. For the first call you should set <code>iterator-&gt;p</code> to <code>NULL</code>. For all following calls, simply use the same object again.</p>
1675</td></tr>
1676</table>
1677
1678<h4>output</h4>
1679<table class="fields">
1680<tr><td class="val" id="aglyph_index">aglyph_index</td><td class="desc">
1681<p>The glyph index of the current layer.</p>
1682</td></tr>
1683<tr><td class="val" id="acolor_index">acolor_index</td><td class="desc">
1684<p>The color index into the font face's color palette of the current layer. The value 0xFFFF is special; it doesn't reference a palette entry but indicates that the text foreground color should be used instead (to be set up by the application outside of FreeType).</p>
1685<p>The color palette can be retrieved with <code><a href="ft2-color_management.html#ft_palette_select">FT_Palette_Select</a></code>.</p>
1686</td></tr>
1687</table>
1688
1689<h4>return</h4>
1690
1691<p>Value&nbsp;1 if everything is OK. If there are no more layers (or if there are no layers at all), value&nbsp;0 gets returned. In case of an error, value&nbsp;0 is returned also.</p>
1692<h4>note</h4>
1693
1694<p>This function is necessary if you want to handle glyph layers by yourself. In particular, functions that operate with <code><a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a></code> objects (like <code><a href="ft2-glyph_management.html#ft_get_glyph">FT_Get_Glyph</a></code> or <code><a href="ft2-glyph_management.html#ft_glyph_to_bitmap">FT_Glyph_To_Bitmap</a></code>) don't have access to this information.</p>
1695<p>Note that <code><a href="ft2-base_interface.html#ft_render_glyph">FT_Render_Glyph</a></code> is able to handle colored glyph layers automatically if the <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_COLOR</a></code> flag is passed to a previous call to <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code>. [This is an experimental feature.]</p>
1696<h4>example</h4>
1697<div class="highlight"><pre><span></span><code>  FT_Color*         palette;
1698  FT_LayerIterator  iterator;
1699
1700  FT_Bool  have_layers;
1701  FT_UInt  layer_glyph_index;
1702  FT_UInt  layer_color_index;
1703
1704
1705  error = FT_Palette_Select( face, palette_index, &amp;palette );
1706  if ( error )
1707    palette = NULL;
1708
1709  iterator.p  = NULL;
1710  have_layers = FT_Get_Color_Glyph_Layer( face,
1711                                          glyph_index,
1712                                          &amp;layer_glyph_index,
1713                                          &amp;layer_color_index,
1714                                          &amp;iterator );
1715
1716  if ( palette &amp;&amp; have_layers )
1717  {
1718    do
1719    {
1720      FT_Color  layer_color;
1721
1722
1723      if ( layer_color_index == 0xFFFF )
1724        layer_color = text_foreground_color;
1725      else
1726        layer_color = palette[layer_color_index];
1727
1728      // Load and render glyph `layer_glyph_index&#39;, then
1729      // blend resulting pixmap (using color `layer_color&#39;)
1730      // with previously created pixmaps.
1731
1732    } while ( FT_Get_Color_Glyph_Layer( face,
1733                                        glyph_index,
1734                                        &amp;layer_glyph_index,
1735                                        &amp;layer_color_index,
1736                                        &amp;iterator ) );
1737  }
1738</code></pre></div>
1739<hr>
1740
1741<h2 id="ft_paintformat">FT_PaintFormat<a class="headerlink" href="#ft_paintformat" title="Permanent link">&para;</a></h2>
1742<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
1743<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_PaintFormat_
1744  {
1745    FT_COLR_PAINTFORMAT_COLR_LAYERS     = 1,
1746    FT_COLR_PAINTFORMAT_SOLID           = 2,
1747    FT_COLR_PAINTFORMAT_LINEAR_GRADIENT = 4,
1748    FT_COLR_PAINTFORMAT_RADIAL_GRADIENT = 6,
1749    FT_COLR_PAINTFORMAT_SWEEP_GRADIENT  = 8,
1750    FT_COLR_PAINTFORMAT_GLYPH           = 10,
1751    FT_COLR_PAINTFORMAT_COLR_GLYPH      = 11,
1752    FT_COLR_PAINTFORMAT_TRANSFORM       = 12,
1753    FT_COLR_PAINTFORMAT_TRANSLATE       = 14,
1754    FT_COLR_PAINTFORMAT_SCALE           = 16,
1755    FT_COLR_PAINTFORMAT_ROTATE          = 24,
1756    FT_COLR_PAINTFORMAT_SKEW            = 28,
1757    FT_COLR_PAINTFORMAT_COMPOSITE       = 32,
1758    FT_COLR_PAINT_FORMAT_MAX            = 33,
1759    FT_COLR_PAINTFORMAT_UNSUPPORTED     = 255
1760
1761  } <b>FT_PaintFormat</b>;
1762</code></pre></div>
1763
1764<p>Enumeration describing the different paint format types of the v1 extensions to the &lsquo;COLR&rsquo; table, see &lsquo;<a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a>&rsquo;.</p>
1765<p>The enumeration values losely correspond with the format numbers of the specification: FreeType always returns a fully specified &lsquo;Paint&rsquo; structure for the &lsquo;Transform&rsquo;, &lsquo;Translate&rsquo;, &lsquo;Scale&rsquo;, &lsquo;Rotate&rsquo;, and &lsquo;Skew&rsquo; table types even though the specification has different formats depending on whether or not a center is specified, whether the scale is uniform in x and y&nbsp;direction or not, etc. Also, only non-variable format identifiers are listed in this enumeration; as soon as support for variable &lsquo;COLR&rsquo; v1 fonts is implemented, interpolation is performed dependent on axis coordinates, which are configured on the <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> through <code><a href="ft2-multiple_masters.html#ft_set_var_design_coordinates">FT_Set_Var_Design_Coordinates</a></code>. This implies that always static, readily interpolated values are returned in the &lsquo;Paint&rsquo; structures.</p>
1766<h4>since</h4>
1767
1768<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
1769<hr>
1770
1771<h2 id="ft_colorstopiterator">FT_ColorStopIterator<a class="headerlink" href="#ft_colorstopiterator" title="Permanent link">&para;</a></h2>
1772<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
1773<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_ColorStopIterator_
1774  {
1775    <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>  num_color_stops;
1776    <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>  current_color_stop;
1777
1778    <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>*  p;
1779
1780  } <b>FT_ColorStopIterator</b>;
1781</code></pre></div>
1782
1783<p>This iterator object is needed for <code><a href="ft2-layer_management.html#ft_get_colorline_stops">FT_Get_Colorline_Stops</a></code>. It keeps state while iterating over the stops of an <code><a href="ft2-layer_management.html#ft_colorline">FT_ColorLine</a></code>, representing the <code>ColorLine</code> struct of the v1 extensions to &lsquo;COLR&rsquo;, see &lsquo;<a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a>&rsquo;.</p>
1784<h4>fields</h4>
1785<table class="fields">
1786<tr><td class="val" id="num_color_stops">num_color_stops</td><td class="desc">
1787<p>The number of color stops for the requested glyph index. Set by <code><a href="ft2-layer_management.html#ft_get_paint">FT_Get_Paint</a></code>.</p>
1788</td></tr>
1789<tr><td class="val" id="current_color_stop">current_color_stop</td><td class="desc">
1790<p>The current color stop. Set by <code><a href="ft2-layer_management.html#ft_get_colorline_stops">FT_Get_Colorline_Stops</a></code>.</p>
1791</td></tr>
1792<tr><td class="val" id="p">p</td><td class="desc">
1793<p>An opaque pointer into &lsquo;COLR&rsquo; table data. Set by <code><a href="ft2-layer_management.html#ft_get_paint">FT_Get_Paint</a></code>. Updated by <code><a href="ft2-layer_management.html#ft_get_colorline_stops">FT_Get_Colorline_Stops</a></code>.</p>
1794</td></tr>
1795</table>
1796
1797<h4>since</h4>
1798
1799<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
1800<hr>
1801
1802<h2 id="ft_colorindex">FT_ColorIndex<a class="headerlink" href="#ft_colorindex" title="Permanent link">&para;</a></h2>
1803<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
1804<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_ColorIndex_
1805  {
1806    <a href="ft2-basic_types.html#ft_uint16">FT_UInt16</a>   palette_index;
1807    <a href="ft2-basic_types.html#ft_f2dot14">FT_F2Dot14</a>  alpha;
1808
1809  } <b>FT_ColorIndex</b>;
1810</code></pre></div>
1811
1812<p>A structure representing a <code>ColorIndex</code> value of the &lsquo;COLR&rsquo; v1 extensions, see &lsquo;<a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a>&rsquo;.</p>
1813<h4>fields</h4>
1814<table class="fields">
1815<tr><td class="val" id="palette_index">palette_index</td><td class="desc">
1816<p>The palette index into a &lsquo;CPAL&rsquo; palette.</p>
1817</td></tr>
1818<tr><td class="val" id="alpha">alpha</td><td class="desc">
1819<p>Alpha transparency value multiplied with the value from &lsquo;CPAL&rsquo;.</p>
1820</td></tr>
1821</table>
1822
1823<h4>since</h4>
1824
1825<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
1826<hr>
1827
1828<h2 id="ft_colorstop">FT_ColorStop<a class="headerlink" href="#ft_colorstop" title="Permanent link">&para;</a></h2>
1829<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
1830<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_ColorStop_
1831  {
1832    <a href="ft2-basic_types.html#ft_f2dot14">FT_F2Dot14</a>     stop_offset;
1833    <a href="ft2-layer_management.html#ft_colorindex">FT_ColorIndex</a>  color;
1834
1835  } <b>FT_ColorStop</b>;
1836</code></pre></div>
1837
1838<p>A structure representing a <code>ColorStop</code> value of the &lsquo;COLR&rsquo; v1 extensions, see &lsquo;<a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a>&rsquo;.</p>
1839<h4>fields</h4>
1840<table class="fields">
1841<tr><td class="val" id="stop_offset">stop_offset</td><td class="desc">
1842<p>The stop offset between 0 and 1 along the gradient.</p>
1843</td></tr>
1844<tr><td class="val" id="color">color</td><td class="desc">
1845<p>The color information for this stop, see <code><a href="ft2-layer_management.html#ft_colorindex">FT_ColorIndex</a></code>.</p>
1846</td></tr>
1847</table>
1848
1849<h4>since</h4>
1850
1851<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
1852<hr>
1853
1854<h2 id="ft_paintextend">FT_PaintExtend<a class="headerlink" href="#ft_paintextend" title="Permanent link">&para;</a></h2>
1855<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
1856<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_PaintExtend_
1857  {
1858    FT_COLR_PAINT_EXTEND_PAD     = 0,
1859    FT_COLR_PAINT_EXTEND_REPEAT  = 1,
1860    FT_COLR_PAINT_EXTEND_REFLECT = 2
1861
1862  } <b>FT_PaintExtend</b>;
1863</code></pre></div>
1864
1865<p>An enumeration representing the &lsquo;Extend&rsquo; mode of the &lsquo;COLR&rsquo; v1 extensions, see &lsquo;<a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a>&rsquo;. It describes how the gradient fill continues at the other boundaries.</p>
1866<h4>since</h4>
1867
1868<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
1869<hr>
1870
1871<h2 id="ft_colorline">FT_ColorLine<a class="headerlink" href="#ft_colorline" title="Permanent link">&para;</a></h2>
1872<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
1873<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_ColorLine_
1874  {
1875    <a href="ft2-layer_management.html#ft_paintextend">FT_PaintExtend</a>        extend;
1876    <a href="ft2-layer_management.html#ft_colorstopiterator">FT_ColorStopIterator</a>  color_stop_iterator;
1877
1878  } <b>FT_ColorLine</b>;
1879</code></pre></div>
1880
1881<p>A structure representing a <code>ColorLine</code> value of the &lsquo;COLR&rsquo; v1 extensions, see &lsquo;<a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a>&rsquo;. It describes a list of color stops along the defined gradient.</p>
1882<h4>fields</h4>
1883<table class="fields">
1884<tr><td class="val" id="extend">extend</td><td class="desc">
1885<p>The extend mode at the outer boundaries, see <code><a href="ft2-layer_management.html#ft_paintextend">FT_PaintExtend</a></code>.</p>
1886</td></tr>
1887<tr><td class="val" id="color_stop_iterator">color_stop_iterator</td><td class="desc">
1888<p>The <code><a href="ft2-layer_management.html#ft_colorstopiterator">FT_ColorStopIterator</a></code> used to enumerate and retrieve the actual <code><a href="ft2-layer_management.html#ft_colorstop">FT_ColorStop</a></code>'s.</p>
1889</td></tr>
1890</table>
1891
1892<h4>since</h4>
1893
1894<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
1895<hr>
1896
1897<h2 id="ft_affine23">FT_Affine23<a class="headerlink" href="#ft_affine23" title="Permanent link">&para;</a></h2>
1898<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
1899<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Affine_23_
1900  {
1901    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  xx, xy, dx;
1902    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  yx, yy, dy;
1903
1904  } <b>FT_Affine23</b>;
1905</code></pre></div>
1906
1907<p>A structure used to store a 2x3 matrix. Coefficients are in 16.16 fixed-point format. The computation performed is
1908<div class="highlight"><pre><span></span><code>  x&#39; = x*xx + y*xy + dx
1909  y&#39; = x*yx + y*yy + dy
1910</code></pre></div></p>
1911<h4>fields</h4>
1912<table class="fields">
1913<tr><td class="val" id="xx">xx</td><td class="desc">
1914<p>Matrix coefficient.</p>
1915</td></tr>
1916<tr><td class="val" id="xy">xy</td><td class="desc">
1917<p>Matrix coefficient.</p>
1918</td></tr>
1919<tr><td class="val" id="dx">dx</td><td class="desc">
1920<p>x translation.</p>
1921</td></tr>
1922<tr><td class="val" id="yx">yx</td><td class="desc">
1923<p>Matrix coefficient.</p>
1924</td></tr>
1925<tr><td class="val" id="yy">yy</td><td class="desc">
1926<p>Matrix coefficient.</p>
1927</td></tr>
1928<tr><td class="val" id="dy">dy</td><td class="desc">
1929<p>y translation.</p>
1930</td></tr>
1931</table>
1932
1933<h4>since</h4>
1934
1935<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
1936<hr>
1937
1938<h2 id="ft_composite_mode">FT_Composite_Mode<a class="headerlink" href="#ft_composite_mode" title="Permanent link">&para;</a></h2>
1939<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
1940<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Composite_Mode_
1941  {
1942    FT_COLR_COMPOSITE_CLEAR          = 0,
1943    FT_COLR_COMPOSITE_SRC            = 1,
1944    FT_COLR_COMPOSITE_DEST           = 2,
1945    FT_COLR_COMPOSITE_SRC_OVER       = 3,
1946    FT_COLR_COMPOSITE_DEST_OVER      = 4,
1947    FT_COLR_COMPOSITE_SRC_IN         = 5,
1948    FT_COLR_COMPOSITE_DEST_IN        = 6,
1949    FT_COLR_COMPOSITE_SRC_OUT        = 7,
1950    FT_COLR_COMPOSITE_DEST_OUT       = 8,
1951    FT_COLR_COMPOSITE_SRC_ATOP       = 9,
1952    FT_COLR_COMPOSITE_DEST_ATOP      = 10,
1953    FT_COLR_COMPOSITE_XOR            = 11,
1954    FT_COLR_COMPOSITE_PLUS           = 12,
1955    FT_COLR_COMPOSITE_SCREEN         = 13,
1956    FT_COLR_COMPOSITE_OVERLAY        = 14,
1957    FT_COLR_COMPOSITE_DARKEN         = 15,
1958    FT_COLR_COMPOSITE_LIGHTEN        = 16,
1959    FT_COLR_COMPOSITE_COLOR_DODGE    = 17,
1960    FT_COLR_COMPOSITE_COLOR_BURN     = 18,
1961    FT_COLR_COMPOSITE_HARD_LIGHT     = 19,
1962    FT_COLR_COMPOSITE_SOFT_LIGHT     = 20,
1963    FT_COLR_COMPOSITE_DIFFERENCE     = 21,
1964    FT_COLR_COMPOSITE_EXCLUSION      = 22,
1965    FT_COLR_COMPOSITE_MULTIPLY       = 23,
1966    FT_COLR_COMPOSITE_HSL_HUE        = 24,
1967    FT_COLR_COMPOSITE_HSL_SATURATION = 25,
1968    FT_COLR_COMPOSITE_HSL_COLOR      = 26,
1969    FT_COLR_COMPOSITE_HSL_LUMINOSITY = 27,
1970    FT_COLR_COMPOSITE_MAX            = 28
1971
1972  } <b>FT_Composite_Mode</b>;
1973</code></pre></div>
1974
1975<p>An enumeration listing the &lsquo;COLR&rsquo; v1 composite modes used in <code><a href="ft2-layer_management.html#ft_paintcomposite">FT_PaintComposite</a></code>. For more details on each paint mode, see &lsquo;<a href="https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators">https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators</a>&rsquo;.</p>
1976<h4>since</h4>
1977
1978<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
1979<hr>
1980
1981<h2 id="ft_opaquepaint">FT_OpaquePaint<a class="headerlink" href="#ft_opaquepaint" title="Permanent link">&para;</a></h2>
1982<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
1983<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Opaque_Paint_
1984  {
1985    <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>*  p;
1986    <a href="ft2-basic_types.html#ft_bool">FT_Bool</a>   insert_root_transform;
1987  } <b>FT_OpaquePaint</b>;
1988</code></pre></div>
1989
1990<p>A structure representing an offset to a <code>Paint</code> value stored in any of the paint tables of a &lsquo;COLR&rsquo; v1 font. Compare Offset&lt;24&gt; there. When &lsquo;COLR&rsquo; v1 paint tables represented by FreeType objects such as <code><a href="ft2-layer_management.html#ft_paintcolrlayers">FT_PaintColrLayers</a></code>, <code><a href="ft2-layer_management.html#ft_paintcomposite">FT_PaintComposite</a></code>, or <code><a href="ft2-layer_management.html#ft_painttransform">FT_PaintTransform</a></code> reference downstream nested paint tables, we do not immediately retrieve them but encapsulate their location in this type. Use <code><a href="ft2-layer_management.html#ft_get_paint">FT_Get_Paint</a></code> to retrieve the actual <code><a href="ft2-layer_management.html#ft_colr_paint">FT_COLR_Paint</a></code> object that describes the details of the respective paint table.</p>
1991<h4>fields</h4>
1992<table class="fields">
1993<tr><td class="val" id="p">p</td><td class="desc">
1994<p>An internal offset to a Paint table, needs to be set to NULL before passing this struct as an argument to <code><a href="ft2-layer_management.html#ft_get_paint">FT_Get_Paint</a></code>.</p>
1995</td></tr>
1996<tr><td class="val" id="insert_root_transform">insert_root_transform</td><td class="desc">
1997<p>An internal boolean to track whether an initial root transform is to be provided. Do not set this value.</p>
1998</td></tr>
1999</table>
2000
2001<h4>since</h4>
2002
2003<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2004<hr>
2005
2006<h2 id="ft_paintcolrlayers">FT_PaintColrLayers<a class="headerlink" href="#ft_paintcolrlayers" title="Permanent link">&para;</a></h2>
2007<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2008<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintColrLayers_
2009  {
2010    <a href="ft2-layer_management.html#ft_layeriterator">FT_LayerIterator</a>  layer_iterator;
2011
2012  } <b>FT_PaintColrLayers</b>;
2013</code></pre></div>
2014
2015<p>A structure representing a <code>PaintColrLayers</code> table of a &lsquo;COLR&rsquo; v1 font. This table describes a set of layers that are to be composited with composite mode <code>FT_COLR_COMPOSITE_SRC_OVER</code>. The return value of this function is an <code><a href="ft2-layer_management.html#ft_layeriterator">FT_LayerIterator</a></code> initialized so that it can be used with <code><a href="ft2-layer_management.html#ft_get_paint_layers">FT_Get_Paint_Layers</a></code> to retrieve the <code><a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a></code> objects as references to each layer.</p>
2016<h4>fields</h4>
2017<table class="fields">
2018<tr><td class="val" id="layer_iterator">layer_iterator</td><td class="desc">
2019<p>The layer iterator that describes the layers of this paint.</p>
2020</td></tr>
2021</table>
2022
2023<h4>since</h4>
2024
2025<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2026<hr>
2027
2028<h2 id="ft_paintsolid">FT_PaintSolid<a class="headerlink" href="#ft_paintsolid" title="Permanent link">&para;</a></h2>
2029<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2030<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintSolid_
2031  {
2032    <a href="ft2-layer_management.html#ft_colorindex">FT_ColorIndex</a>  color;
2033
2034  } <b>FT_PaintSolid</b>;
2035</code></pre></div>
2036
2037<p>A structure representing a <code>PaintSolid</code> value of the &lsquo;COLR&rsquo; v1 extensions, see &lsquo;<a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a>&rsquo;. Using a <code>PaintSolid</code> value means that the glyph layer filled with this paint is solid-colored and does not contain a gradient.</p>
2038<h4>fields</h4>
2039<table class="fields">
2040<tr><td class="val" id="color">color</td><td class="desc">
2041<p>The color information for this solid paint, see <code><a href="ft2-layer_management.html#ft_colorindex">FT_ColorIndex</a></code>.</p>
2042</td></tr>
2043</table>
2044
2045<h4>since</h4>
2046
2047<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2048<hr>
2049
2050<h2 id="ft_paintlineargradient">FT_PaintLinearGradient<a class="headerlink" href="#ft_paintlineargradient" title="Permanent link">&para;</a></h2>
2051<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2052<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintLinearGradient_
2053  {
2054    <a href="ft2-layer_management.html#ft_colorline">FT_ColorLine</a>  colorline;
2055
2056    /* TODO: Potentially expose those as x0, y0 etc. */
2057    <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>  p0;
2058    <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>  p1;
2059    <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>  p2;
2060
2061  } <b>FT_PaintLinearGradient</b>;
2062</code></pre></div>
2063
2064<p>A structure representing a <code>PaintLinearGradient</code> value of the &lsquo;COLR&rsquo; v1 extensions, see &lsquo;<a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a>&rsquo;. The glyph layer filled with this paint is drawn filled with a linear gradient.</p>
2065<h4>fields</h4>
2066<table class="fields">
2067<tr><td class="val" id="colorline">colorline</td><td class="desc">
2068<p>The <code><a href="ft2-layer_management.html#ft_colorline">FT_ColorLine</a></code> information for this paint, i.e., the list of color stops along the gradient.</p>
2069</td></tr>
2070<tr><td class="val" id="p0">p0</td><td class="desc">
2071<p>The starting point of the gradient definition in font units represented as a 16.16 fixed-point <code>FT_Vector</code>.</p>
2072</td></tr>
2073<tr><td class="val" id="p1">p1</td><td class="desc">
2074<p>The end point of the gradient definition in font units represented as a 16.16 fixed-point <code>FT_Vector</code>.</p>
2075</td></tr>
2076<tr><td class="val" id="p2">p2</td><td class="desc">
2077<p>Optional point&nbsp;p2 to rotate the gradient in font units represented as a 16.16 fixed-point <code>FT_Vector</code>. Otherwise equal to&nbsp;p0.</p>
2078</td></tr>
2079</table>
2080
2081<h4>since</h4>
2082
2083<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2084<hr>
2085
2086<h2 id="ft_paintradialgradient">FT_PaintRadialGradient<a class="headerlink" href="#ft_paintradialgradient" title="Permanent link">&para;</a></h2>
2087<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2088<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintRadialGradient_
2089  {
2090    <a href="ft2-layer_management.html#ft_colorline">FT_ColorLine</a>  colorline;
2091
2092    <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>  c0;
2093    <a href="ft2-basic_types.html#ft_pos">FT_Pos</a>     r0;
2094    <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>  c1;
2095    <a href="ft2-basic_types.html#ft_pos">FT_Pos</a>     r1;
2096
2097  } <b>FT_PaintRadialGradient</b>;
2098</code></pre></div>
2099
2100<p>A structure representing a <code>PaintRadialGradient</code> value of the &lsquo;COLR&rsquo; v1 extensions, see &lsquo;<a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a>&rsquo;. The glyph layer filled with this paint is drawn filled filled with a radial gradient.</p>
2101<h4>fields</h4>
2102<table class="fields">
2103<tr><td class="val" id="colorline">colorline</td><td class="desc">
2104<p>The <code><a href="ft2-layer_management.html#ft_colorline">FT_ColorLine</a></code> information for this paint, i.e., the list of color stops along the gradient.</p>
2105</td></tr>
2106<tr><td class="val" id="c0">c0</td><td class="desc">
2107<p>The center of the starting point of the radial gradient in font units represented as a 16.16 fixed-point <code>FT_Vector</code>.</p>
2108</td></tr>
2109<tr><td class="val" id="r0">r0</td><td class="desc">
2110<p>The radius of the starting circle of the radial gradient in font units represented as a 16.16 fixed-point value.</p>
2111</td></tr>
2112<tr><td class="val" id="c1">c1</td><td class="desc">
2113<p>The center of the end point of the radial gradient in font units represented as a 16.16 fixed-point <code>FT_Vector</code>.</p>
2114</td></tr>
2115<tr><td class="val" id="r1">r1</td><td class="desc">
2116<p>The radius of the end circle of the radial gradient in font units represented as a 16.16 fixed-point value.</p>
2117</td></tr>
2118</table>
2119
2120<h4>since</h4>
2121
2122<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2123<hr>
2124
2125<h2 id="ft_paintsweepgradient">FT_PaintSweepGradient<a class="headerlink" href="#ft_paintsweepgradient" title="Permanent link">&para;</a></h2>
2126<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2127<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintSweepGradient_
2128  {
2129    <a href="ft2-layer_management.html#ft_colorline">FT_ColorLine</a>  colorline;
2130
2131    <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>  center;
2132    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>   start_angle;
2133    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>   end_angle;
2134
2135  } <b>FT_PaintSweepGradient</b>;
2136</code></pre></div>
2137
2138<p>A structure representing a <code>PaintSweepGradient</code> value of the &lsquo;COLR&rsquo; v1 extensions, see &lsquo;<a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a>&rsquo;. The glyph layer filled with this paint is drawn filled with a sweep gradient from <code>start_angle</code> to <code>end_angle</code>.</p>
2139<h4>fields</h4>
2140<table class="fields">
2141<tr><td class="val" id="colorline">colorline</td><td class="desc">
2142<p>The <code><a href="ft2-layer_management.html#ft_colorline">FT_ColorLine</a></code> information for this paint, i.e., the list of color stops along the gradient.</p>
2143</td></tr>
2144<tr><td class="val" id="center">center</td><td class="desc">
2145<p>The center of the sweep gradient in font units represented as a vector of 16.16 fixed-point values.</p>
2146</td></tr>
2147<tr><td class="val" id="start_angle">start_angle</td><td class="desc">
2148<p>The start angle of the sweep gradient in 16.16 fixed-point format specifying degrees divided by 180.0 (as in the spec). Multiply by 180.0f to receive degrees value. Values are given counter-clockwise, starting from the (positive) y&nbsp;axis.</p>
2149</td></tr>
2150<tr><td class="val" id="end_angle">end_angle</td><td class="desc">
2151<p>The end angle of the sweep gradient in 16.16 fixed-point format specifying degrees divided by 180.0 (as in the spec). Multiply by 180.0f to receive degrees value. Values are given counter-clockwise, starting from the (positive) y&nbsp;axis.</p>
2152</td></tr>
2153</table>
2154
2155<h4>since</h4>
2156
2157<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2158<hr>
2159
2160<h2 id="ft_paintglyph">FT_PaintGlyph<a class="headerlink" href="#ft_paintglyph" title="Permanent link">&para;</a></h2>
2161<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2162<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintGlyph_
2163  {
2164    <a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a>  paint;
2165    <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>         glyphID;
2166
2167  } <b>FT_PaintGlyph</b>;
2168</code></pre></div>
2169
2170<p>A structure representing a &lsquo;COLR&rsquo; v1 <code>PaintGlyph</code> paint table.</p>
2171<h4>fields</h4>
2172<table class="fields">
2173<tr><td class="val" id="paint">paint</td><td class="desc">
2174<p>An opaque paint object pointing to a <code>Paint</code> table that serves as the fill for the glyph ID.</p>
2175</td></tr>
2176<tr><td class="val" id="glyphid">glyphID</td><td class="desc">
2177<p>The glyph ID from the &lsquo;glyf&rsquo; table, which serves as the contour information that is filled with paint.</p>
2178</td></tr>
2179</table>
2180
2181<h4>since</h4>
2182
2183<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2184<hr>
2185
2186<h2 id="ft_paintcolrglyph">FT_PaintColrGlyph<a class="headerlink" href="#ft_paintcolrglyph" title="Permanent link">&para;</a></h2>
2187<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2188<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintColrGlyph_
2189  {
2190    <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>  glyphID;
2191
2192  } <b>FT_PaintColrGlyph</b>;
2193</code></pre></div>
2194
2195<p>A structure representing a &lsquo;COLR&rsquo; v1 <code>PaintColorGlyph</code> paint table.</p>
2196<h4>fields</h4>
2197<table class="fields">
2198<tr><td class="val" id="glyphid">glyphID</td><td class="desc">
2199<p>The glyph ID from the <code>BaseGlyphV1List</code> table that is drawn for this paint.</p>
2200</td></tr>
2201</table>
2202
2203<h4>since</h4>
2204
2205<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2206<hr>
2207
2208<h2 id="ft_painttransform">FT_PaintTransform<a class="headerlink" href="#ft_painttransform" title="Permanent link">&para;</a></h2>
2209<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2210<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintTransform_
2211  {
2212    <a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a>  paint;
2213    <a href="ft2-layer_management.html#ft_affine23">FT_Affine23</a>     affine;
2214
2215  } <b>FT_PaintTransform</b>;
2216</code></pre></div>
2217
2218<p>A structure representing a &lsquo;COLR&rsquo; v1 <code>PaintTransform</code> paint table.</p>
2219<h4>fields</h4>
2220<table class="fields">
2221<tr><td class="val" id="paint">paint</td><td class="desc">
2222<p>An opaque paint that is subject to being transformed.</p>
2223</td></tr>
2224<tr><td class="val" id="affine">affine</td><td class="desc">
2225<p>A 2x3 transformation matrix in <code><a href="ft2-layer_management.html#ft_affine23">FT_Affine23</a></code> format containing 16.16 fixed-point values.</p>
2226</td></tr>
2227</table>
2228
2229<h4>since</h4>
2230
2231<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2232<hr>
2233
2234<h2 id="ft_painttranslate">FT_PaintTranslate<a class="headerlink" href="#ft_painttranslate" title="Permanent link">&para;</a></h2>
2235<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2236<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintTranslate_
2237  {
2238    <a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a>  paint;
2239
2240    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  dx;
2241    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  dy;
2242
2243  } <b>FT_PaintTranslate</b>;
2244</code></pre></div>
2245
2246<p>A structure representing a &lsquo;COLR&rsquo; v1 <code>PaintTranslate</code> paint table. Used for translating downstream paints by a given x and y&nbsp;delta.</p>
2247<h4>fields</h4>
2248<table class="fields">
2249<tr><td class="val" id="paint">paint</td><td class="desc">
2250<p>An <code><a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a></code> object referencing the paint that is to be rotated.</p>
2251</td></tr>
2252<tr><td class="val" id="dx">dx</td><td class="desc">
2253<p>Translation in x&nbsp;direction in font units represented as a 16.16 fixed-point value.</p>
2254</td></tr>
2255<tr><td class="val" id="dy">dy</td><td class="desc">
2256<p>Translation in y&nbsp;direction in font units represented as a 16.16 fixed-point value.</p>
2257</td></tr>
2258</table>
2259
2260<h4>since</h4>
2261
2262<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2263<hr>
2264
2265<h2 id="ft_paintscale">FT_PaintScale<a class="headerlink" href="#ft_paintscale" title="Permanent link">&para;</a></h2>
2266<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2267<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintScale_
2268  {
2269    <a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a>  paint;
2270
2271    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  scale_x;
2272    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  scale_y;
2273
2274    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  center_x;
2275    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  center_y;
2276
2277  } <b>FT_PaintScale</b>;
2278</code></pre></div>
2279
2280<p>A structure representing all of the &lsquo;COLR&rsquo; v1 &lsquo;PaintScale*&rsquo; paint tables. Used for scaling downstream paints by a given x and y&nbsp;scale, with a given center. This structure is used for all &lsquo;PaintScale*&rsquo; types that are part of specification; fields of this structure are filled accordingly. If there is a center, the center values are set, otherwise they are set to the zero coordinate. If the source font file has &lsquo;PaintScaleUniform*&rsquo; set, the scale values are set accordingly to the same value.</p>
2281<h4>fields</h4>
2282<table class="fields">
2283<tr><td class="val" id="paint">paint</td><td class="desc">
2284<p>An <code><a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a></code> object referencing the paint that is to be scaled.</p>
2285</td></tr>
2286<tr><td class="val" id="scale_x">scale_x</td><td class="desc">
2287<p>Scale factor in x&nbsp;direction represented as a 16.16 fixed-point value.</p>
2288</td></tr>
2289<tr><td class="val" id="scale_y">scale_y</td><td class="desc">
2290<p>Scale factor in y&nbsp;direction represented as a 16.16 fixed-point value.</p>
2291</td></tr>
2292<tr><td class="val" id="center_x">center_x</td><td class="desc">
2293<p>x&nbsp;coordinate of center point to scale from represented as a 16.16 fixed-point value.</p>
2294</td></tr>
2295<tr><td class="val" id="center_y">center_y</td><td class="desc">
2296<p>y&nbsp;coordinate of center point to scale from represented as a 16.16 fixed-point value.</p>
2297</td></tr>
2298</table>
2299
2300<h4>since</h4>
2301
2302<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward-compatibility of both the API and ABI.</p>
2303<hr>
2304
2305<h2 id="ft_paintrotate">FT_PaintRotate<a class="headerlink" href="#ft_paintrotate" title="Permanent link">&para;</a></h2>
2306<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2307<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintRotate_
2308  {
2309    <a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a>  paint;
2310
2311    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  angle;
2312
2313    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  center_x;
2314    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  center_y;
2315
2316  } <b>FT_PaintRotate</b>;
2317</code></pre></div>
2318
2319<p>A structure representing a &lsquo;COLR&rsquo; v1 <code>PaintRotate</code> paint table. Used for rotating downstream paints with a given center and angle.</p>
2320<h4>fields</h4>
2321<table class="fields">
2322<tr><td class="val" id="paint">paint</td><td class="desc">
2323<p>An <code><a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a></code> object referencing the paint that is to be rotated.</p>
2324</td></tr>
2325<tr><td class="val" id="angle">angle</td><td class="desc">
2326<p>The rotation angle that is to be applied in degrees divided by 180.0 (as in the spec) represented as a 16.16 fixed-point value. Multiply by 180.0f to receive degrees value.</p>
2327</td></tr>
2328<tr><td class="val" id="center_x">center_x</td><td class="desc">
2329<p>The x&nbsp;coordinate of the pivot point of the rotation in font units) represented as a 16.16 fixed-point value.</p>
2330</td></tr>
2331<tr><td class="val" id="center_y">center_y</td><td class="desc">
2332<p>The y&nbsp;coordinate of the pivot point of the rotation in font units represented as a 16.16 fixed-point value.</p>
2333</td></tr>
2334</table>
2335
2336<h4>since</h4>
2337
2338<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2339<hr>
2340
2341<h2 id="ft_paintskew">FT_PaintSkew<a class="headerlink" href="#ft_paintskew" title="Permanent link">&para;</a></h2>
2342<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2343<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintSkew_
2344  {
2345    <a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a>  paint;
2346
2347    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  x_skew_angle;
2348    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  y_skew_angle;
2349
2350    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  center_x;
2351    <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>  center_y;
2352
2353  } <b>FT_PaintSkew</b>;
2354</code></pre></div>
2355
2356<p>A structure representing a &lsquo;COLR&rsquo; v1 <code>PaintSkew</code> paint table. Used for skewing or shearing downstream paints by a given center and angle.</p>
2357<h4>fields</h4>
2358<table class="fields">
2359<tr><td class="val" id="paint">paint</td><td class="desc">
2360<p>An <code><a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a></code> object referencing the paint that is to be skewed.</p>
2361</td></tr>
2362<tr><td class="val" id="x_skew_angle">x_skew_angle</td><td class="desc">
2363<p>The skewing angle in x&nbsp;direction in degrees divided by 180.0 (as in the spec) represented as a 16.16 fixed-point value. Multiply by 180.0f to receive degrees.</p>
2364</td></tr>
2365<tr><td class="val" id="y_skew_angle">y_skew_angle</td><td class="desc">
2366<p>The skewing angle in y&nbsp;direction in degrees divided by 180.0 (as in the spec) represented as a 16.16 fixed-point value. Multiply by 180.0f to receive degrees.</p>
2367</td></tr>
2368<tr><td class="val" id="center_x">center_x</td><td class="desc">
2369<p>The x&nbsp;coordinate of the pivot point of the skew in font units represented as a 16.16 fixed-point value.</p>
2370</td></tr>
2371<tr><td class="val" id="center_y">center_y</td><td class="desc">
2372<p>The y&nbsp;coordinate of the pivot point of the skew in font units represented as a 16.16 fixed-point value.</p>
2373</td></tr>
2374</table>
2375
2376<h4>since</h4>
2377
2378<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2379<hr>
2380
2381<h2 id="ft_paintcomposite">FT_PaintComposite<a class="headerlink" href="#ft_paintcomposite" title="Permanent link">&para;</a></h2>
2382<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2383<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_PaintComposite_
2384  {
2385    <a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a>     source_paint;
2386    <a href="ft2-layer_management.html#ft_composite_mode">FT_Composite_Mode</a>  composite_mode;
2387    <a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a>     backdrop_paint;
2388
2389  } <b>FT_PaintComposite</b>;
2390</code></pre></div>
2391
2392<p>A structure representing a &lsquo;COLR'v1 <code>PaintComposite</code> paint table. Used for compositing two paints in a 'COLR&rsquo; v1 directed acycling graph.</p>
2393<h4>fields</h4>
2394<table class="fields">
2395<tr><td class="val" id="source_paint">source_paint</td><td class="desc">
2396<p>An <code><a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a></code> object referencing the source that is to be composited.</p>
2397</td></tr>
2398<tr><td class="val" id="composite_mode">composite_mode</td><td class="desc">
2399<p>An <code><a href="ft2-layer_management.html#ft_composite_mode">FT_Composite_Mode</a></code> enum value determining the composition operation.</p>
2400</td></tr>
2401<tr><td class="val" id="backdrop_paint">backdrop_paint</td><td class="desc">
2402<p>An <code><a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a></code> object referencing the backdrop paint that <code>source_paint</code> is composited onto.</p>
2403</td></tr>
2404</table>
2405
2406<h4>since</h4>
2407
2408<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2409<hr>
2410
2411<h2 id="ft_colr_paint">FT_COLR_Paint<a class="headerlink" href="#ft_colr_paint" title="Permanent link">&para;</a></h2>
2412<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2413<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_COLR_Paint_
2414  {
2415    <a href="ft2-layer_management.html#ft_paintformat">FT_PaintFormat</a> format;
2416
2417    <span class="keyword">union</span>
2418    {
2419      <a href="ft2-layer_management.html#ft_paintcolrlayers">FT_PaintColrLayers</a>      colr_layers;
2420      <a href="ft2-layer_management.html#ft_paintglyph">FT_PaintGlyph</a>           glyph;
2421      <a href="ft2-layer_management.html#ft_paintsolid">FT_PaintSolid</a>           solid;
2422      <a href="ft2-layer_management.html#ft_paintlineargradient">FT_PaintLinearGradient</a>  linear_gradient;
2423      <a href="ft2-layer_management.html#ft_paintradialgradient">FT_PaintRadialGradient</a>  radial_gradient;
2424      <a href="ft2-layer_management.html#ft_paintsweepgradient">FT_PaintSweepGradient</a>   sweep_gradient;
2425      <a href="ft2-layer_management.html#ft_painttransform">FT_PaintTransform</a>       transform;
2426      <a href="ft2-layer_management.html#ft_painttranslate">FT_PaintTranslate</a>       translate;
2427      <a href="ft2-layer_management.html#ft_paintscale">FT_PaintScale</a>           scale;
2428      <a href="ft2-layer_management.html#ft_paintrotate">FT_PaintRotate</a>          rotate;
2429      <a href="ft2-layer_management.html#ft_paintskew">FT_PaintSkew</a>            skew;
2430      <a href="ft2-layer_management.html#ft_paintcomposite">FT_PaintComposite</a>       composite;
2431      <a href="ft2-layer_management.html#ft_paintcolrglyph">FT_PaintColrGlyph</a>       colr_glyph;
2432
2433    } u;
2434
2435  } <b>FT_COLR_Paint</b>;
2436</code></pre></div>
2437
2438<p>A union object representing format and details of a paint table of a &lsquo;COLR&rsquo; v1 font, see &lsquo;<a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a>&rsquo;. Use <code><a href="ft2-layer_management.html#ft_get_paint">FT_Get_Paint</a></code> to retrieve a <code><a href="ft2-layer_management.html#ft_colr_paint">FT_COLR_Paint</a></code> for an <code><a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a></code> object.</p>
2439<h4>fields</h4>
2440<table class="fields">
2441<tr><td class="val" id="format">format</td><td class="desc">
2442<p>The gradient format for this Paint structure.</p>
2443</td></tr>
2444<tr><td class="val" id="u">u</td><td class="desc">
2445<p>Union of all paint table types:</p>
2446<ul>
2447<li><code><a href="ft2-layer_management.html#ft_paintcolrlayers">FT_PaintColrLayers</a></code> <em> <code><a href="ft2-layer_management.html#ft_paintglyph">FT_PaintGlyph</a></code> </em> <code><a href="ft2-layer_management.html#ft_paintsolid">FT_PaintSolid</a></code> <em> <code><a href="ft2-layer_management.html#ft_paintlineargradient">FT_PaintLinearGradient</a></code> </em> <code><a href="ft2-layer_management.html#ft_paintradialgradient">FT_PaintRadialGradient</a></code> <em> <code><a href="ft2-layer_management.html#ft_paintsweepgradient">FT_PaintSweepGradient</a></code> </em> <code><a href="ft2-layer_management.html#ft_painttransform">FT_PaintTransform</a></code> <em> <code><a href="ft2-layer_management.html#ft_painttranslate">FT_PaintTranslate</a></code> </em> <code><a href="ft2-layer_management.html#ft_paintrotate">FT_PaintRotate</a></code> <em> <code><a href="ft2-layer_management.html#ft_paintskew">FT_PaintSkew</a></code> </em> <code><a href="ft2-layer_management.html#ft_paintcomposite">FT_PaintComposite</a></code> * <code><a href="ft2-layer_management.html#ft_paintcolrglyph">FT_PaintColrGlyph</a></code></li>
2448</ul>
2449</td></tr>
2450</table>
2451
2452<h4>since</h4>
2453
2454<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2455<hr>
2456
2457<h2 id="ft_color_root_transform">FT_Color_Root_Transform<a class="headerlink" href="#ft_color_root_transform" title="Permanent link">&para;</a></h2>
2458<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2459<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Color_Root_Transform_
2460  {
2461    <a href="ft2-layer_management.html#ft_color_include_root_transform">FT_COLOR_INCLUDE_ROOT_TRANSFORM</a>,
2462    <a href="ft2-layer_management.html#ft_color_no_root_transform">FT_COLOR_NO_ROOT_TRANSFORM</a>,
2463
2464    FT_COLOR_ROOT_TRANSFORM_MAX
2465
2466  } <b>FT_Color_Root_Transform</b>;
2467</code></pre></div>
2468
2469<p>An enumeration to specify whether <code><a href="ft2-layer_management.html#ft_get_color_glyph_paint">FT_Get_Color_Glyph_Paint</a></code> is to return a root transform to configure the client's graphics context matrix.</p>
2470<h4>values</h4>
2471<table class="fields long">
2472<tr><td class="val" id="ft_color_include_root_transform">FT_COLOR_INCLUDE_ROOT_TRANSFORM</td><td class="desc">
2473<p>Do include the root transform as the initial <code><a href="ft2-layer_management.html#ft_colr_paint">FT_COLR_Paint</a></code> object.</p>
2474</td></tr>
2475<tr><td class="val" id="ft_color_no_root_transform">FT_COLOR_NO_ROOT_TRANSFORM</td><td class="desc">
2476<p>Do not output an initial root transform.</p>
2477</td></tr>
2478</table>
2479
2480<h4>since</h4>
2481
2482<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2483<hr>
2484
2485<h2 id="ft_clipbox">FT_ClipBox<a class="headerlink" href="#ft_clipbox" title="Permanent link">&para;</a></h2>
2486<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2487<div class = "codehilite"><pre><code>  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_ClipBox_
2488  {
2489    <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>  bottom_left;
2490    <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>  top_left;
2491    <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>  top_right;
2492    <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>  bottom_right;
2493
2494  } <b>FT_ClipBox</b>;
2495</code></pre></div>
2496
2497<p>A structure representing a &lsquo;COLR&rsquo; v1 &lsquo;ClipBox&rsquo; table. &lsquo;COLR&rsquo; v1 glyphs may optionally define a clip box for aiding allocation or defining a maximum drawable region. Use <code><a href="ft2-layer_management.html#ft_get_color_glyph_clipbox">FT_Get_Color_Glyph_ClipBox</a></code> to retrieve it.</p>
2498<h4>fields</h4>
2499<table class="fields">
2500<tr><td class="val" id="bottom_left">bottom_left</td><td class="desc">
2501<p>The bottom left corner of the clip box as an <code><a href="ft2-basic_types.html#ft_vector">FT_Vector</a></code> with fixed-point coordinates in 26.6 format.</p>
2502</td></tr>
2503<tr><td class="val" id="top_left">top_left</td><td class="desc">
2504<p>The top left corner of the clip box as an <code><a href="ft2-basic_types.html#ft_vector">FT_Vector</a></code> with fixed-point coordinates in 26.6 format.</p>
2505</td></tr>
2506<tr><td class="val" id="top_right">top_right</td><td class="desc">
2507<p>The top right corner of the clip box as an <code><a href="ft2-basic_types.html#ft_vector">FT_Vector</a></code> with fixed-point coordinates in 26.6 format.</p>
2508</td></tr>
2509<tr><td class="val" id="bottom_right">bottom_right</td><td class="desc">
2510<p>The bottom right corner of the clip box as an <code><a href="ft2-basic_types.html#ft_vector">FT_Vector</a></code> with fixed-point coordinates in 26.6 format.</p>
2511</td></tr>
2512</table>
2513
2514<h4>since</h4>
2515
2516<p>2.12 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2517<hr>
2518
2519<h2 id="ft_get_color_glyph_paint">FT_Get_Color_Glyph_Paint<a class="headerlink" href="#ft_get_color_glyph_paint" title="Permanent link">&para;</a></h2>
2520<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2521<div class = "codehilite"><pre><code>  FT_EXPORT( <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> )
2522  <b>FT_Get_Color_Glyph_Paint</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a>                  face,
2523                            <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>                  base_glyph,
2524                            <a href="ft2-layer_management.html#ft_color_root_transform">FT_Color_Root_Transform</a>  root_transform,
2525                            <a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a>*          paint );
2526</code></pre></div>
2527
2528<p>This is the starting point and interface to color gradient information in a &lsquo;COLR&rsquo; v1 table in OpenType fonts to recursively retrieve the paint tables for the directed acyclic graph of a colored glyph, given a glyph ID.</p>
2529<p><a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a></p>
2530<p>In a &lsquo;COLR&rsquo; v1 font, each color glyph defines a directed acyclic graph of nested paint tables, such as <code>PaintGlyph</code>, <code>PaintSolid</code>, <code>PaintLinearGradient</code>, <code>PaintRadialGradient</code>, and so on. Using this function and specifying a glyph ID, one retrieves the root paint table for this glyph ID.</p>
2531<p>This function allows control whether an initial root transform is returned to configure scaling, transform, and translation correctly on the client's graphics context. The initial root transform is computed and returned according to the values configured for <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> and <code><a href="ft2-base_interface.html#ft_set_transform">FT_Set_Transform</a></code> on the <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> object, see below for details of the <code>root_transform</code> parameter. This has implications for a client &lsquo;COLR&rsquo; v1 implementation: When this function returns an initially computed root transform, at the time of executing the <code><a href="ft2-layer_management.html#ft_paintglyph">FT_PaintGlyph</a></code> operation, the contours should be retrieved using <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code> at unscaled, untransformed size. This is because the root transform applied to the graphics context will take care of correct scaling.</p>
2532<p>Alternatively, to allow hinting of contours, at the time of executing <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code>, the current graphics context transformation matrix can be decomposed into a scaling matrix and a remainder, and <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code> can be used to retrieve the contours at scaled size. Care must then be taken to blit or clip to the graphics context with taking this remainder transformation into account.</p>
2533<h4>input</h4>
2534<table class="fields">
2535<tr><td class="val" id="face">face</td><td class="desc">
2536<p>A handle to the parent face object.</p>
2537</td></tr>
2538<tr><td class="val" id="base_glyph">base_glyph</td><td class="desc">
2539<p>The glyph index for which to retrieve the root paint table.</p>
2540</td></tr>
2541<tr><td class="val" id="root_transform">root_transform</td><td class="desc">
2542<p>Specifies whether an initially computed root is returned by the <code><a href="ft2-layer_management.html#ft_painttransform">FT_PaintTransform</a></code> operation to account for the activated size (see <code><a href="ft2-sizes_management.html#ft_activate_size">FT_Activate_Size</a></code>) and the configured transform and translate (see <code><a href="ft2-base_interface.html#ft_set_transform">FT_Set_Transform</a></code>).</p>
2543<p>This root transform is returned before nodes of the glyph graph of the font are returned. Subsequent <code><a href="ft2-layer_management.html#ft_colr_paint">FT_COLR_Paint</a></code> structures contain unscaled and untransformed values. The inserted root transform enables the client application to apply an initial transform to its graphics context. When executing subsequent FT_COLR_Paint operations, values from <code><a href="ft2-layer_management.html#ft_colr_paint">FT_COLR_Paint</a></code> operations will ultimately be correctly scaled because of the root transform applied to the graphics context. Use <code><a href="ft2-layer_management.html#ft_color_root_transform">FT_COLOR_INCLUDE_ROOT_TRANSFORM</a></code> to include the root transform, use <code><a href="ft2-layer_management.html#ft_color_root_transform">FT_COLOR_NO_ROOT_TRANSFORM</a></code> to not include it. The latter may be useful when traversing the &lsquo;COLR&rsquo; v1 glyph graph and reaching a <code><a href="ft2-layer_management.html#ft_paintcolrglyph">FT_PaintColrGlyph</a></code>. When recursing into <code><a href="ft2-layer_management.html#ft_paintcolrglyph">FT_PaintColrGlyph</a></code> and painting that inline, no additional root transform is needed as it has already been applied to the graphics context at the beginning of drawing this glyph.</p>
2544</td></tr>
2545</table>
2546
2547<h4>output</h4>
2548<table class="fields">
2549<tr><td class="val" id="paint">paint</td><td class="desc">
2550<p>The <code><a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a></code> object that references the actual paint table.</p>
2551<p>The respective actual <code><a href="ft2-layer_management.html#ft_colr_paint">FT_COLR_Paint</a></code> object is retrieved via <code><a href="ft2-layer_management.html#ft_get_paint">FT_Get_Paint</a></code>.</p>
2552</td></tr>
2553</table>
2554
2555<h4>return</h4>
2556
2557<p>Value&nbsp;1 if everything is OK. If no color glyph is found, or the root paint could not be retrieved, value&nbsp;0 gets returned. In case of an error, value&nbsp;0 is returned also.</p>
2558<h4>since</h4>
2559
2560<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2561<hr>
2562
2563<h2 id="ft_get_color_glyph_clipbox">FT_Get_Color_Glyph_ClipBox<a class="headerlink" href="#ft_get_color_glyph_clipbox" title="Permanent link">&para;</a></h2>
2564<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2565<div class = "codehilite"><pre><code>  FT_EXPORT( <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> )
2566  <b>FT_Get_Color_Glyph_ClipBox</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a>      face,
2567                              <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>      base_glyph,
2568                              <a href="ft2-layer_management.html#ft_clipbox">FT_ClipBox</a>*  clip_box );
2569</code></pre></div>
2570
2571<p>Search for a &lsquo;COLR&rsquo; v1 clip box for the specified <code>base_glyph</code> and fill the <code>clip_box</code> parameter with the &lsquo;COLR&rsquo; v1 &lsquo;ClipBox&rsquo; information if one is found.</p>
2572<h4>input</h4>
2573<table class="fields">
2574<tr><td class="val" id="face">face</td><td class="desc">
2575<p>A handle to the parent face object.</p>
2576</td></tr>
2577<tr><td class="val" id="base_glyph">base_glyph</td><td class="desc">
2578<p>The glyph index for which to retrieve the clip box.</p>
2579</td></tr>
2580</table>
2581
2582<h4>output</h4>
2583<table class="fields">
2584<tr><td class="val" id="clip_box">clip_box</td><td class="desc">
2585<p>The clip box for the requested <code>base_glyph</code> if one is found. The clip box is computed taking scale and transformations configured on the <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> into account. <code><a href="ft2-layer_management.html#ft_clipbox">FT_ClipBox</a></code> contains <code><a href="ft2-basic_types.html#ft_vector">FT_Vector</a></code> values in 26.6 format.</p>
2586</td></tr>
2587</table>
2588
2589<h4>return</h4>
2590
2591<p>Value&nbsp;1 if a clip box is found. If no clip box is found or an error occured, value&nbsp;0 is returned.</p>
2592<h4>note</h4>
2593
2594<p>To retrieve the clip box in font units, reset scale to units-per-em and remove transforms configured using <code><a href="ft2-base_interface.html#ft_set_transform">FT_Set_Transform</a></code>.</p>
2595<h4>since</h4>
2596
2597<p>2.12 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2598<hr>
2599
2600<h2 id="ft_get_paint_layers">FT_Get_Paint_Layers<a class="headerlink" href="#ft_get_paint_layers" title="Permanent link">&para;</a></h2>
2601<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2602<div class = "codehilite"><pre><code>  FT_EXPORT( <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> )
2603  <b>FT_Get_Paint_Layers</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a>            face,
2604                       <a href="ft2-layer_management.html#ft_layeriterator">FT_LayerIterator</a>*  iterator,
2605                       <a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a>*    paint );
2606</code></pre></div>
2607
2608<p>Access the layers of a <code>PaintColrLayers</code> table.</p>
2609<p>If the root paint of a color glyph, or a nested paint of a &lsquo;COLR&rsquo; glyph is a <code>PaintColrLayers</code> table, this function retrieves the layers of the <code>PaintColrLayers</code> table.</p>
2610<p>The <code><a href="ft2-layer_management.html#ft_paintcolrlayers">FT_PaintColrLayers</a></code> object contains an <code><a href="ft2-layer_management.html#ft_layeriterator">FT_LayerIterator</a></code>, which is used here to iterate over the layers. Each layer is returned as an <code><a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a></code> object, which then can be used with <code><a href="ft2-layer_management.html#ft_get_paint">FT_Get_Paint</a></code> to retrieve the actual paint object.</p>
2611<h4>input</h4>
2612<table class="fields">
2613<tr><td class="val" id="face">face</td><td class="desc">
2614<p>A handle to the parent face object.</p>
2615</td></tr>
2616</table>
2617
2618<h4>inout</h4>
2619<table class="fields">
2620<tr><td class="val" id="iterator">iterator</td><td class="desc">
2621<p>The <code><a href="ft2-layer_management.html#ft_layeriterator">FT_LayerIterator</a></code> from an <code><a href="ft2-layer_management.html#ft_paintcolrlayers">FT_PaintColrLayers</a></code> object, for which the layers are to be retrieved. The internal state of the iterator is incremented after one call to this function for retrieving one layer.</p>
2622</td></tr>
2623</table>
2624
2625<h4>output</h4>
2626<table class="fields">
2627<tr><td class="val" id="paint">paint</td><td class="desc">
2628<p>The <code><a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a></code> object that references the actual paint table. The respective actual <code><a href="ft2-layer_management.html#ft_colr_paint">FT_COLR_Paint</a></code> object is retrieved via <code><a href="ft2-layer_management.html#ft_get_paint">FT_Get_Paint</a></code>.</p>
2629</td></tr>
2630</table>
2631
2632<h4>return</h4>
2633
2634<p>Value&nbsp;1 if everything is OK. Value&nbsp;0 gets returned when the paint object can not be retrieved or any other error occurs.</p>
2635<h4>since</h4>
2636
2637<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2638<hr>
2639
2640<h2 id="ft_get_colorline_stops">FT_Get_Colorline_Stops<a class="headerlink" href="#ft_get_colorline_stops" title="Permanent link">&para;</a></h2>
2641<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2642<div class = "codehilite"><pre><code>  FT_EXPORT( <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> )
2643  <b>FT_Get_Colorline_Stops</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a>                face,
2644                          <a href="ft2-layer_management.html#ft_colorstop">FT_ColorStop</a>*          color_stop,
2645                          <a href="ft2-layer_management.html#ft_colorstopiterator">FT_ColorStopIterator</a>*  iterator );
2646</code></pre></div>
2647
2648<p>This is an interface to color gradient information in a &lsquo;COLR&rsquo; v1 table in OpenType fonts to iteratively retrieve the gradient and solid fill information for colored glyph layers for a specified glyph ID.</p>
2649<p><a href="https://github.com/googlefonts/colr-gradients-spec">https://github.com/googlefonts/colr-gradients-spec</a></p>
2650<h4>input</h4>
2651<table class="fields">
2652<tr><td class="val" id="face">face</td><td class="desc">
2653<p>A handle to the parent face object.</p>
2654</td></tr>
2655</table>
2656
2657<h4>inout</h4>
2658<table class="fields">
2659<tr><td class="val" id="iterator">iterator</td><td class="desc">
2660<p>The retrieved <code><a href="ft2-layer_management.html#ft_colorstopiterator">FT_ColorStopIterator</a></code>, configured on an <code><a href="ft2-layer_management.html#ft_colorline">FT_ColorLine</a></code>, which in turn got retrieved via paint information in <code><a href="ft2-layer_management.html#ft_paintlineargradient">FT_PaintLinearGradient</a></code> or <code><a href="ft2-layer_management.html#ft_paintradialgradient">FT_PaintRadialGradient</a></code>.</p>
2661</td></tr>
2662</table>
2663
2664<h4>output</h4>
2665<table class="fields">
2666<tr><td class="val" id="color_stop">color_stop</td><td class="desc">
2667<p>Color index and alpha value for the retrieved color stop.</p>
2668</td></tr>
2669</table>
2670
2671<h4>return</h4>
2672
2673<p>Value&nbsp;1 if everything is OK. If there are no more color stops, value&nbsp;0 gets returned. In case of an error, value&nbsp;0 is returned also.</p>
2674<h4>since</h4>
2675
2676<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2677<hr>
2678
2679<h2 id="ft_get_paint">FT_Get_Paint<a class="headerlink" href="#ft_get_paint" title="Permanent link">&para;</a></h2>
2680<p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p>
2681<div class = "codehilite"><pre><code>  FT_EXPORT( <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> )
2682  <b>FT_Get_Paint</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a>         face,
2683                <a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a>  opaque_paint,
2684                <a href="ft2-layer_management.html#ft_colr_paint">FT_COLR_Paint</a>*  paint );
2685</code></pre></div>
2686
2687<p>Access the details of a paint using an <code><a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a></code> opaque paint object, which internally stores the offset to the respective <code>Paint</code> object in the &lsquo;COLR&rsquo; table.</p>
2688<h4>input</h4>
2689<table class="fields">
2690<tr><td class="val" id="face">face</td><td class="desc">
2691<p>A handle to the parent face object.</p>
2692</td></tr>
2693<tr><td class="val" id="opaque_paint">opaque_paint</td><td class="desc">
2694<p>The opaque paint object for which the underlying <code><a href="ft2-layer_management.html#ft_colr_paint">FT_COLR_Paint</a></code> data is to be retrieved.</p>
2695</td></tr>
2696</table>
2697
2698<h4>output</h4>
2699<table class="fields">
2700<tr><td class="val" id="paint">paint</td><td class="desc">
2701<p>The specific <code><a href="ft2-layer_management.html#ft_colr_paint">FT_COLR_Paint</a></code> object containing information coming from one of the font's <code>Paint*</code> tables.</p>
2702</td></tr>
2703</table>
2704
2705<h4>return</h4>
2706
2707<p>Value&nbsp;1 if everything is OK. Value&nbsp;0 if no details can be found for this paint or any other error occured.</p>
2708<h4>since</h4>
2709
2710<p>2.11 &ndash; <strong>currently experimental only!</strong> There might be changes without retaining backward compatibility of both the API and ABI.</p>
2711<hr>
2712
2713
2714
2715
2716
2717
2718
2719            </article>
2720          </div>
2721        </div>
2722
2723      </main>
2724
2725
2726<footer class="md-footer">
2727
2728    <nav class="md-footer__inner md-grid" aria-label="Footer">
2729
2730
2731        <a href="ft2-color_management.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Glyph Color Management" rel="prev">
2732          <div class="md-footer__button md-icon">
2733            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
2734          </div>
2735          <div class="md-footer__title">
2736            <div class="md-ellipsis">
2737              <span class="md-footer__direction">
2738                Previous
2739              </span>
2740              Glyph Color Management
2741            </div>
2742          </div>
2743        </a>
2744
2745
2746
2747        <a href="ft2-glyph_management.html" class="md-footer__link md-footer__link--next" aria-label="Next: Glyph Management" rel="next">
2748          <div class="md-footer__title">
2749            <div class="md-ellipsis">
2750              <span class="md-footer__direction">
2751                Next
2752              </span>
2753              Glyph Management
2754            </div>
2755          </div>
2756          <div class="md-footer__button md-icon">
2757            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
2758          </div>
2759        </a>
2760
2761    </nav>
2762
2763  <div class="md-footer-meta md-typeset">
2764    <div class="md-footer-meta__inner md-grid">
2765      <div class="md-footer-copyright">
2766
2767          <div class="md-footer-copyright__highlight">
2768            Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>.
2769          </div>
2770
2771        Made with
2772        <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
2773          Material for MkDocs
2774        </a>
2775
2776      </div>
2777
2778    </div>
2779  </div>
2780</footer>
2781
2782    </div>
2783    <div class="md-dialog" data-md-component="dialog">
2784      <div class="md-dialog__inner md-typeset"></div>
2785    </div>
2786    <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script>
2787
2788
2789      <script src="assets/javascripts/bundle.82b56eb2.min.js"></script>
2790
2791        <script src="javascripts/extra.js"></script>
2792
2793
2794  </body>
2795</html>