restore - How to design undo function in Core-Graphics Framework? -
many pepole recommended save image i've drawn, , load when need undo in current picture.
but think may not way this:
- save , load disk cause lagging.
- you cant erase after undo, because cant erase image (not fill backgroundcolor).
so, i'm seeking way restore cglayer's or context's data cover current 1 "draw resource", when need undo. i've used nsmutabledata this, doesn't work @ all, because pointer has been saved.
and don't understand how use cgcontextsavestate,cgcontextrestorestate. when save it, have restore before drawrect has been done, can't save , restore when need undo, because context destroyed or reset when drawrect has done, , i've tried, nothing happens.
could me here? thx!
Comments
Post a Comment