This example draws a square that is moved from its default position by the translate() method. An unmoved square of the same size is then drawn for comparison. This example draws a square that is moved from its default position by the translate() method. An unmoved square of the same size is then drawn for comparison.