If you check at the code the rectangle bound is 0,0,33,33 and the redline end point is 0,32 and they intersect at 0,32. You need to create the rectangle 1 pixel larger to get the good dimension.
For the zoom representation, finaly a will use the 2D array of color control to get a zoom view of my icon.
Thanks
Dany