From a6f813b68009325f9b5cc478ed83b312b06ad996 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 15 Dec 2022 00:05:27 -0500 Subject: [PATCH] Implement hb_color_line_get_extend --- src/hb-ot-color-colr-table.hh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/hb-ot-color-colr-table.hh b/src/hb-ot-color-colr-table.hh index 9b9637ab2..e71158774 100644 --- a/src/hb-ot-color-colr-table.hh +++ b/src/hb-ot-color-colr-table.hh @@ -224,6 +224,11 @@ struct Variable value.get_color_stop (c); } + hb_paint_extend_t get_extend () const + { + return value.get_extend (); + } + protected: T value; public: @@ -268,6 +273,11 @@ struct NoVariable value.get_color_stop (c); } + hb_paint_extend_t get_extend () const + { + return value.get_extend (); + } + T value; public: DEFINE_SIZE_STATIC (T::static_size); @@ -372,6 +382,11 @@ struct ColorLine return len; } + hb_paint_extend_t get_extend () const + { + return (hb_paint_extend_t) (unsigned int) extend; + } + Extend extend; Array16Of> stops; public: @@ -550,6 +565,11 @@ struct PaintLinearGradient return (this+colorLine).get_color_stops (start, count, stops); } + hb_paint_extend_t get_extend () const + { + return (this+colorLine).get_extend (); + } + HBUINT8 format; /* format = 4(noVar) or 5 (Var) */ Offset24To> colorLine; /* Offset (from beginning of PaintLinearGradient * table) to ColorLine subtable. */ @@ -598,6 +618,11 @@ struct PaintRadialGradient return (this+colorLine).get_color_stops (start, count, stops); } + hb_paint_extend_t get_extend () const + { + return (this+colorLine).get_extend (); + } + HBUINT8 format; /* format = 6(noVar) or 7 (Var) */ Offset24To> colorLine; /* Offset (from beginning of PaintRadialGradient * table) to ColorLine subtable. */ @@ -646,6 +671,11 @@ struct PaintSweepGradient return (this+colorLine).get_color_stops (start, count, stops); } + hb_paint_extend_t get_extend () const + { + return (this+colorLine).get_extend (); + } + HBUINT8 format; /* format = 8(noVar) or 9 (Var) */ Offset24To> colorLine; /* Offset (from beginning of PaintSweepGradient * table) to ColorLine subtable. */