Thanks Jeff,

not sure if i understand it correctly. I come from an AS3 background and 
   tf matrixes i understand.
So if i would scale the canvas via a matrix and then draw stuff on it, 
this stuff is then scaled when drawn.
if i then after the scaling do a restore() all is 100% scaled again?

Or is that the matrix is resetted but the drawn stuff remains how it was 
before calling the restore()?

jiri

Jeff Sharkey wrote:
> Think of it as checkpointing the transformation matrix and clip
> rectangle of your Canvas at a known place in time.  This is useful
> when rendering children views that may leave them in an unknown state.
>  (You can restore back to the checkpointed state when children are
> done drawing.)  Here's an example from ViewGroup:
> 
> final int restoreTo = canvas.save();
> 
> [perform some drawing that might change the transformation matrix or
> clip rectangle]
> 
> canvas.restoreToCount(restoreTo);
> 
> j
> 
> On Thu, Aug 13, 2009 at 3:04 AM, Jiri<jiriheitla...@googlemail.com> wrote:
>> Could someone explain to me the canvas.save() and restore(). I come from
>> a flash background, and this is a new concept for me. Reading the
>> documentation is not helpfull.
>>
>> Jiri
>>
> 
> 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to