Ejemplo n.º 1
0
    def read(self, stream: Stream, version):
        self.color = stream.read_object('color')

        self.unicode = stream.read_int('unicode')
        self.angle = stream.read_double('angle')
        self.size = stream.read_double('size')
        self.x_offset = stream.read_double('x offset')
        self.y_offset = stream.read_double('y offset')

        stream.read_double('unknown 1')
        stream.read_double('unknown 2')

        self.read_0d_terminator(stream)
        if binascii.hexlify(stream.read(2)) != b'ffff':
            raise UnreadableSymbolException('Expected ffff')

        self.font = stream.read_string('font name')

        # lot of unknown stuff
        stream.read_double('unknown 3')  # or object?
        stream.read_double('unknown 4')  # or object?
        if binascii.hexlify(stream.read(2)) != b'9001':
            raise UnreadableSymbolException('Expected 9001')

        stream.read(4)
        stream.read(6)

        # std OLE font .. maybe contains useful stuff like bold/etc, but these aren't exposed in ArcGIS anyway..
        self.std_font = stream.read_object('font')
Ejemplo n.º 2
0
    def read_tags(self, stream: Stream):
        """
        Reads the layer tags

        """
        self.tags = stream.read_string('layer tags')