Shows saving and restoring transform and color state. The red square is drawn first with a line width of 2. Then save the state. Then set color to green and line width to 6 and translate to the right. Draw square again. Restore the old state. Draw square again. Attributes should be reverted for the second red square (drawn 30px down)