Gtk.Widget.compute_transform

### Method

# Gtk Widgetcompute_transform

#### Declaration [src]

    gboolean
    gtk_widget_compute_transform (
      GtkWidget* widget,
      GtkWidget* target,
      graphene_matrix_t* out_transform
    )

#### Description [src]

Computes a matrix suitable to describe a transformation from `widget`‘s coordinate system into `target`‘s coordinate system.

The transform can not be computed in certain cases, for example when `widget` and `target` do not share a common ancestor. In that case `out_transform` gets set to the identity matrix.

#### Parameters

`target`

  Type: `GtkWidget`

  The target widget that the matrix will transform to.

  The data is owned by the caller of the function.

`out_transform`

  Type: `graphene_matrix_t`

  Location to store the final transformation.

  The argument will be set by the function.
  The data is owned by the caller of the function.

#### Return value

Type: `gboolean`

`TRUE` if the transform could be computed, `FALSE` otherwise.