]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/gil/deprecated.hpp
77459d2c72407d65679eb1d81fa68e6f35b81a1d
[ceph.git] / ceph / src / boost / boost / gil / deprecated.hpp
1 //
2 // Copyright 2005-2007 Adobe Systems Incorporated
3 //
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
7 //
8 #ifndef BOOST_GIL_DEPRECATED_HPP
9 #define BOOST_GIL_DEPRECATED_HPP
10
11 #include <cstddef>
12
13 /// This file is provided as a courtesy to ease upgrading GIL client code.
14 /// Please make sure your code compiles when this file is not included.
15
16 #define planar_ptr planar_pixel_iterator
17 #define planar_ref planar_pixel_reference
18 #define membased_2d_locator memory_based_2d_locator
19 #define pixel_step_iterator memory_based_step_iterator
20 #define pixel_image_iterator iterator_from_2d
21
22 #define equal_channels static_equal
23 #define copy_channels static_copy
24 #define fill_channels static_fill
25 #define generate_channels static_generate
26 #define for_each_channel static_for_each
27 #define transform_channels static_transform
28 #define max_channel static_max
29 #define min_channel static_min
30
31 #define semantic_channel semantic_at_c
32
33 template <typename Img>
34 void resize_clobber_image(Img& img, const typename Img::point_t& new_dims) {
35 img.recreate(new_dims);
36 }
37
38 template <typename Img>
39 void resize_clobber_image(Img& img, const typename Img::x_coord_t& width, const typename Img::y_coord_t& height) {
40 img.recreate(width,height);
41 }
42
43 template <typename T> typename T::x_coord_t get_width(const T& a) { return a.width(); }
44 template <typename T> typename T::y_coord_t get_height(const T& a) { return a.height(); }
45 template <typename T> typename T::point_t get_dimensions(const T& a) { return a.dimensions(); }
46 template <typename T> std::size_t get_num_channels(const T& a) { return a.num_channels(); }
47
48 #define GIL boost::gil
49 #define ADOBE_GIL_NAMESPACE_BEGIN namespace boost { namespace gil {
50 #define ADOBE_GIL_NAMESPACE_END } }
51
52 #define ByteAdvancableIteratorConcept MemoryBasedIteratorConcept
53 #define byte_advance memunit_advance
54 #define byte_advanced memunit_advanced
55 #define byte_step memunit_step
56 #define byte_distance memunit_distance
57
58 #define byte_addressable_step_iterator memory_based_step_iterator
59 #define byte_addressable_2d_locator memory_based_2d_locator
60
61 // These are members of memory-based locators
62 //#define row_bytes row_size // commented out because row_bytes is commonly used
63 #define pix_bytestep pixel_size
64
65 #endif