[gtk/wip/baedert/radial-gradient: 5/13] snapshot: switch to h/vradius




commit c08df82d547aa930da3dd7ca672e225e4b5884f4
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Sep 12 09:17:02 2020 -0400

    snapshot: switch to h/vradius

 gtk/gtksnapshot.c | 16 ++++++++--------
 gtk/gtksnapshot.h |  8 ++++----
 2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c
index 123bfcd773..3b7c5173a8 100644
--- a/gtk/gtksnapshot.c
+++ b/gtk/gtksnapshot.c
@@ -1971,8 +1971,8 @@ void
 gtk_snapshot_append_radial_gradient (GtkSnapshot            *snapshot,
                                      const graphene_rect_t  *bounds,
                                      const graphene_point_t *center,
-                                     float                   radius,
-                                     float                   scale,
+                                     float                   hradius,
+                                     float                   vradius,
                                      float                   start,
                                      float                   end,
                                      const GskColorStop     *stops,
@@ -1995,8 +1995,8 @@ gtk_snapshot_append_radial_gradient (GtkSnapshot            *snapshot,
 
   node = gsk_radial_gradient_node_new (&real_bounds,
                                        &real_center,
-                                       radius,
-                                       scale,
+                                       hradius * scale_x,
+                                       vradius * scale_y,
                                        start,
                                        end,
                                        stops,
@@ -2009,8 +2009,8 @@ void
 gtk_snapshot_append_repeating_radial_gradient (GtkSnapshot            *snapshot,
                                                const graphene_rect_t  *bounds,
                                                const graphene_point_t *center,
-                                               float                   radius,
-                                               float                   scale,
+                                               float                   hradius,
+                                               float                   vradius,
                                                float                   start,
                                                float                   end,
                                                const GskColorStop     *stops,
@@ -2033,8 +2033,8 @@ gtk_snapshot_append_repeating_radial_gradient (GtkSnapshot            *snapshot,
 
   node = gsk_repeating_radial_gradient_node_new (&real_bounds,
                                                  &real_center,
-                                                 radius,
-                                                 scale,
+                                                 hradius * scale_x,
+                                                 vradius * scale_y,
                                                  start,
                                                  end,
                                                  stops,
diff --git a/gtk/gtksnapshot.h b/gtk/gtksnapshot.h
index 9be3382a52..e3c0e17e65 100644
--- a/gtk/gtksnapshot.h
+++ b/gtk/gtksnapshot.h
@@ -168,8 +168,8 @@ GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_append_radial_gradient     (GtkSnapshot            *snapshot,
                                                          const graphene_rect_t  *bounds,
                                                          const graphene_point_t *center,
-                                                         float                   radius,
-                                                         float                   scale,
+                                                         float                   hradius,
+                                                         float                   vradius,
                                                          float                   start,
                                                          float                   end,
                                                          const GskColorStop     *stops,
@@ -178,8 +178,8 @@ GDK_AVAILABLE_IN_ALL
 void            gtk_snapshot_append_repeating_radial_gradient (GtkSnapshot            *snapshot,
                                                                const graphene_rect_t  *bounds,
                                                                const graphene_point_t *center,
-                                                               float                   radius,
-                                                               float                   scale,
+                                                               float                   hradius,
+                                                               float                   vradius,
                                                                float                   start,
                                                                float                   end,
                                                                const GskColorStop     *stops,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]