eyedropper beginnings - taken from magnifier code