Implement hb_color_line_get_extend

This commit is contained in:
Matthias Clasen 2022-12-15 00:05:27 -05:00 committed by Behdad Esfahbod
parent d07fdc69dd
commit a6f813b680
1 changed files with 30 additions and 0 deletions

View File

@ -224,6 +224,11 @@ struct Variable
value.get_color_stop (c); value.get_color_stop (c);
} }
hb_paint_extend_t get_extend () const
{
return value.get_extend ();
}
protected: protected:
T value; T value;
public: public:
@ -268,6 +273,11 @@ struct NoVariable
value.get_color_stop (c); value.get_color_stop (c);
} }
hb_paint_extend_t get_extend () const
{
return value.get_extend ();
}
T value; T value;
public: public:
DEFINE_SIZE_STATIC (T::static_size); DEFINE_SIZE_STATIC (T::static_size);
@ -372,6 +382,11 @@ struct ColorLine
return len; return len;
} }
hb_paint_extend_t get_extend () const
{
return (hb_paint_extend_t) (unsigned int) extend;
}
Extend extend; Extend extend;
Array16Of<Var<ColorStop>> stops; Array16Of<Var<ColorStop>> stops;
public: public:
@ -550,6 +565,11 @@ struct PaintLinearGradient
return (this+colorLine).get_color_stops (start, count, stops); 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) */ HBUINT8 format; /* format = 4(noVar) or 5 (Var) */
Offset24To<ColorLine<Var>> colorLine; /* Offset (from beginning of PaintLinearGradient Offset24To<ColorLine<Var>> colorLine; /* Offset (from beginning of PaintLinearGradient
* table) to ColorLine subtable. */ * table) to ColorLine subtable. */
@ -598,6 +618,11 @@ struct PaintRadialGradient
return (this+colorLine).get_color_stops (start, count, stops); 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) */ HBUINT8 format; /* format = 6(noVar) or 7 (Var) */
Offset24To<ColorLine<Var>> colorLine; /* Offset (from beginning of PaintRadialGradient Offset24To<ColorLine<Var>> colorLine; /* Offset (from beginning of PaintRadialGradient
* table) to ColorLine subtable. */ * table) to ColorLine subtable. */
@ -646,6 +671,11 @@ struct PaintSweepGradient
return (this+colorLine).get_color_stops (start, count, stops); 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) */ HBUINT8 format; /* format = 8(noVar) or 9 (Var) */
Offset24To<ColorLine<Var>> colorLine; /* Offset (from beginning of PaintSweepGradient Offset24To<ColorLine<Var>> colorLine; /* Offset (from beginning of PaintSweepGradient
* table) to ColorLine subtable. */ * table) to ColorLine subtable. */