Gimp.vector_2d_to_3d

function vector_2d_to_3d(sx: Number(gint), sy: Number(gint), w: Number(gint), h: Number(gint), x: Number(gint), y: Number(gint), vp: Gimp.Vector3, p: Gimp.Vector3): void {
    // Gjs wrapper for gimp_vector_2d_to_3d()
}
  

\"Compute screen (sx, sy) - (sx + w, sy + h) to 3D unit square mapping. The plane to map to is given in the z field of p. The observer is located at position vp (vp->z != 0.0).\"

In other words, this computes the projection of the point (x, y) to the plane z = p->z (parallel to XY), from the vp point of view through the screen (sx, sy)->(sx + w, sy + h)

sx

the abscissa of the upper-left screen rectangle.

sy

the ordinate of the upper-left screen rectangle.

w

the width of the screen rectangle.

h

the height of the screen rectangle.

x

the abscissa of the point in the screen rectangle to map.

y

the ordinate of the point in the screen rectangle to map.

vp

the position of the observer.

p

the resulting point.