freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master f87ced9 2/2: ftcolor.h: Redesign API.


From: Werner LEMBERG
Subject: [freetype2] master f87ced9 2/2: ftcolor.h: Redesign API.
Date: Wed, 6 Jun 2018 11:49:49 -0400 (EDT)

branch: master
commit f87ced9dc98c8f9178e2668b998e7a41d11406f8
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    ftcolor.h: Redesign API.
    
    While going to implement it I noticed that I need access to most of
    the `CPAL' elements; I thus plan to add a `cpal' field to
    `TT_FaceRec', which makes most of the previously suggested API
    functions obsolete because the fields will be directly accessable.
---
 ChangeLog                  |  9 +++++++++
 include/freetype/ftcolor.h | 35 ++++++++++++++++++++++++++++++++++-
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 674da28..db224a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2018-06-06  Werner Lemberg  <address@hidden>
+
+       ftcolor.h: Redesign API.
+
+       While going to implement it I noticed that I need access to most of
+       the `CPAL' elements; I thus plan to add a `cpal' field to
+       `TT_FaceRec', which makes most of the previously suggested API
+       functions obsolete because the fields will be directly accessable.
+
 2018-06-06  Parth Wazurkar  <address@hidden>
 
        [bdf, pcf] Remove deprecated FT_FACE_FLAG_FAST_GLYPHS flag.
diff --git a/include/freetype/ftcolor.h b/include/freetype/ftcolor.h
index c119981..3abe402 100644
--- a/include/freetype/ftcolor.h
+++ b/include/freetype/ftcolor.h
@@ -167,7 +167,7 @@ FT_BEGIN_HEADER
    * @since:
    *   2.10
    */
-  typedef FT_Palette_ {
+  typedef struct  FT_Palette_ {
     FT_UShort         num_palettes;
     const FT_UShort*  palette_name_ids;
     const FT_UShort*  palette_types;
@@ -181,6 +181,39 @@ FT_BEGIN_HEADER
   /**************************************************************************
    *
    * @func:
+   *   FT_Palette_Get
+   *
+   * @description:
+   *   Retrieve the face's color palette data.
+   *
+   * @input:
+   *   face ::
+   *     The source face handle.
+   *
+   * @output:
+   *   apalette ::
+   *     A pointer to an @FT_Palette structure.
+   *
+   * @return:
+   *   FreeType error code.  0~means success.
+   *
+   * @note:
+   *   All arrays in the returned @FT_Palette structure are read-only.
+   *
+   *   This function always returns an error if the config macro
+   *   `TT_CONFIG_OPTION_COLOR_LAYERS' is not defined in `ftoption.h'.
+   *
+   * @since:
+   *   2.10
+   */
+  FT_EXPORT( FT_Error )
+  FT_Palette_Get( FT_Face      face,
+                  FT_Palette  *apalette );
+
+
+  /**************************************************************************
+   *
+   * @func:
    *   FT_Palette_Select
    *
    * @description:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]