use VIPS_MAX_COORD in a few more places
we had RANGE defined in each file before
This commit is contained in:
parent
c7b1fb28f7
commit
3d961653a9
@ -118,11 +118,6 @@ vips_getpoint_build( VipsObject *object )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* xy range we sanity check on ... just to stop crazy numbers from 1/0 etc.
|
||||
* causing g_assert() failures later.
|
||||
*/
|
||||
#define RANGE (100000000)
|
||||
|
||||
static void
|
||||
vips_getpoint_class_init( VipsGetpointClass *class )
|
||||
{
|
||||
@ -154,14 +149,14 @@ vips_getpoint_class_init( VipsGetpointClass *class )
|
||||
_( "Point to read" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsGetpoint, x ),
|
||||
0, RANGE, 0 );
|
||||
0, VIPS_MAX_COORD, 0 );
|
||||
|
||||
VIPS_ARG_INT( class, "y", 6,
|
||||
_( "y" ),
|
||||
_( "Point to read" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsGetpoint, y ),
|
||||
0, RANGE, 0 );
|
||||
0, VIPS_MAX_COORD, 0 );
|
||||
|
||||
}
|
||||
|
||||
|
@ -181,11 +181,6 @@ vips_measure_build( VipsObject *object )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* xy range we sanity check on ... just to stop crazy numbers from 1/0 etc.
|
||||
* causing g_assert() failures later.
|
||||
*/
|
||||
#define RANGE (100000000)
|
||||
|
||||
static void
|
||||
vips_measure_class_init( VipsMeasureClass *class )
|
||||
{
|
||||
@ -217,42 +212,42 @@ vips_measure_class_init( VipsMeasureClass *class )
|
||||
_( "Number of patches across chart" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsMeasure, h ),
|
||||
1, RANGE, 1 );
|
||||
1, VIPS_MAX_COORD, 1 );
|
||||
|
||||
VIPS_ARG_INT( class, "v", 6,
|
||||
_( "Down" ),
|
||||
_( "Number of patches down chart" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsMeasure, v ),
|
||||
1, RANGE, 1 );
|
||||
1, VIPS_MAX_COORD, 1 );
|
||||
|
||||
VIPS_ARG_INT( class, "left", 10,
|
||||
_( "Left" ),
|
||||
_( "Left edge of extract area" ),
|
||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||
G_STRUCT_OFFSET( VipsMeasure, left ),
|
||||
0, RANGE, 0 );
|
||||
0, VIPS_MAX_COORD, 0 );
|
||||
|
||||
VIPS_ARG_INT( class, "top", 11,
|
||||
_( "Top" ),
|
||||
_( "Top edge of extract area" ),
|
||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||
G_STRUCT_OFFSET( VipsMeasure, top ),
|
||||
0, RANGE, 0 );
|
||||
0, VIPS_MAX_COORD, 0 );
|
||||
|
||||
VIPS_ARG_INT( class, "width", 12,
|
||||
_( "Width" ),
|
||||
_( "Width of extract area" ),
|
||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||
G_STRUCT_OFFSET( VipsMeasure, width ),
|
||||
1, RANGE, 1 );
|
||||
1, VIPS_MAX_COORD, 1 );
|
||||
|
||||
VIPS_ARG_INT( class, "height", 13,
|
||||
_( "Height" ),
|
||||
_( "Height of extract area" ),
|
||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||
G_STRUCT_OFFSET( VipsMeasure, height ),
|
||||
1, RANGE, 1 );
|
||||
1, VIPS_MAX_COORD, 1 );
|
||||
|
||||
}
|
||||
|
||||
|
@ -172,11 +172,6 @@ vips_extract_area_build( VipsObject *object )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* xy range we sanity check on ... just to stop crazy numbers from divide by 0
|
||||
* etc. causing g_assert() failures later.
|
||||
*/
|
||||
#define RANGE (100000000)
|
||||
|
||||
static void
|
||||
vips_extract_area_class_init( VipsExtractAreaClass *class )
|
||||
{
|
||||
@ -206,28 +201,28 @@ vips_extract_area_class_init( VipsExtractAreaClass *class )
|
||||
_( "Left edge of extract area" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsExtractArea, left ),
|
||||
-RANGE, RANGE, 0 );
|
||||
-VIPS_MAX_COORD, VIPS_MAX_COORD, 0 );
|
||||
|
||||
VIPS_ARG_INT( class, "top", 3,
|
||||
_( "Top" ),
|
||||
_( "Top edge of extract area" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsExtractArea, top ),
|
||||
-RANGE, RANGE, 0 );
|
||||
-VIPS_MAX_COORD, VIPS_MAX_COORD, 0 );
|
||||
|
||||
VIPS_ARG_INT( class, "width", 4,
|
||||
_( "Width" ),
|
||||
_( "Width of extract area" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsExtractArea, width ),
|
||||
1, RANGE, 1 );
|
||||
1, VIPS_MAX_COORD, 1 );
|
||||
|
||||
VIPS_ARG_INT( class, "height", 5,
|
||||
_( "Height" ),
|
||||
_( "Height of extract area" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsExtractArea, height ),
|
||||
1, RANGE, 1 );
|
||||
1, VIPS_MAX_COORD, 1 );
|
||||
|
||||
}
|
||||
|
||||
@ -429,14 +424,14 @@ vips_extract_band_class_init( VipsExtractBandClass *class )
|
||||
_( "Band to extract" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsExtractBand, band ),
|
||||
0, RANGE, 0 );
|
||||
0, VIPS_MAX_COORD, 0 );
|
||||
|
||||
VIPS_ARG_INT( class, "n", 4,
|
||||
_( "n" ),
|
||||
_( "Number of bands to extract" ),
|
||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||
G_STRUCT_OFFSET( VipsExtractBand, n ),
|
||||
1, RANGE, 1 );
|
||||
1, VIPS_MAX_COORD, 1 );
|
||||
|
||||
}
|
||||
|
||||
|
@ -487,11 +487,6 @@ vips_insert_build( VipsObject *object )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* xy range we sanity check on ... just to stop crazy numbers from 1/0 etc.
|
||||
* causing g_assert() failures later.
|
||||
*/
|
||||
#define RANGE (100000000)
|
||||
|
||||
static void
|
||||
vips_insert_class_init( VipsInsertClass *class )
|
||||
{
|
||||
@ -530,14 +525,14 @@ vips_insert_class_init( VipsInsertClass *class )
|
||||
_( "Left edge of sub in main" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsInsert, x ),
|
||||
-RANGE, RANGE, 0 );
|
||||
-VIPS_MAX_COORD, VIPS_MAX_COORD, 0 );
|
||||
|
||||
VIPS_ARG_INT( class, "y", 3,
|
||||
_( "Y" ),
|
||||
_( "Top edge of sub in main" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsInsert, y ),
|
||||
-RANGE, RANGE, 0 );
|
||||
-VIPS_MAX_COORD, VIPS_MAX_COORD, 0 );
|
||||
|
||||
VIPS_ARG_BOOL( class, "expand", 4,
|
||||
_( "Expand" ),
|
||||
|
@ -248,11 +248,6 @@ vips_subsample_build( VipsObject *object )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* xy range we sanity check on ... just to stop crazy numbers from divide by 0
|
||||
* etc. causing g_assert() failures later.
|
||||
*/
|
||||
#define RANGE (100000000)
|
||||
|
||||
static void
|
||||
vips_subsample_class_init( VipsSubsampleClass *class )
|
||||
{
|
||||
@ -281,14 +276,14 @@ vips_subsample_class_init( VipsSubsampleClass *class )
|
||||
_( "Horizontal subsample factor" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsSubsample, xfac ),
|
||||
1, RANGE, 1 );
|
||||
1, VIPS_MAX_COORD, 1 );
|
||||
|
||||
VIPS_ARG_INT( class, "yfac", 3,
|
||||
_( "Yfac" ),
|
||||
_( "Vertical subsample factor" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsSubsample, yfac ),
|
||||
1, RANGE, 1 );
|
||||
1, VIPS_MAX_COORD, 1 );
|
||||
|
||||
VIPS_ARG_BOOL( class, "point", 2,
|
||||
_( "Point" ),
|
||||
|
@ -358,11 +358,6 @@ vips_zoom_build( VipsObject *object )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* xy range we sanity check on ... just to stop crazy numbers from divide by 0
|
||||
* etc. causing g_assert() failures later.
|
||||
*/
|
||||
#define RANGE (100000000)
|
||||
|
||||
static void
|
||||
vips_zoom_class_init( VipsZoomClass *class )
|
||||
{
|
||||
@ -390,14 +385,14 @@ vips_zoom_class_init( VipsZoomClass *class )
|
||||
_( "Horizontal zoom factor" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsZoom, xfac ),
|
||||
1, RANGE, 1 );
|
||||
1, VIPS_MAX_COORD, 1 );
|
||||
|
||||
VIPS_ARG_INT( class, "yfac", 3,
|
||||
_( "Yfac" ),
|
||||
_( "Vertical zoom factor" ),
|
||||
VIPS_ARGUMENT_REQUIRED_INPUT,
|
||||
G_STRUCT_OFFSET( VipsZoom, yfac ),
|
||||
1, RANGE, 1 );
|
||||
1, VIPS_MAX_COORD, 1 );
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user