Canvas method for line painter