Gimp.vector_3d_to_2d

function vector_3d_to_2d(sx: Number(gint), sy: Number(gint), w: Number(gint), h: Number(gint), vp: Gimp.Vector3, p: Gimp.Vector3): [x: Number(gdouble), y: Number(gdouble)] {
    // Gjs wrapper for gimp_vector_3d_to_2d()
}
  

Convert the given 3D point to 2D (project it onto the viewing plane, (sx, sy, 0) - (sx + w, sy + h, 0). The input is assumed to be in the unit square (0, 0, z) - (1, 1, z). The viewpoint of the observer is passed in vp.

This is basically the opposite of Gimp.vector_2d_to_3d.

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.

vp

position of the observer.

p

the 3D point to project to the plane.

x

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

y

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