transform: Improve docs
authorMatthias Clasen <mclasen@redhat.com>
Fri, 17 Sep 2021 13:57:07 +0000 (09:57 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 17 Sep 2021 14:28:49 +0000 (10:28 -0400)
Add an example for reconstructing transforms.

gsk/gsktransform.c

index b58eb55aadb0538785ea4fe8eafb0d38c50eae58..439d9340fcc6f690da9503b14c18bd8ea2cfd00b 100644 (file)
@@ -1530,6 +1530,13 @@ gsk_transform_to_2d (GskTransform *self,
  *
  * Converts a `GskTransform` to 2D affine transformation factors.
  *
+ * To recreate an equivalent transform from the factors returned
+ * by this function, use
+ *
+ *     gsk_transform_scale (gsk_transform_translate (NULL,
+ *                                                   &GRAPHENE_POINT_T (dx, dy)),
+ *                          sx, sy)
+ *
  * @self must be a 2D transformation. If you are not
  * sure, use
  *