|
Krita Source Code Documentation
|
Helper class to load CPAL/COLR v0 color layers, functionally based off the sample code in the freetype docs. More...
Public Member Functions | |
| ColorLayersLoader (FT_Face face, FT_UInt baseGlyph) | |
| Construct a ColorLayersLoader object. The first color layer is selected if there are any. | |
| std::tuple< QPainterPath, QBrush, bool > | layer (const CharacterResult &charResult, const FT_Int32 faceLoadFlags, int *x_advance, int *y_advance) |
| Load the current glyph layer. | |
| bool | moveNext () |
| Move to the next glyph layer. | |
| operator bool () const | |
| Check whether there are color layers to be loaded. | |
Private Attributes | |
| FT_UInt | m_baseGlyph |
| FT_Face | m_face |
| bool | m_haveLayers |
| FT_LayerIterator | m_iterator {} |
| FT_UInt | m_layerColorIndex {} |
| FT_UInt | m_layerGlyphIndex {} |
| FT_Color * | m_palette {} |
Helper class to load CPAL/COLR v0 color layers, functionally based off the sample code in the freetype docs.
Definition at line 179 of file KoSvgTextShape_p_glyphs.cpp.
|
inline |
Construct a ColorLayersLoader object. The first color layer is selected if there are any.
| face | |
| baseGlyph |
Definition at line 189 of file KoSvgTextShape_p_glyphs.cpp.
References m_face, m_haveLayers, m_palette, and moveNext().
|
inline |
Load the current glyph layer.
| charResult | |
| faceLoadFlags | |
| x_advance | Pointer to the X advance to be adjusted if needed. |
| y_advance | Pointer to the Y advance to be adjusted if needed. |
Definition at line 218 of file KoSvgTextShape_p_glyphs.cpp.
References convertFromFreeTypeOutline(), emboldenGlyphIfNeeded(), glyphFormatToStr(), m_face, m_layerColorIndex, m_layerGlyphIndex, m_palette, p, and warnFlake.
|
inline |
Move to the next glyph layer.
Definition at line 252 of file KoSvgTextShape_p_glyphs.cpp.
References m_baseGlyph, m_face, m_haveLayers, m_iterator, m_layerColorIndex, and m_layerGlyphIndex.
|
inline |
Check whether there are color layers to be loaded.
Definition at line 203 of file KoSvgTextShape_p_glyphs.cpp.
References m_haveLayers, and m_palette.
|
private |
Definition at line 265 of file KoSvgTextShape_p_glyphs.cpp.
|
private |
Definition at line 264 of file KoSvgTextShape_p_glyphs.cpp.
|
private |
Definition at line 266 of file KoSvgTextShape_p_glyphs.cpp.
|
private |
Definition at line 262 of file KoSvgTextShape_p_glyphs.cpp.
|
private |
Definition at line 261 of file KoSvgTextShape_p_glyphs.cpp.
|
private |
Definition at line 260 of file KoSvgTextShape_p_glyphs.cpp.
|
private |
Definition at line 263 of file KoSvgTextShape_p_glyphs.cpp.