This commit is contained in:
John Cupitt 2009-01-12 22:47:10 +00:00
parent 652ccf7719
commit 66c81c36bf

View File

@ -128,6 +128,14 @@
*/
#define SMOOTH_SHARPENING_SCALE (0.453125f)
/* Properties.
*/
enum {
PROP_SHARPENING = 1,
PROP_LAST
};
#define VIPS_TYPE_INTERPOLATE_YAFRSMOOTH \
(vips_interpolate_yafrsmooth_get_type())
#define VIPS_INTERPOLATE_YAFRSMOOTH( obj ) \
@ -745,6 +753,8 @@ vips_interpolate_yafrsmooth_class_init( VipsInterpolateYafrsmoothClass *iclass )
VipsInterpolateClass *interpolate_class =
VIPS_INTERPOLATE_CLASS( iclass );
GParamSpec *pspec;
gobject_class->set_property = vips_object_set_property;
gobject_class->get_property = vips_object_get_property;
@ -766,6 +776,19 @@ vips_interpolate_yafrsmooth_class_init( VipsInterpolateYafrsmoothClass *iclass )
iclass->matrixi[x][i] =
iclass->matrixf[x][i] * VIPS_INTERPOLATE_SCALE;
}
/* Create properties.
*/
pspec = g_param_spec_double( "sharpening",
_( "Sharpening" ),
_( "Degree of extra edge enhancement" ),
0, 4, 1,
(GParamFlags) G_PARAM_READWRITE );
g_object_class_install_property( gobject_class,
PROP_SHARPENING, pspec );
vips_object_class_install_argument( object_class, pspec,
VIPS_ARGUMENT_SET_ONCE,
G_STRUCT_OFFSET( VipsInterpolateYafrsmooth, sharpening ) );
}
static void