summaryrefslogtreecommitdiff
path: root/thirdparty/harfbuzz/src/OT/glyf/coord-setter.hh
blob: df64ed5af7d2e4509ffb69c088820893c2dd98e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef OT_GLYF_COORD_SETTER_HH
#define OT_GLYF_COORD_SETTER_HH


#include "../../hb.hh"


namespace OT {
namespace glyf_impl {


struct coord_setter_t
{
  coord_setter_t (hb_array_t<int> coords) :
    coords (coords) {}

  int& operator [] (unsigned idx)
  {
    if (coords.length < idx + 1)
      coords.resize (idx + 1);
    return coords[idx];
  }

  hb_array_t<int> get_coords ()
  { return coords.as_array (); }

  hb_vector_t<int> coords;
};


} /* namespace glyf_impl */
} /* namespace OT */

#endif /* OT_GLYF_COORD_SETTER_HH */