rename _!PIXEL etc. to help bindings

ruby gobject-introspection hates numbers at the start of _ separated
names
This commit is contained in:
John Cupitt 2015-01-07 14:22:13 +00:00
parent 6f101ae86b
commit eda4ed64f1
5 changed files with 19 additions and 17 deletions

View File

@ -6,6 +6,8 @@
- display param default and range in usage
- better docs
- more tests
- renamed VIPS_FOREIGN_DZ_DEPTH_1 as VIPS_FOREIGN_DZ_DEPTH_ONE etc. to help
bindings
24/12/14 started 7.42.1
- add gobject-2.0 to Requires: in vips and vips-cpp .pc files

View File

@ -59,7 +59,7 @@ im_vips2dz( IMAGE *in, const char *filename )
char *suffix = ".jpeg";
int overlap = 0;
int tile_size = 256;
VipsForeignDzDepth depth = VIPS_FOREIGN_DZ_DEPTH_1PIXEL;
VipsForeignDzDepth depth = VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL;
gboolean centre = FALSE;
VipsAngle angle = VIPS_ANGLE_D0;

View File

@ -542,15 +542,15 @@ pyramid_build( VipsForeignSaveDz *dz, Layer *above,
}
switch( dz->depth ) {
case VIPS_FOREIGN_DZ_DEPTH_1PIXEL:
case VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL:
limit = 1;
break;
case VIPS_FOREIGN_DZ_DEPTH_1TILE:
case VIPS_FOREIGN_DZ_DEPTH_ONETILE:
limit = dz->tile_size;
break;
case VIPS_FOREIGN_DZ_DEPTH_1:
case VIPS_FOREIGN_DZ_DEPTH_ONE:
limit = VIPS_MAX( width, height );
break;
@ -1603,11 +1603,11 @@ vips_foreign_save_dz_build( VipsObject *object )
*/
if( dz->layout == VIPS_FOREIGN_DZ_LAYOUT_DZ ) {
if( !vips_object_argument_isset( object, "depth" ) )
dz->depth = VIPS_FOREIGN_DZ_DEPTH_1PIXEL;
dz->depth = VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL;
}
else
if( !vips_object_argument_isset( object, "depth" ) )
dz->depth = VIPS_FOREIGN_DZ_DEPTH_1TILE;
dz->depth = VIPS_FOREIGN_DZ_DEPTH_ONETILE;
if( VIPS_OBJECT_CLASS( vips_foreign_save_dz_parent_class )->
build( object ) )
@ -1949,7 +1949,7 @@ vips_foreign_save_dz_class_init( VipsForeignSaveDzClass *class )
VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET( VipsForeignSaveDz, depth ),
VIPS_TYPE_FOREIGN_DZ_DEPTH,
VIPS_FOREIGN_DZ_DEPTH_1PIXEL );
VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL );
VIPS_ARG_BOOL( class, "centre", 13,
_( "Center" ),
@ -2021,7 +2021,7 @@ vips_foreign_save_dz_init( VipsForeignSaveDz *dz )
dz->overlap = 1;
dz->tile_size = 256;
dz->tile_count = 0;
dz->depth = VIPS_FOREIGN_DZ_DEPTH_1PIXEL;
dz->depth = VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL;
dz->angle = VIPS_ANGLE_D0;
dz->container = VIPS_FOREIGN_DZ_CONTAINER_FS;
}

View File

@ -496,16 +496,16 @@ typedef enum {
/**
* VipsForeignDzDepth:
* @VIPS_FOREIGN_DZ_DEPTH_1PIXEL: create layers down to 1x1 pixel
* @VIPS_FOREIGN_DZ_DEPTH_1TILE: create layers down to 1x1 tile
* @VIPS_FOREIGN_DZ_DEPTH_1: only create a single layer
* @VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL: create layers down to 1x1 pixel
* @VIPS_FOREIGN_DZ_DEPTH_ONETILE: create layers down to 1x1 tile
* @VIPS_FOREIGN_DZ_DEPTH_ONE: only create a single layer
*
* How many pyramid layers to create.
*/
typedef enum {
VIPS_FOREIGN_DZ_DEPTH_1PIXEL,
VIPS_FOREIGN_DZ_DEPTH_1TILE,
VIPS_FOREIGN_DZ_DEPTH_1,
VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL,
VIPS_FOREIGN_DZ_DEPTH_ONETILE,
VIPS_FOREIGN_DZ_DEPTH_ONE,
VIPS_FOREIGN_DZ_DEPTH_LAST
} VipsForeignDzDepth;

View File

@ -152,9 +152,9 @@ vips_foreign_dz_depth_get_type( void )
if( etype == 0 ) {
static const GEnumValue values[] = {
{VIPS_FOREIGN_DZ_DEPTH_1PIXEL, "VIPS_FOREIGN_DZ_DEPTH_1PIXEL", "1pixel"},
{VIPS_FOREIGN_DZ_DEPTH_1TILE, "VIPS_FOREIGN_DZ_DEPTH_1TILE", "1tile"},
{VIPS_FOREIGN_DZ_DEPTH_1, "VIPS_FOREIGN_DZ_DEPTH_1", "1"},
{VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL, "VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL", "onepixel"},
{VIPS_FOREIGN_DZ_DEPTH_ONETILE, "VIPS_FOREIGN_DZ_DEPTH_ONETILE", "onetile"},
{VIPS_FOREIGN_DZ_DEPTH_ONE, "VIPS_FOREIGN_DZ_DEPTH_ONE", "one"},
{VIPS_FOREIGN_DZ_DEPTH_LAST, "VIPS_FOREIGN_DZ_DEPTH_LAST", "last"},
{0, NULL, NULL}
};