イラストレーター GeometricBoundsでセンター取得

    Public Function GetCenter(ByVal pItem As Illustrator.PathItem)

        Dim CX, CY, Right, Left, Top, Bottom, Width, Height As Single
       
        'GeometricBounds(0) : Left
        'GeometricBounds(1) : Top
        'GeometricBounds(2) : Right
        'GeometricBounds(3) : Bottom
        'なので()

        CX = ((Right - Left) / 2) + Left
        CY = ((Top - Bottom) / 2) + Bottom
        'で良いはず。で、

        With pItem
            CX = ((.GeometricBounds(2) - .GeometricBounds(0)) / 2) + .GeometricBounds(0)
            CY = ((.GeometricBounds(1) - .GeometricBounds(3)) / 2) + .GeometricBounds(3)
        End With

        'ちなみに Width と Height を使用する場合は
        CX = Left + (Width / 2)
        CY = Top - (Height / 2)

        Return (CX And CY)
    End Function