# automatically generated by the FlatBuffers compiler, do not modify

# namespace: flatbuffers

import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()

class CanvasPosition(object):
    __slots__ = ['_tab']

    # CanvasPosition
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # CanvasPosition
    def X(self): return self._tab.Get(flatbuffers.number_types.Uint16Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0))
    # CanvasPosition
    def Y(self): return self._tab.Get(flatbuffers.number_types.Uint16Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(2))

def CreateCanvasPosition(builder, x, y):
    builder.Prep(2, 4)
    builder.PrependUint16(y)
    builder.PrependUint16(x)
    return builder.Offset()
