c# - how can I save a content of a canvas drawn by a user? -
i'm having following problem:
i'm trying save content of application. content drawn on canvas via users. example:
a user might click on button draw ellipse, etc.
after clicking button, drawing displayed on canvas.
i want save content drawn user on canvas. give me hint. if use serialization , deserialization?
the code written in c# using visual studio 2012, windows 8 app
there several ways of solving this:
save each action of user - undo/redo stack. flexible files can big. in case you'd serialize stack of commands. load command have replayed.
save logical construction of drawing - html or svg. no undo/redo support smaller files. in case you'd serialize document model.
save each resulting bitmap after action - easier implement 1. , 2. harder support editing of elements. no serialization of .net objects lot of bitmaps.
each approach has advantages , disadvantages.
Comments
Post a Comment