aboutsummaryrefslogtreecommitdiff
path: root/pixman/demos/scale.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-01-28 07:58:44 +0100
committermarha <marha@users.sourceforge.net>2013-01-28 07:58:44 +0100
commit39b49babc915183f4d712053b46f0e010427c191 (patch)
treeb512cf3f17a0defe9e2cd6ababdc9f5337f93d0e /pixman/demos/scale.c
parent3e3af07f7697e9d23dd62fcf8f3a055602ae3341 (diff)
parent69c8cec54b01ed522bf10baf20da70304bac701a (diff)
downloadvcxsrv-39b49babc915183f4d712053b46f0e010427c191.tar.gz
vcxsrv-39b49babc915183f4d712053b46f0e010427c191.tar.bz2
vcxsrv-39b49babc915183f4d712053b46f0e010427c191.zip
Merge remote-tracking branch 'origin/released'
* origin/released: mesa mkfontscale pixman git update 28 jan 2013
Diffstat (limited to 'pixman/demos/scale.c')
-rw-r--r--pixman/demos/scale.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pixman/demos/scale.c b/pixman/demos/scale.c
index 9100ff72a..869ada12b 100644
--- a/pixman/demos/scale.c
+++ b/pixman/demos/scale.c
@@ -39,6 +39,7 @@ typedef struct
GtkAdjustment * scale_x_adjustment;
GtkAdjustment * scale_y_adjustment;
GtkAdjustment * rotate_adjustment;
+ GtkAdjustment * subsample_adjustment;
int scaled_width;
int scaled_height;
} app_t;
@@ -236,7 +237,8 @@ rescale (GtkWidget *may_be_null, app_t *app)
get_value (app, filters, "reconstruct_y_combo_box"),
get_value (app, filters, "sample_x_combo_box"),
get_value (app, filters, "sample_y_combo_box"),
- 4, 4);
+ gtk_adjustment_get_value (app->subsample_adjustment),
+ gtk_adjustment_get_value (app->subsample_adjustment));
pixman_image_set_filter (app->original, PIXMAN_FILTER_SEPARABLE_CONVOLUTION, params, n_params);
@@ -360,10 +362,13 @@ app_new (pixman_image_t *original)
GTK_ADJUSTMENT (gtk_builder_get_object (app->builder, "scale_y_adjustment"));
app->rotate_adjustment =
GTK_ADJUSTMENT (gtk_builder_get_object (app->builder, "rotate_adjustment"));
+ app->subsample_adjustment =
+ GTK_ADJUSTMENT (gtk_builder_get_object (app->builder, "subsample_adjustment"));
g_signal_connect (app->scale_x_adjustment, "value_changed", G_CALLBACK (rescale), app);
g_signal_connect (app->scale_y_adjustment, "value_changed", G_CALLBACK (rescale), app);
g_signal_connect (app->rotate_adjustment, "value_changed", G_CALLBACK (rescale), app);
+ g_signal_connect (app->subsample_adjustment, "value_changed", G_CALLBACK (rescale), app);
widget = get_widget (app, "scale_x_scale");
gtk_scale_add_mark (GTK_SCALE (widget), 0.0, GTK_POS_LEFT, NULL);