Doflamingo toyed with Law in both of their fights
1st fight: he was focusing on shoving him back using nothing but his swiping attacks--keeping Law on the defensive with his sword. The moment Law tried to counter attack, Doflamingo kicked him in the jaw and shot him down: http://www.***********.net/one-piece/725/5 , http://www.***********.net/one-piece/729/6 , http://www.***********.net/one-piece/729/7 -- he went on to rag doll Law throughout Dressrosa: http://www.***********.net/one-piece/729/16
2nd fight: Doflamingo and Law's fight started out similarly, but with Law more willing to fight back (using verbal attacks in order to mess with Doflamingo's head): http://www.***********.net/one-piece/761/12 , http://www.***********.net/one-piece/768/5 , http://www.***********.net/one-piece/768/7 , http://www.***********.net/one-piece/768/14 ... but Doflamingo still won
You mentioned how Doflamingo couldn't cut Law in half--well, Law being in a defensive position has an advantage given that he is 6'3 vs Doflamingo's 10 ft height and only needs to make small movements in order to deal with Doflamingo's swipes. It also helps that he can swap his body with objects in order to change his position while in his Room. Also, Doflamingo cut Law's arm off instead of simply cutting his head off: http://www.***********.net/one-piece/769/9 . He played with him the entire time.
Doflamingo would not be so easily caught off guard by the six paths of pain since he'd know their numbers (given that the standard fight between cross-verses always have them standing 20+ meters in front of eachother) and if Deva Pain pulls him, we've seen Doflamingo have several ways to escape such a tactic (especially since Kakashi had enough time to resist) via holding himself back with threads, throwing an Overheat directly at Deva Pain, overpowering it (given that Kakashi's body was not ripped apart by the force and his rope was capable of holding out for several seconds)
The 6 paths of pain have such an obvious battle formation where they ALWAYS have the one that can resurrect them standing at the very back. If this is a blind fight, they'd likely attack together via taijutsu and Doflamingo would evade them. They'd immediately go into their battle formation in order to protect the Naraka Path especially since Doflamingo would have likely cut down one of the Pains almost immediately. Doflamingo usually engages with Parasito when against any number of opponents (vs Oars jr, Atomos, and Jozu... the only person during the war that he actually physically engaged was Crocodile since he was quite pissed at him) (unless bloodlusted--then he just swipes at them with his pentachromatic threads). If he is against 6 opponents like the paths of Pain and the Animal or Asura Path attack him, he'd likely hide himself and use Black Knight (if not fight alongside his clone).
Doflamingo would not be caught by surprise if one of the Pains were brought back to life since he managed to recover against people in the MHS speed range fairly quickly (Sanji and 2nd gear Luffy are the best examples, though the latter managed to land a blow with the help of Law). If Doflamingo is proving to be a difficult opponent for the six Pains, then Naraka Path would certainly remain in the back and only provide visual support, which Doflamingo would find out about if the Pains that confront him manage to evade attacks directed to their blind spot while 1 or 2+ Pains are sitting back and observing. Doflamingo would likely surprise them by using "Break White" (http://www.***********.net/one-piece/780/13) on the Naraka Pain, crushing and trapping him in the process. He'd then start taking out the Pains one by one outside of Deva Pain himself.
Let's say that Human Pain managed to touch Doflamingo and start ripping at his soul (the ability is poorly written since he managed to insta kill what's-her-face but Nagato himself had to compete against Naruto, who was offering some resistance... it was also compared to the "chakra tug-of-war" by Kurama (or Bee... i forgot who said it)) -- if Human pain starts to remove Doflamingo's soul, Doflamingo would immediately strike him with "Bullet Thread" to stagger him and send a haki infused kick to his face, either decapitating him or sending him flying for several kilometers.
After either scenario, Deva Pain and Animal Pain would LIKELY be the only ones remaining. Animal Pain would be taken down fairly easily (even if we use the one that fought Jiraiya, who is physically superior to the female one). Deva Pain alone would hardly be able to put up any resistance against Doflamingo without Chibaku tensei given that his Shinra Tensei has a minimum delay of 5 seconds. Doflamingo would find out about this sooner or later and bait Deva Pain into using it via Overheat or a barrage of Bullet Threads before going in and either cut him down or strike him physically while using haki.
"But Deva Pain would retreat and use Chibaku Tensei" would probably be on your mind, but do you honestly think that Deva Pain, who is only Mach 13, can outrun a 637 Mach + death machine? I'll be generous and say that he manages to survive being flung several hundred meters via a kick from Doflamingo, which would leave the physical body moderately crippled. If he used Chibaku Tensai, Doflamingo would likely not even be caught up in it given that he is versatile enough to pull himself from the gravitational pull via "Sky Road". If he did get pulled into it, he'd use his awakening to turn the surrounding material into threads and use it to destroy the rest of the Chibaku Tensei (if he uses "Everwhite, he'd likely turn the entire thing to Threads) and then use "Flap Thread/Everwhite" on Deva Pain, which would finish him off: http://www.***********.net/one-piece/790/7
The fight has already been decided, so cool off.