From fa354184abea3f226c1a94d48f11c0e43e86be7c Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 27 Jan 2024 19:11:44 +0100 Subject: [PATCH] add foreground boldness aggressiveness constraint --- src/kds_s2000w_net.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/kds_s2000w_net.c b/src/kds_s2000w_net.c index 7bb2647..2b435c7 100644 --- a/src/kds_s2000w_net.c +++ b/src/kds_s2000w_net.c @@ -282,9 +282,13 @@ const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor( option_descriptors[option].name = "foregroundboldnessaggressiveness"; option_descriptors[option].title = "foregroundboldnessaggressiveness"; option_descriptors[option].desc = "foregroundboldnessaggressiveness"; - option_descriptors[option].cap = SANE_CAP_SOFT_DETECT; - option_descriptors[option].constraint_type = SANE_CONSTRAINT_NONE; - option_descriptors[option].constraint.string_list = NULL; + option_descriptors[option].cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT; + option_descriptors[option].constraint_type = SANE_CONSTRAINT_RANGE; + SANE_Range* constraint_foreground_boldness_aggressiveness = malloc(sizeof(SANE_Range)); + constraint_foreground_boldness_aggressiveness->min = -10; + constraint_foreground_boldness_aggressiveness->max = 10; + constraint_foreground_boldness_aggressiveness->quant = 1; + option_descriptors[option].constraint.range = constraint_foreground_boldness_aggressiveness; break; case 17: option_descriptors[option].name = "backgroundsmoothingmode"; -- 2.39.5