From: Sergey Bugaev Date: Wed, 23 Aug 2023 15:13:16 +0000 (+0300) Subject: snapshot, gsktransform: Mention that rotation happens around (0, 0) X-Git-Tag: archive/raspbian/4.12.4+ds-3+rpi1^2~21^2~2^2~37 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6171070153eb00709e77a0e07d59b11163343ded;p=gtk4.git snapshot, gsktransform: Mention that rotation happens around (0, 0) ...and not around the center of the render node, as one could expect given that the render node syntax for rotation, transform: rotate(90);, happens to match the CSS syntax for the same thing, and CSS does rotate around the center by default. Signed-off-by: Sergey Bugaev --- diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c index 4f7174d349..ada7164e37 100644 --- a/gsk/gsktransform.c +++ b/gsk/gsktransform.c @@ -857,7 +857,8 @@ normalize_angle (float angle) * @next: (nullable) (transfer full): the next transform * @angle: the rotation angle, in degrees (clockwise) * - * Rotates @next @angle degrees in 2D - or in 3D-speak, around the z axis. + * Rotates @next @angle degrees in 2D - or in 3D-speak, around the Z axis. + * The rotation happens around the origin point of (0, 0). * * Returns: (nullable): The new transform */ diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index d837dc4c26..1e73278201 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -1858,9 +1858,10 @@ gtk_snapshot_translate_3d (GtkSnapshot *snapshot, * @angle: the rotation angle, in degrees (clockwise) * * Rotates @@snapshot's coordinate system by @angle degrees in 2D space - - * or in 3D speak, rotates around the Z axis. + * or in 3D speak, rotates around the Z axis. The rotation happens around + * the origin point of (0, 0) in the @snapshot's current coordinate system. * - * To rotate around other axes, use [method@Gsk.Transform.rotate_3d]. + * To rotate around axes other than the Z axis, use [method@Gsk.Transform.rotate_3d]. */ void gtk_snapshot_rotate (GtkSnapshot *snapshot,