Flood fill & anti aliasing

When doing a flood fill that overlaps another color a different color appears at the edge of the fill. What settings have to be changed to do a  a sharp edge fill with no blending of the colors?

For line draw what is the procedure for turning on and off anti aliasing?

For text what is the procedure for turning on and off anti aliasing?