summaryrefslogtreecommitdiff
path: root/demos/scale.c
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <soren.sandmann@gmail.com>2016-09-03 15:09:12 -0400
committerSøren Sandmann Pedersen <soren.sandmann@gmail.com>2016-09-03 15:09:12 -0400
commit85467ec308f8621a5410c007491797b7b1847601 (patch)
tree42c8f6117adeb84a2e8311345485abc56b63364a /demos/scale.c
parent17c4ce2e393af597db3c04295c21afc7ce34aa22 (diff)
downloadpixman-85467ec308f8621a5410c007491797b7b1847601.tar.gz
Revert "demos/scale: Added pulldown to choose PIXMAN_FILTER_* value"
This reverts commit 375f5ec5c5d2a6cc3586f57e36fdf08a3d0ac4e4. This patch was accidentally pushed.
Diffstat (limited to 'demos/scale.c')
-rw-r--r--demos/scale.c41
1 files changed, 11 insertions, 30 deletions
diff --git a/demos/scale.c b/demos/scale.c
index 0c6b533..0995ad0 100644
--- a/demos/scale.c
+++ b/demos/scale.c
@@ -127,13 +127,6 @@ typedef struct
int value;
} named_int_t;
-static const named_int_t filter_types[] =
-{
- { "Separable", PIXMAN_FILTER_SEPARABLE_CONVOLUTION },
- { "Nearest", PIXMAN_FILTER_NEAREST },
- { "Bilinear", PIXMAN_FILTER_BILINEAR },
-};
-
static const named_int_t filters[] =
{
{ "Box", PIXMAN_KERNEL_BOX },
@@ -256,29 +249,18 @@ rescale (GtkWidget *may_be_null, app_t *app)
pixman_transform_from_pixman_f_transform (&transform, &ftransform);
pixman_image_set_transform (app->original, &transform);
- if (get_value (app, filter_types, "filter_combo_box") ==
- PIXMAN_FILTER_SEPARABLE_CONVOLUTION)
- {
- params = pixman_filter_create_separable_convolution (
- &n_params,
- sx * 65536.0 + 0.5,
- sy * 65536.0 + 0.5,
- get_value (app, filters, "reconstruct_x_combo_box"),
- get_value (app, filters, "reconstruct_y_combo_box"),
- get_value (app, filters, "sample_x_combo_box"),
- get_value (app, filters, "sample_y_combo_box"),
- gtk_adjustment_get_value (app->subsample_adjustment),
- gtk_adjustment_get_value (app->subsample_adjustment));
- }
- else
- {
- params = 0;
- n_params = 0;
- }
+ params = pixman_filter_create_separable_convolution (
+ &n_params,
+ sx * 65536.0 + 0.5,
+ sy * 65536.0 + 0.5,
+ get_value (app, filters, "reconstruct_x_combo_box"),
+ get_value (app, filters, "reconstruct_y_combo_box"),
+ get_value (app, filters, "sample_x_combo_box"),
+ get_value (app, filters, "sample_y_combo_box"),
+ gtk_adjustment_get_value (app->subsample_adjustment),
+ gtk_adjustment_get_value (app->subsample_adjustment));
- pixman_image_set_filter (app->original,
- get_value (app, filter_types, "filter_combo_box"),
- params, n_params);
+ pixman_image_set_filter (app->original, PIXMAN_FILTER_SEPARABLE_CONVOLUTION, params, n_params);
pixman_image_set_repeat (
app->original, get_value (app, repeats, "repeat_combo_box"));
@@ -420,7 +402,6 @@ app_new (pixman_image_t *original)
widget = get_widget (app, "drawing_area");
g_signal_connect (widget, "expose_event", G_CALLBACK (on_expose), app);
- set_up_combo_box (app, "filter_combo_box", G_N_ELEMENTS (filter_types), filter_types);
set_up_filter_box (app, "reconstruct_x_combo_box");
set_up_filter_box (app, "reconstruct_y_combo_box");
set_up_filter_box (app, "sample_x_combo_box");