gobject_class->dispose = gtk_snapshot_dispose;
}
-static void
-gtk_snapshot_init (GtkSnapshot *self)
-{
-}
-
static GskRenderNode *
gtk_snapshot_collect_default (GtkSnapshot *snapshot,
GtkSnapshotState *state,
gsk_transform_unref (state->transform);
}
+static void
+gtk_snapshot_init (GtkSnapshot *self)
+{
+ gtk_snapshot_states_init (&self->state_stack);
+ gtk_snapshot_nodes_init (&self->nodes);
+
+ gtk_snapshot_push_state (self,
+ NULL,
+ gtk_snapshot_collect_default,
+ NULL);
+}
+
/**
* gtk_snapshot_new:
*
GtkSnapshot *
gtk_snapshot_new (void)
{
- GtkSnapshot *snapshot;
-
- snapshot = g_object_new (GTK_TYPE_SNAPSHOT, NULL);
-
- gtk_snapshot_states_init (&snapshot->state_stack);
- gtk_snapshot_nodes_init (&snapshot->nodes);
-
- gtk_snapshot_push_state (snapshot,
- NULL,
- gtk_snapshot_collect_default,
- NULL);
-
- return snapshot;
+ return g_object_new (GTK_TYPE_SNAPSHOT, NULL);
}
/**
gtk_snapshot_autopush_transform (snapshot);
state = gtk_snapshot_get_current_state (snapshot);
}
-
+
gsk_transform_to_translate (state->transform, dx, dy);
}
{
GtkSnapshotState *state;
float scale_x, scale_y, dx, dy;
-
+
gtk_snapshot_ensure_affine (snapshot, &scale_x, &scale_y, &dx, &dy);
state = gtk_snapshot_push_state (snapshot,
gsk_rounded_rect_scale_affine (&real_outline, outline, scale_x, scale_y, dx, dy);
node = gsk_border_node_new (&real_outline,
- (float[4]) {
+ (float[4]) {
border_width[0] * scale_y,
border_width[1] * scale_x,
border_width[2] * scale_y,