Parameters of Physics2D.BoxCast are unclear in the documentation

Looking at the documentation for BoxCast, it seems there are multiple ways to interpret the first two parameters origin and size. Notably, we could have

     +------ size.x -------+
[origin] ------------------+  +
     |                     |  |
     |                     |  size.y     (1)
     |                     |  |
     +---------------------+  +

     +------ size.x -------+
     +---------------------+  +
     |                     |  |
     |                     |  size.y     (2)
     |                     |  |
[origin]-------------------+  +

                +- size.x -+
     +---------------------+  +
     |                     |  |size.y
     |       [origin]      |  +          (3)
     |                     |
     +---------------------+

So which one is it? For what it’s worth, having the pivot of a 2D sprite character at its feet (so at the center bottom) seems to not align with the parameters of this function.

EDIT: it turns out this is the correct picture:

     +------- size.x ------+
     +---------------------+  +
     |                     |  |
     |       [origin]      | size.y      (4)
     |                     |  |
     +---------------------+  +

The origin of all shapes is the center point. Just like the BoxCollider2D defines the Box, you have a box of the specified size centered on the Origin.