Merge branch 'add-doxygen'
This commit is contained in:
commit
1864729771
@ -1,5 +1,8 @@
|
|||||||
14/8/20 started 8.11
|
14/8/20 started 8.11
|
||||||
- add vips_jpegload_source() and vips_svgload_source() to public C API
|
- add vips_jpegload_source() and vips_svgload_source() to public C API
|
||||||
|
- integrate doxygen in build system to generate C++ API docs
|
||||||
|
- improve C++ API doc comments
|
||||||
|
- add VipsInterpolate and guint64 support to C++ API
|
||||||
|
|
||||||
6/9/20 started 8.10.2
|
6/9/20 started 8.10.2
|
||||||
- update magicksave/load profile handling [kelilevi]
|
- update magicksave/load profile handling [kelilevi]
|
||||||
|
16
configure.ac
16
configure.ac
@ -239,6 +239,12 @@ AC_PROG_INSTALL
|
|||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
AM_WITH_DMALLOC
|
AM_WITH_DMALLOC
|
||||||
|
|
||||||
|
AC_CHECK_PROGS([DOXYGEN], [doxygen])
|
||||||
|
if test -z "$DOXYGEN"; then
|
||||||
|
AC_MSG_WARN([doxygen not found; C++ docs will not be generated])
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
|
||||||
|
|
||||||
# we need a fully expanded version of $libdir
|
# we need a fully expanded version of $libdir
|
||||||
# without this we get something like
|
# without this we get something like
|
||||||
# define VIPS_LIBDIR ${exec_prefix}/lib
|
# define VIPS_LIBDIR ${exec_prefix}/lib
|
||||||
@ -248,11 +254,11 @@ test x"$exec_prefix" = x"NONE" && exec_prefix='${prefix}'
|
|||||||
|
|
||||||
# set $expanded_value to the fully-expanded value of the argument
|
# set $expanded_value to the fully-expanded value of the argument
|
||||||
expand () {
|
expand () {
|
||||||
eval expanded_value=$1
|
eval expanded_value=$1
|
||||||
|
|
||||||
if test x"$expanded_value" != x"$1"; then
|
if test x"$expanded_value" != x"$1"; then
|
||||||
expand "$expanded_value"
|
expand "$expanded_value"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
expand $libdir
|
expand $libdir
|
||||||
@ -1345,6 +1351,7 @@ AC_CONFIG_FILES([
|
|||||||
libvips/mosaicing/Makefile
|
libvips/mosaicing/Makefile
|
||||||
libvips/create/Makefile
|
libvips/create/Makefile
|
||||||
libvips/resample/Makefile
|
libvips/resample/Makefile
|
||||||
|
cplusplus/Doxyfile
|
||||||
cplusplus/include/Makefile
|
cplusplus/include/Makefile
|
||||||
cplusplus/include/vips/Makefile
|
cplusplus/include/vips/Makefile
|
||||||
cplusplus/Makefile
|
cplusplus/Makefile
|
||||||
@ -1379,6 +1386,7 @@ gobject introspection: $found_introspection
|
|||||||
enable radiance support: $with_radiance
|
enable radiance support: $with_radiance
|
||||||
enable analyze support: $with_analyze
|
enable analyze support: $with_analyze
|
||||||
enable PPM support: $with_ppm
|
enable PPM support: $with_ppm
|
||||||
|
generate C++ docs: $DOXYGEN
|
||||||
|
|
||||||
* optional dependencies
|
* optional dependencies
|
||||||
use fftw3 for FFT: $with_fftw
|
use fftw3 for FFT: $with_fftw
|
||||||
|
3
cplusplus/.gitignore
vendored
Normal file
3
cplusplus/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
html
|
||||||
|
Doxyfile
|
||||||
|
doxygen.stamp
|
2589
cplusplus/Doxyfile.in
Normal file
2589
cplusplus/Doxyfile.in
Normal file
File diff suppressed because it is too large
Load Diff
@ -28,7 +28,24 @@ vips-operators.cpp:
|
|||||||
echo "// this file is generated automatically, do not edit!" >> vips-operators.cpp; \
|
echo "// this file is generated automatically, do not edit!" >> vips-operators.cpp; \
|
||||||
./gen-operators.py -g cpp >> vips-operators.cpp
|
./gen-operators.py -g cpp >> vips-operators.cpp
|
||||||
|
|
||||||
|
if HAVE_DOXYGEN
|
||||||
|
|
||||||
|
html_DATA = html
|
||||||
|
|
||||||
|
html: doxygen.stamp
|
||||||
|
|
||||||
|
doxygen.stamp: Doxyfile
|
||||||
|
$(DOXYGEN) $^
|
||||||
|
touch doxygen.stamp
|
||||||
|
|
||||||
|
install-htmlDATA:
|
||||||
|
-mkdir -p $(DESTDIR)$(htmldir)
|
||||||
|
-cp -r html $(DESTDIR)$(htmldir)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
README \
|
README \
|
||||||
vips-operators.cpp \
|
vips-operators.cpp \
|
||||||
|
Doxyfile.in \
|
||||||
gen-operators.py
|
gen-operators.py
|
||||||
|
@ -110,19 +110,6 @@ VSource::new_from_options( const char *options )
|
|||||||
return( out );
|
return( out );
|
||||||
}
|
}
|
||||||
|
|
||||||
VOption *
|
|
||||||
VOption::set( const char *name, const VSource value )
|
|
||||||
{
|
|
||||||
Pair *pair = new Pair( name );
|
|
||||||
|
|
||||||
pair->input = true;
|
|
||||||
g_value_init( &pair->value, VIPS_TYPE_SOURCE );
|
|
||||||
g_value_set_object( &pair->value, value.get_source() );
|
|
||||||
options.push_back( pair );
|
|
||||||
|
|
||||||
return( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
VTarget
|
VTarget
|
||||||
VTarget::new_to_descriptor( int descriptor )
|
VTarget::new_to_descriptor( int descriptor )
|
||||||
{
|
{
|
||||||
@ -162,17 +149,4 @@ VTarget::new_to_memory()
|
|||||||
return( out );
|
return( out );
|
||||||
}
|
}
|
||||||
|
|
||||||
VOption *
|
|
||||||
VOption::set( const char *name, const VTarget value )
|
|
||||||
{
|
|
||||||
Pair *pair = new Pair( name );
|
|
||||||
|
|
||||||
pair->input = true;
|
|
||||||
g_value_init( &pair->value, VIPS_TYPE_TARGET );
|
|
||||||
g_value_set_object( &pair->value, value.get_target() );
|
|
||||||
options.push_back( pair );
|
|
||||||
|
|
||||||
return( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
VIPS_NAMESPACE_END
|
VIPS_NAMESPACE_END
|
||||||
|
@ -140,6 +140,20 @@ VOption::set( const char *name, int value )
|
|||||||
return( this );
|
return( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// input guint64
|
||||||
|
VOption *
|
||||||
|
VOption::set( const char *name, guint64 value )
|
||||||
|
{
|
||||||
|
Pair *pair = new Pair( name );
|
||||||
|
|
||||||
|
pair->input = true;
|
||||||
|
g_value_init( &pair->value, G_TYPE_UINT64 );
|
||||||
|
g_value_set_uint64( &pair->value, value );
|
||||||
|
options.push_back( pair );
|
||||||
|
|
||||||
|
return( this );
|
||||||
|
}
|
||||||
|
|
||||||
// input double
|
// input double
|
||||||
VOption *
|
VOption *
|
||||||
VOption::set( const char *name, double value )
|
VOption::set( const char *name, double value )
|
||||||
@ -167,39 +181,17 @@ VOption::set( const char *name, const char *value )
|
|||||||
return( this );
|
return( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
// input image
|
// input vips object (image, source, target, etc. etc.)
|
||||||
VOption *
|
VOption *
|
||||||
VOption::set( const char *name, const VImage value )
|
VOption::set( const char *name, const VObject value )
|
||||||
{
|
{
|
||||||
Pair *pair = new Pair( name );
|
Pair *pair = new Pair( name );
|
||||||
|
VipsObject *object = value.get_object();
|
||||||
|
GType type = G_VALUE_TYPE( object );
|
||||||
|
|
||||||
pair->input = true;
|
pair->input = true;
|
||||||
g_value_init( &pair->value, VIPS_TYPE_IMAGE );
|
g_value_init( &pair->value, type );
|
||||||
g_value_set_object( &pair->value, value.get_image() );
|
g_value_set_object( &pair->value, object );
|
||||||
options.push_back( pair );
|
|
||||||
|
|
||||||
return( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
// input double array
|
|
||||||
VOption *
|
|
||||||
VOption::set( const char *name, std::vector<double> value )
|
|
||||||
{
|
|
||||||
Pair *pair = new Pair( name );
|
|
||||||
|
|
||||||
double *array;
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
pair->input = true;
|
|
||||||
|
|
||||||
g_value_init( &pair->value, VIPS_TYPE_ARRAY_DOUBLE );
|
|
||||||
vips_value_set_array_double( &pair->value, NULL,
|
|
||||||
static_cast< int >( value.size() ) );
|
|
||||||
array = vips_value_get_array_double( &pair->value, NULL );
|
|
||||||
|
|
||||||
for( i = 0; i < value.size(); i++ )
|
|
||||||
array[i] = value[i];
|
|
||||||
|
|
||||||
options.push_back( pair );
|
options.push_back( pair );
|
||||||
|
|
||||||
return( this );
|
return( this );
|
||||||
@ -229,6 +221,30 @@ VOption::set( const char *name, std::vector<int> value )
|
|||||||
return( this );
|
return( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// input double array
|
||||||
|
VOption *
|
||||||
|
VOption::set( const char *name, std::vector<double> value )
|
||||||
|
{
|
||||||
|
Pair *pair = new Pair( name );
|
||||||
|
|
||||||
|
double *array;
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
|
pair->input = true;
|
||||||
|
|
||||||
|
g_value_init( &pair->value, VIPS_TYPE_ARRAY_DOUBLE );
|
||||||
|
vips_value_set_array_double( &pair->value, NULL,
|
||||||
|
static_cast< int >( value.size() ) );
|
||||||
|
array = vips_value_get_array_double( &pair->value, NULL );
|
||||||
|
|
||||||
|
for( i = 0; i < value.size(); i++ )
|
||||||
|
array[i] = value[i];
|
||||||
|
|
||||||
|
options.push_back( pair );
|
||||||
|
|
||||||
|
return( this );
|
||||||
|
}
|
||||||
|
|
||||||
// input image array
|
// input image array
|
||||||
VOption *
|
VOption *
|
||||||
VOption::set( const char *name, std::vector<VImage> value )
|
VOption::set( const char *name, std::vector<VImage> value )
|
||||||
|
@ -60,17 +60,4 @@ VInterpolate::new_from_name( const char *name, VOption *options )
|
|||||||
return( out );
|
return( out );
|
||||||
}
|
}
|
||||||
|
|
||||||
VOption *
|
|
||||||
VOption::set( const char *name, const VInterpolate value )
|
|
||||||
{
|
|
||||||
Pair *pair = new Pair( name );
|
|
||||||
|
|
||||||
pair->input = true;
|
|
||||||
g_value_init( &pair->value, VIPS_TYPE_INTERPOLATE );
|
|
||||||
g_value_set_object( &pair->value, value.get_interpolate() );
|
|
||||||
options.push_back( pair );
|
|
||||||
|
|
||||||
return( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
VIPS_NAMESPACE_END
|
VIPS_NAMESPACE_END
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/python3
|
||||||
|
|
||||||
# This file generates the member definitions and declarations for all vips
|
# This file generates the member definitions and declarations for all vips
|
||||||
# operators.
|
# operators.
|
||||||
@ -39,6 +39,8 @@ gtype_to_cpp = {
|
|||||||
GValue.image_type: 'VImage',
|
GValue.image_type: 'VImage',
|
||||||
GValue.source_type: 'VSource',
|
GValue.source_type: 'VSource',
|
||||||
GValue.target_type: 'VTarget',
|
GValue.target_type: 'VTarget',
|
||||||
|
GValue.guint64_type: 'guint64',
|
||||||
|
type_from_name('VipsInterpolate'): 'VInterpolate',
|
||||||
GValue.array_int_type: 'std::vector<int>',
|
GValue.array_int_type: 'std::vector<int>',
|
||||||
GValue.array_double_type: 'std::vector<double>',
|
GValue.array_double_type: 'std::vector<double>',
|
||||||
GValue.array_image_type: 'std::vector<VImage>',
|
GValue.array_image_type: 'std::vector<VImage>',
|
||||||
@ -60,7 +62,7 @@ _OPERATION_DEPRECATED = 8
|
|||||||
|
|
||||||
|
|
||||||
def get_cpp_type(gtype):
|
def get_cpp_type(gtype):
|
||||||
"""Map a gtype to C++ type name we use to represent it.
|
"""Map a gtype to the C++ type name we use to represent it.
|
||||||
"""
|
"""
|
||||||
if gtype in gtype_to_cpp:
|
if gtype in gtype_to_cpp:
|
||||||
return gtype_to_cpp[gtype]
|
return gtype_to_cpp[gtype]
|
||||||
@ -85,30 +87,40 @@ def cppize(name):
|
|||||||
def generate_operation(operation_name, declaration_only=False):
|
def generate_operation(operation_name, declaration_only=False):
|
||||||
intro = Introspect.get(operation_name)
|
intro = Introspect.get(operation_name)
|
||||||
|
|
||||||
required_output = [name for name in intro.required_output if name != intro.member_x]
|
required_output = [name
|
||||||
|
for name in intro.required_output if name != intro.member_x]
|
||||||
|
|
||||||
has_output = len(required_output) >= 1
|
has_output = len(required_output) >= 1
|
||||||
|
|
||||||
# Add a C++ style comment block with some additional markings (@param,
|
# Add a C++ style comment block with some additional markings (@param,
|
||||||
# @return)
|
# @return)
|
||||||
if declaration_only:
|
if declaration_only:
|
||||||
result = '\n/**\n * {}.'.format(intro.description.capitalize())
|
result = f'\n/**\n * {intro.description.capitalize()}.'
|
||||||
|
|
||||||
|
if len(intro.optional_input) > 0:
|
||||||
|
result += '\n *\n * **Optional parameters**'
|
||||||
|
for name in intro.optional_input:
|
||||||
|
details = intro.details[name]
|
||||||
|
result += f'\n * - **{cppize(name)}** -- '
|
||||||
|
result += f'{details["blurb"]}, '
|
||||||
|
result += f'{get_cpp_type(details["type"])}.'
|
||||||
|
result += '\n *'
|
||||||
|
|
||||||
for name in intro.method_args:
|
for name in intro.method_args:
|
||||||
result += '\n * @param {} {}.' \
|
details = intro.details[name]
|
||||||
.format(cppize(name), intro.details[name]['blurb'])
|
result += f'\n * @param {cppize(name)} {details["blurb"]}.'
|
||||||
|
|
||||||
if has_output:
|
if has_output:
|
||||||
# skip the first element
|
# skip the first element
|
||||||
for name in required_output[1:]:
|
for name in required_output[1:]:
|
||||||
result += '\n * @param {} {}.' \
|
details = intro.details[name]
|
||||||
.format(cppize(name), intro.details[name]['blurb'])
|
result += f'\n * @param {cppize(name)} {details["blurb"]}.'
|
||||||
|
|
||||||
result += '\n * @param options Optional options.'
|
result += '\n * @param options Set of options.'
|
||||||
|
|
||||||
if has_output:
|
if has_output:
|
||||||
result += '\n * @return {}.' \
|
details = intro.details[required_output[0]]
|
||||||
.format(intro.details[required_output[0]]['blurb'])
|
result += f'\n * @return {details["blurb"]}.'
|
||||||
|
|
||||||
result += '\n */\n'
|
result += '\n */\n'
|
||||||
else:
|
else:
|
||||||
@ -120,7 +132,7 @@ def generate_operation(operation_name, declaration_only=False):
|
|||||||
# the first output arg will be used as the result
|
# the first output arg will be used as the result
|
||||||
cpp_type = get_cpp_type(intro.details[required_output[0]]['type'])
|
cpp_type = get_cpp_type(intro.details[required_output[0]]['type'])
|
||||||
spacing = '' if cpp_type.endswith(cplusplus_suffixes) else ' '
|
spacing = '' if cpp_type.endswith(cplusplus_suffixes) else ' '
|
||||||
result += '{0}{1}'.format(cpp_type, spacing)
|
result += f'{cpp_type}{spacing}'
|
||||||
else:
|
else:
|
||||||
result += 'void '
|
result += 'void '
|
||||||
|
|
||||||
@ -131,13 +143,13 @@ def generate_operation(operation_name, declaration_only=False):
|
|||||||
if operation_name in cplusplus_keywords:
|
if operation_name in cplusplus_keywords:
|
||||||
cplusplus_operation += '_image'
|
cplusplus_operation += '_image'
|
||||||
|
|
||||||
result += '{0}( '.format(cplusplus_operation)
|
result += f'{cplusplus_operation}( '
|
||||||
for name in intro.method_args:
|
for name in intro.method_args:
|
||||||
details = intro.details[name]
|
details = intro.details[name]
|
||||||
gtype = details['type']
|
gtype = details['type']
|
||||||
cpp_type = get_cpp_type(gtype)
|
cpp_type = get_cpp_type(gtype)
|
||||||
spacing = '' if cpp_type.endswith(cplusplus_suffixes) else ' '
|
spacing = '' if cpp_type.endswith(cplusplus_suffixes) else ' '
|
||||||
result += '{0}{1}{2}, '.format(cpp_type, spacing, cppize(name))
|
result += f'{cpp_type}{spacing}{cppize(name)}, '
|
||||||
|
|
||||||
# output params are passed by reference
|
# output params are passed by reference
|
||||||
if has_output:
|
if has_output:
|
||||||
@ -147,9 +159,9 @@ def generate_operation(operation_name, declaration_only=False):
|
|||||||
gtype = details['type']
|
gtype = details['type']
|
||||||
cpp_type = get_cpp_type(gtype)
|
cpp_type = get_cpp_type(gtype)
|
||||||
spacing = '' if cpp_type.endswith(cplusplus_suffixes) else ' '
|
spacing = '' if cpp_type.endswith(cplusplus_suffixes) else ' '
|
||||||
result += '{0}{1}*{2}, '.format(cpp_type, spacing, cppize(name))
|
result += f'{cpp_type}{spacing}*{cppize(name)}, '
|
||||||
|
|
||||||
result += 'VOption *options {0})'.format('= 0 ' if declaration_only else '')
|
result += f'VOption *options {"= 0 " if declaration_only else ""})'
|
||||||
|
|
||||||
# if no 'this' available, it's a class method and they are all const
|
# if no 'this' available, it's a class method and they are all const
|
||||||
if intro.member_x is not None:
|
if intro.member_x is not None:
|
||||||
@ -167,36 +179,35 @@ def generate_operation(operation_name, declaration_only=False):
|
|||||||
name = required_output[0]
|
name = required_output[0]
|
||||||
cpp_type = get_cpp_type(intro.details[name]['type'])
|
cpp_type = get_cpp_type(intro.details[name]['type'])
|
||||||
spacing = '' if cpp_type.endswith(cplusplus_suffixes) else ' '
|
spacing = '' if cpp_type.endswith(cplusplus_suffixes) else ' '
|
||||||
result += ' {0}{1}{2};\n\n'.format(cpp_type, spacing, cppize(name))
|
result += f' {cpp_type}{spacing}{cppize(name)};\n\n'
|
||||||
|
|
||||||
result += ' call( "{0}",\n'.format(operation_name)
|
result += f' call( "{operation_name}",\n'
|
||||||
result += ' (options ? options : VImage::option())'
|
result += f' (options ? options : VImage::option())'
|
||||||
if intro.member_x is not None:
|
if intro.member_x is not None:
|
||||||
result += '->\n'
|
result += f'->\n'
|
||||||
result += ' set( "{0}", *this )'.format(intro.member_x)
|
result += f' set( "{intro.member_x}", *this )'
|
||||||
|
|
||||||
all_required = intro.method_args
|
all_required = intro.method_args
|
||||||
|
|
||||||
if has_output:
|
if has_output:
|
||||||
# first element needs to be passed by reference
|
# first element needs to be passed by reference
|
||||||
arg = cppize(required_output[0])
|
arg = cppize(required_output[0])
|
||||||
result += '->\n'
|
result += f'->\n'
|
||||||
result += ' set( "{0}", &{1} )' \
|
result += f' set( "{required_output[0]}", &{arg} )'
|
||||||
.format(required_output[0], arg)
|
|
||||||
|
|
||||||
# append the remaining list
|
# append the remaining list
|
||||||
all_required += required_output[1:]
|
all_required += required_output[1:]
|
||||||
|
|
||||||
for name in all_required:
|
for name in all_required:
|
||||||
arg = cppize(name)
|
arg = cppize(name)
|
||||||
result += '->\n'
|
result += f'->\n'
|
||||||
result += ' set( "{0}", {1} )'.format(name, arg)
|
result += f' set( "{name}", {arg} )'
|
||||||
|
|
||||||
result += ' );\n'
|
result += ' );\n'
|
||||||
|
|
||||||
if has_output:
|
if has_output:
|
||||||
result += '\n'
|
result += f'\n'
|
||||||
result += ' return( {0} );\n'.format(required_output[0])
|
result += f' return( {required_output[0]} );\n'
|
||||||
|
|
||||||
result += '}'
|
result += '}'
|
||||||
|
|
||||||
|
@ -3,8 +3,7 @@ pkginclude_HEADERS = \
|
|||||||
VImage8.h \
|
VImage8.h \
|
||||||
VInterpolate8.h \
|
VInterpolate8.h \
|
||||||
VConnection8.h \
|
VConnection8.h \
|
||||||
vips8 \
|
vips8
|
||||||
vips-operators.h
|
|
||||||
|
|
||||||
vips-operators.h:
|
vips-operators.h:
|
||||||
echo "// headers for vips operations" > vips-operators.h; \
|
echo "// headers for vips operations" > vips-operators.h; \
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
VIPS_NAMESPACE_START
|
VIPS_NAMESPACE_START
|
||||||
|
|
||||||
class VSource : VObject
|
class VSource : public VObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VSource( VipsSource *input, VSteal steal = STEAL ) :
|
VSource( VipsSource *input, VSteal steal = STEAL ) :
|
||||||
@ -66,7 +66,7 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class VTarget : VObject
|
class VTarget : public VObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VTarget( VipsTarget *output, VSteal steal = STEAL ) :
|
VTarget( VipsTarget *output, VSteal steal = STEAL ) :
|
||||||
|
@ -39,16 +39,35 @@
|
|||||||
|
|
||||||
VIPS_NAMESPACE_START
|
VIPS_NAMESPACE_START
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The libvips error class. It holds a single string containing an
|
||||||
|
* internationalized error message in utf-8 encoding.
|
||||||
|
*/
|
||||||
class VIPS_CPLUSPLUS_API VError : public std::exception {
|
class VIPS_CPLUSPLUS_API VError : public std::exception {
|
||||||
std::string _what;
|
std::string _what;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Construct a VError, setting the error message.
|
||||||
|
*/
|
||||||
VError( const std::string &what ) : _what( what ) {}
|
VError( const std::string &what ) : _what( what ) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct a VError, fetching the error message from the libvips
|
||||||
|
* error buffer.
|
||||||
|
*/
|
||||||
VError() : _what( vips_error_buffer() ) {}
|
VError() : _what( vips_error_buffer() ) {}
|
||||||
|
|
||||||
virtual ~VError() throw() {}
|
virtual ~VError() throw() {}
|
||||||
|
|
||||||
// Extract string
|
/**
|
||||||
|
* Get a reference to the underlying C string.
|
||||||
|
*/
|
||||||
virtual const char *what() const throw() { return _what.c_str(); }
|
virtual const char *what() const throw() { return _what.c_str(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print the error message to a stream.
|
||||||
|
*/
|
||||||
void ostream_print( std::ostream & ) const;
|
void ostream_print( std::ostream & ) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -34,17 +34,36 @@
|
|||||||
|
|
||||||
VIPS_NAMESPACE_START
|
VIPS_NAMESPACE_START
|
||||||
|
|
||||||
class VInterpolate : VObject
|
/**
|
||||||
|
* An interpolation. You can pass one of these to something like
|
||||||
|
* VImage::affine for it to use to interpolate pixels.
|
||||||
|
*
|
||||||
|
* The available interpolators vary a bit with your libvips version and how it
|
||||||
|
* was built, but will include `nearest`, `bilinear` and `bicubic`. Run
|
||||||
|
* vips -l interpolate` to see them all.
|
||||||
|
*/
|
||||||
|
class VInterpolate : public VObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Create a VInterpolate that wraps a VipsInterpolate object. If steal
|
||||||
|
* is STEAL, then this VInterpolate takes over ownership of the libvips
|
||||||
|
* object and will automatically unref it.
|
||||||
|
*/
|
||||||
VInterpolate( VipsInterpolate *interpolate, VSteal steal = STEAL ) :
|
VInterpolate( VipsInterpolate *interpolate, VSteal steal = STEAL ) :
|
||||||
VObject( (VipsObject *) interpolate, steal )
|
VObject( (VipsObject *) interpolate, steal )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a VInterpolate from a name, for example `"bicubic"`.
|
||||||
|
*/
|
||||||
static
|
static
|
||||||
VInterpolate new_from_name( const char *name, VOption *options = 0 );
|
VInterpolate new_from_name( const char *name, VOption *options = 0 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a pointer to the underlying VipsInterpolate object.
|
||||||
|
*/
|
||||||
VipsInterpolate *
|
VipsInterpolate *
|
||||||
get_interpolate() const
|
get_interpolate() const
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
// bodies for vips operations
|
// bodies for vips operations
|
||||||
// Sun 5 Jul 22:36:37 BST 2020
|
// Mon 17 Aug 18:04:15 BST 2020
|
||||||
// this file is generated automatically, do not edit!
|
// this file is generated automatically, do not edit!
|
||||||
|
|
||||||
VImage VImage::CMC2LCh( VOption *options ) const
|
VImage VImage::CMC2LCh( VOption *options ) const
|
||||||
|
Loading…
Reference in New Issue
Block a user