Here you go, i had this problem too and almost cracked my head over it, the problem is that flood fill can not work with non integer numbers, so add int() to your X and Y values and also using "red" as a color won't work, you need to give the color code or use rgb.
[attachment=0:zey6xtd7][/attachment:zey6xtd7]
Thank you! Now is working. I could never figure it out this solution.