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:

  1. save , load disk cause lagging.
  2. 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

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -