GraphicsPath.IsRectangle

From Xojo Documentation

Read-Only Property (As Boolean )
BooleanValue = aGraphicsPath.IsRectangle

New in 2019r2

Supported for all project types and targets.

Checks if the path is a rectangle.