Hi,
There is a close relation among Fill Color and HitTest method and SpatialSearch method.
Both HitTest and SpatialSearch method analyze the shape, and decide where is a given point in relation to the shape, inside, outside, or on the boundary, etc.
The base of the decision, I seem, may be the fill color.
Inside of the shape is the filled part of the shape.
If a rectangle is filled with any color of any fill pattern, the filled place is inside.
If you make a complicated shape that partly not filled with color, for example, a shape like a shining star drawn with line tool, there may be at least a place where is not filled with color and it is not inside of the shape there, but outside of the shape.
There are two ways to remove the fill color of a shape.
One of them is to set the cell "FillPatern" to 0 or with menu Format / Fill / No Pattern.
Another way is to set cell "Geometry.NoFill" to TRUE.
The value of the cell "FillPattern" never affects the HitTest method nor SpatialSearch method, but the value TRUE of "Geometry.NoFill" strongly affects them.
Every place in the shape is outside, and every line of the shape is boundary no matter how the shape is complicated.
Attached sample of Visio drawing with VBA macro demonstrates such phenomena.
Right-click on each shape runs HitTest Method, and right-click menus on the page runs SpatialSearch method for the boundary or for contained in (inside).
You need to move the red marker on any place on any shapes, especially on the boundary of the shape or inside of the shape but not filled with color.
You need to remove fill-color with "Geometry.NoFill" set to TRUE in order to get right results when the center of the red maker is on the boundary of a shape. Or you will sometimes get wrong results.
I hope you enjoy much with the example shapes.
