added const refs to setpixel methods