app, cursors: add GimpToolTransform3DGrid tool widget

Add a new GimpToolTransform3DGrid tool widget, subclassed from
GimpToolTransformGrid, which can be used to perform 3D
transformations.

The widget can be in one of three modes:

  CAMERA - allows adjusting the primary vanishing point by moving a
  handle.

  MOVE   - allows moving the object through dragging.

  ROTATE - allows rotating the object through dragging.

By default, controlling the transformation through dragging applies
to the X and Y axes.  Holding Shift (or setting the "constrain-
axis" property) restricts the motion to only one of the axes.

For the MOVE and ROTATE mode, holding Ctrl (or setting the "z-axis"
property) allows controlling the Z axis instead.

For the same modes, holding Alt (or setting the "local-frame"
property), applies the adjustments in the object's local frame of
reference, instead of the display's global frame of reference.
This commit is contained in:
Ell
2020-01-06 16:39:56 +02:00
parent d0ccd6ecfb
commit 855eb0a150
13 changed files with 1225 additions and 0 deletions

View File

@ -171,6 +171,18 @@ typedef enum
} GimpRectanglePrecision;
#define GIMP_TYPE_TRANSFORM_3D_MODE (gimp_transform_3d_mode_get_type ())
GType gimp_transform_3d_mode_get_type (void) G_GNUC_CONST;
typedef enum /*< lowercase_name=gimp_transform_3d_mode >*/
{
GIMP_TRANSFORM_3D_MODE_CAMERA,
GIMP_TRANSFORM_3D_MODE_MOVE,
GIMP_TRANSFORM_3D_MODE_ROTATE
} GimpTransform3DMode;
#define GIMP_TYPE_TRANSFORM_FUNCTION (gimp_transform_function_get_type ())
GType gimp_transform_function_get_type (void) G_GNUC_CONST;