Commit Graph

39 Commits

Author SHA1 Message Date
Fingolfin1196 b0f21d2727
Update VImage8.h
VObject now has an is_null check, which is then used in VImage.
2018-10-10 15:48:23 +02:00
John Cupitt 0e3cac1a72 make cpp overloads const
all overloads are declared const now, where possible

also revised cpp examples and ran them to check

see https://github.com/jcupitt/libvips/issues/983
2018-06-11 15:24:11 +01:00
John Cupitt ca6410e1a6 make members and getters "const" in cpp api
eg. VImage::width() is now

	int VImage::width() const;

ie. it does not alter the image objects. In factr we can mark almost all
members const.

see https://github.com/jcupitt/libvips/issues/983
2018-06-11 14:30:17 +01:00
Lovell Fuller cea15b2d8f Prevent compiler warning with size_t to int cast 2018-02-03 18:05:07 +00:00
John Cupitt e52d2c9f7f add composite shortcut to cpp
two composite just two images
2017-10-06 16:56:20 +01:00
Lovell Fuller 8bd2208e5e cplusplus: offset coords are int rather than double 2017-09-14 10:25:15 +01:00
John Cupitt 1504fb0249 use bandjoin_const from cpp 2017-04-29 10:17:38 +01:00
John Cupitt 7882602dfe C/C++ done
python next
2017-04-26 14:52:28 +01:00
John Cupitt 8062a4b1e6 update cpp API for arg order changes
hopefully user code won't see this
2017-03-13 13:28:37 +00:00
John Cupitt b140c18a37 various tweaks to calm coverity
passes cleanly now
2017-01-20 08:55:13 +00:00
Lovell Fuller e1aef0445b MSVC requires __declspec first for return by reference
Ensure consistent modifier order across all exported functions
Move assignment operators to be "outside" definitions to aid export
2016-10-15 22:02:24 +01:00
John Cupitt eb7768ff61 Merge branch 'master' into add-assignment-overloads 2016-06-11 20:15:42 +01:00
John Cupitt 28efdf1695 working! 2016-06-11 17:36:06 +01:00
John Cupitt 8667dd0d18 VImage::ifthenelse() fix
the prototype was missing =0 on options for scalar constant forms
2016-06-10 17:34:41 +01:00
John Cupitt 93951fd04a start adding 2016-06-10 14:57:46 +01:00
John Cupitt ad56c57830 add implementation for VImage::write()
oops, it was missing

also, change the return type from void to VImage. This makes chaining
possible, eg.:

   VImage memory = im.write( Viameg::new_memory() );
2016-06-10 14:22:08 +01:00
Lovell Fuller baa175c4c0 Allow MSVC to link CPP overloads introduced in da43a40 2016-04-15 22:16:29 +01:00
John Cupitt da43a4041f move cpp overloads outside class
so they are true functions and we can take their address

see https://github.com/jcupitt/libvips/issues/409
2016-03-25 06:09:07 +00:00
Lovell Fuller 20ae80397d Enable compilation of vips8 C++ bindings with MSVC
Add VIPS_CPLUSPLUS_API macro to allow DLL creation
2016-01-11 17:56:02 +00:00
John Cupitt 50db131865 VImage::get_typeof() returns GType
it was int, causing some compiler warnings on some platforms.

see https://github.com/jcupitt/libvips/issues/362
2016-01-09 20:27:14 +00:00
John Cupitt 66373e9b41 remove exception specs from vips8 C++ interface
We had exception specs on the C++ interface, but C++11 does not support
them and some compilers have never honoured them. Remove all specs.
Thanks Lovell.

See https://github.com/jcupitt/libvips/issues/362
2016-01-09 14:52:05 +00:00
John Cupitt ad017dc56f add more C++ convenience functions
flipver() etc.
2015-04-24 10:10:44 +01:00
John Cupitt ded01df512 c++: add [], change ()
() used to return element zero, just return a vector

add [] overload
2015-03-01 10:43:02 +00:00
John Cupitt 367819b5cc oops 2015-02-28 22:56:09 +00:00
John Cupitt 5d912fdbbb add [] overload to python
index and slice image bands
2015-02-28 16:53:06 +00:00
John Cupitt ce557ba6de add VInterpolate wrapper class
to cplusplus, see https://github.com/jcupitt/libvips/issues/230
2015-01-30 21:19:58 +00:00
John Cupitt 6f101ae86b remove VImage::scale()
it clashed with the VipsScale operator, see

https://github.com/jcupitt/libvips/pull/213
2015-01-06 12:00:11 +00:00
John Cupitt 8267dd2621 naming improvements
and test_overloads.cpp has started working
2014-11-05 14:04:46 +00:00
John Cupitt ca6eb088f3 add () overload for read pixel 2014-10-31 20:24:40 +00:00
John Cupitt 5694bf6f4c add all new() and write() methods
VImage::new_from_buffer() etc.
2014-10-31 19:15:29 +00:00
John Cupitt 2a992375fe add more type conversions
so we automatically do int and double -> doublevec and intvec
2014-10-31 18:11:26 +00:00
John Cupitt 35bcd4eaa0 reformat 2014-10-30 22:11:43 +00:00
John Cupitt d6a6d7ae71 set of overloads for new cpp API
all the usual ones .. compiles, but untested
2014-10-30 21:53:24 +00:00
John Cupitt 4173ddfa9c add make constant image 2014-10-29 12:39:25 +00:00
John Cupitt d012cef3b4 add some simple extras
.bandjoin(), .bandsplit(), .sin() etc etc
2014-10-29 09:47:02 +00:00
John Cupitt cabb4488be full cpp wrapper compiles 2014-10-28 10:12:06 +00:00
John Cupitt 63d4370043 split to a separate branch 2014-10-27 18:17:49 +00:00
John Cupitt 070a437f61 cleanups ready for proto gen 2014-10-27 14:17:33 +00:00
John Cupitt 4f588ce908 package up new vips8 C++ API 2014-10-27 13:41:44 +00:00