Spade-Editor / Spade

Cross-platform raster graphics editor inspired by Paint.NET
GNU General Public License v3.0
41 stars 10 forks source link

Serializable changes #74

Closed HeroesGrave closed 10 years ago

HeroesGrave commented 10 years ago

The first step towards #49 is to make all changes serializable. By serializable, I do not mean implements Serializable. I mean that the change is stored by parameters, taking up minimum space, while still being reconstructible.

Firstly, we force all changes to have a serializable form.

Secondly, we split the history into two stacks.

Thirdly, we add a history file. (#49)

Summary: Changes are stored in several stages: Recent history <---> Older history <---> File When one stack runs low, it pulls out changes from the previous.

BurntPizza commented 10 years ago

I started on the serializer: https://github.com/BurntPizza/Paint.JAVA/commit/22a0128be49d5c35a7efd3ccde0242dde479a2a0

Currently it's to file, and only PixelChange and KeyFrames right now, but you get the gist.

HeroesGrave commented 10 years ago

Just make sure that we have a Java representation of the serialized changes.

We need to store the serialized changes in RAM history (old history stack) before writing them to a file.

HeroesGrave commented 10 years ago

More or less closed under #76.