Clipping

clip() indicates that all subsequent drawing is to occur within the clipping region (defined by the current shape).

save() saves the current context, to be restored at a later point of time.

restore() restores the canvas context to the last saved context.