Added preliminary support for a panning canvas command.

Found that the iOS/Android export tool do not support at least one command from history file which was my main source to decode the history format. That command is likely to be linked with panning the canvas.
This commit is contained in:
Godzil
2022-11-17 21:04:44 +00:00
parent d56b29162a
commit 4208cb915d
2 changed files with 29 additions and 1 deletions

View File

@@ -97,6 +97,7 @@ class CommandHandler:
b'\xF5': self.replace_color,
b'\xF6': self.erase_pixel,
b'\xF7': self.clear_canvas,
b'\xF8': self.pan_canvas,
#
b'\xFA': self.set_color,
b'\xFB': self.set_canvas_resolution,
@@ -221,6 +222,17 @@ class CommandHandler:
# Always read 3 bytes (2 for stroke, 1 for ?)
return 3
def pan_canvas(self):
self._was_a_stroke = True
self._get_stroke_number()
# This may be panning, not sure.
data = self._file.read(3)
data = struct.unpack("BBB", data)
return 5
def set_color(self):
self._was_a_stroke = False
data = self._file.read(2)