1/****************************************************************************
2 *
3 * ttcolr.h
4 *
5 * TrueType and OpenType colored glyph layer support (specification).
6 *
7 * Copyright (C) 2018-2023 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
9 *
10 * Originally written by Shao Yu Zhang <shaozhang@fb.com>.
11 *
12 * This file is part of the FreeType project, and may only be used,
13 * modified, and distributed under the terms of the FreeType project
14 * license, LICENSE.TXT. By continuing to use, modify, or distribute
15 * this file you indicate that you have read the license and
16 * understand and accept it fully.
17 *
18 */
19
20
21#ifndef __TTCOLR_H__
22#define __TTCOLR_H__
23
24
25#include "ttload.h"
26
27
28FT_BEGIN_HEADER
29
30
31 FT_LOCAL( FT_Error )
32 tt_face_load_colr( TT_Face face,
33 FT_Stream stream );
34
35 FT_LOCAL( void )
36 tt_face_free_colr( TT_Face face );
37
38 FT_LOCAL( FT_Bool )
39 tt_face_get_colr_layer( TT_Face face,
40 FT_UInt base_glyph,
41 FT_UInt *aglyph_index,
42 FT_UInt *acolor_index,
43 FT_LayerIterator* iterator );
44
45 FT_LOCAL( FT_Bool )
46 tt_face_get_colr_glyph_paint( TT_Face face,
47 FT_UInt base_glyph,
48 FT_Color_Root_Transform root_transform,
49 FT_OpaquePaint* paint );
50
51 FT_LOCAL( FT_Bool )
52 tt_face_get_color_glyph_clipbox( TT_Face face,
53 FT_UInt base_glyph,
54 FT_ClipBox* clip_box );
55
56 FT_LOCAL( FT_Bool )
57 tt_face_get_paint_layers( TT_Face face,
58 FT_LayerIterator* iterator,
59 FT_OpaquePaint* paint );
60
61 FT_LOCAL( FT_Bool )
62 tt_face_get_colorline_stops( TT_Face face,
63 FT_ColorStop* color_stop,
64 FT_ColorStopIterator* iterator );
65
66 FT_LOCAL( FT_Bool )
67 tt_face_get_paint( TT_Face face,
68 FT_OpaquePaint opaque_paint,
69 FT_COLR_Paint* paint );
70
71 FT_LOCAL( FT_Error )
72 tt_face_colr_blend_layer( TT_Face face,
73 FT_UInt color_index,
74 FT_GlyphSlot dstSlot,
75 FT_GlyphSlot srcSlot );
76
77
78FT_END_HEADER
79
80
81#endif /* __TTCOLR_H__ */
82
83/* END */
84