diff --git a/develop/doc/html/_sources/design_guide.rst.txt b/develop/doc/html/_sources/design_guide.rst.txt index 7bead2ac0..a751a39e6 100644 --- a/develop/doc/html/_sources/design_guide.rst.txt +++ b/develop/doc/html/_sources/design_guide.rst.txt @@ -2352,26 +2352,25 @@ uniformly as a collection and store them in the same container. Useful Metafunctions and Typedefs --------------------------------- -Flexibility comes at a price. GIL types can be very long and hard to -read. To address this problem, GIL provides typedefs to refer to any -standard image, pixel iterator, pixel locator, pixel reference or -pixel value. They follow this pattern: +Flexibility comes at a price. GIL types can be very long and hard to read. +To address this problem, GIL provides typedefs to refer to any standard image, +pixel iterator, pixel locator, pixel reference or pixel value. -.. code-block:: +They follow this pattern:: *ColorSpace* + *BitDepth* + ["s|f"] + ["c"] + ["_planar"] + ["_step"] + *ClassType* + "_t" -where *ColorSpace* also indicates the ordering of components. Examples -are ``rgb``, ``bgr``, ``cmyk``, ``rgba``. *BitDepth* can be, for -example, ``8``,``16``,``32``. By default the bits are unsigned -integral type. Append ``s`` to the bit depth to indicate signed -integral, or ``f`` to indicate floating point. ``c`` indicates object -whose associated pixel reference is immutable. ``_planar`` indicates -planar organization (as opposed to interleaved). ``_step`` indicates -the type has a dynamic step and *ClassType* is ``_image`` (image, -using a standard allocator), ``_view`` (image view), ``_loc`` (pixel -locator), ``_ptr`` (pixel iterator), ``_ref`` (pixel reference), -``_pixel`` (pixel value). +where *ColorSpace* also indicates the ordering of components. + +Examples are ``rgb``, ``bgr``, ``cmyk``, ``rgba``. *BitDepth* can be, for +example, ``8``,``16``,``32``. By default the bits are unsigned integral type. +Append ``s`` to the bit depth to indicate signed integral, or ``f`` to +indicate floating point. ``c`` indicates object whose associated pixel +reference is immutable. ``_planar`` indicates planar organization (as opposed +to interleaved). ``_step`` indicates the type has a dynamic step and +*ClassType* is ``_image`` (image, using a standard allocator), ``_view`` +(image view), ``_loc`` (pixel locator), ``_ptr`` (pixel iterator), ``_ref`` +(pixel reference), ``_pixel`` (pixel value). Here are examples: @@ -2385,7 +2384,7 @@ Here are examples: GIL provides the metafunctions that return the types of standard homogeneous memory-based GIL constructs given a channel type, a layout, and whether the construct is planar, has a step along the X -direction, and is mutable:: +direction, and is mutable: .. code-block:: cpp diff --git a/develop/doc/html/design_guide.html b/develop/doc/html/design_guide.html index 1281233ca..6f7b9a79b 100644 --- a/develop/doc/html/design_guide.html +++ b/develop/doc/html/design_guide.html @@ -2240,21 +2240,23 @@ uniformly as a collection and store them in the same container.
Flexibility comes at a price. GIL types can be very long and hard to -read. To address this problem, GIL provides typedefs to refer to any -standard image, pixel iterator, pixel locator, pixel reference or -pixel value. They follow this pattern:
-where ColorSpace also indicates the ordering of components. Examples
-are rgb, bgr, cmyk, rgba. BitDepth can be, for
-example, 8,``16``,``32``. By default the bits are unsigned
-integral type. Append s to the bit depth to indicate signed
-integral, or f to indicate floating point. c indicates object
-whose associated pixel reference is immutable. _planar indicates
-planar organization (as opposed to interleaved). _step indicates
-the type has a dynamic step and ClassType is _image (image,
-using a standard allocator), _view (image view), _loc (pixel
-locator), _ptr (pixel iterator), _ref (pixel reference),
-_pixel (pixel value).
Flexibility comes at a price. GIL types can be very long and hard to read. +To address this problem, GIL provides typedefs to refer to any standard image, +pixel iterator, pixel locator, pixel reference or pixel value.
+They follow this pattern:
+*ColorSpace* + *BitDepth* + ["s|f"] + ["c"] + ["_planar"] + ["_step"] + *ClassType* + "_t"
+where ColorSpace also indicates the ordering of components.
+Examples are rgb, bgr, cmyk, rgba. BitDepth can be, for
+example, 8,``16``,``32``. By default the bits are unsigned integral type.
+Append s to the bit depth to indicate signed integral, or f to
+indicate floating point. c indicates object whose associated pixel
+reference is immutable. _planar indicates planar organization (as opposed
+to interleaved). _step indicates the type has a dynamic step and
+ClassType is _image (image, using a standard allocator), _view
+(image view), _loc (pixel locator), _ptr (pixel iterator), _ref
+(pixel reference), _pixel (pixel value).
Here are examples:
bgr8_image_t i; // 8-bit unsigned (unsigned char) interleaved BGR image
cmyk16_pixel_t; x; // 16-bit unsigned (unsigned short) CMYK pixel value;
@@ -2266,27 +2268,31 @@ locator), _ptr
-.. code-block:: cpp
+template <typename ChannelValue, typename Layout, bool IsPlanar=false, bool IsMutable=true>
+struct pixel_reference_type { typedef ... type; };
+
+template <typename Channel, typename Layout>
+struct pixel_value_type { typedef ... type; };
+
+template <typename ChannelValue, typename Layout, bool IsPlanar=false, bool IsStep=false, bool IsMutable=true>
+struct iterator_type { typedef ... type; };
+
+template <typename ChannelValue, typename Layout, bool IsPlanar=false, bool IsXStep=false, bool IsMutable=true>
+struct locator_type { typedef ... type; };
+
+template <typename ChannelValue, typename Layout, bool IsPlanar=false, bool IsXStep=false, bool IsMutable=true>
+struct view_type { typedef ... type; };
+
+template <typename ChannelValue, typename Layout, bool IsPlanar=false, typename Alloc=std::allocator<unsigned char> >
+struct image_type { typedef ... type; };
+
+template <typename BitField, typename ChannelBitSizeVector, typename Layout, typename Alloc=std::allocator<unsigned char> >
+struct packed_image_type { typedef ... type; };
+
+template <typename ChannelBitSizeVector, typename Layout, typename Alloc=std::allocator<unsigned char> >
+struct bit_aligned_image_type { typedef ... type; };
-
-template <typename ChannelValue, typename Layout, bool IsPlanar=false, bool IsMutable=true>
-struct pixel_reference_type { typedef … type; };
-template <typename Channel, typename Layout>
-struct pixel_value_type { typedef … type; };
-template <typename ChannelValue, typename Layout, bool IsPlanar=false, bool IsStep=false, bool IsMutable=true>
-struct iterator_type { typedef … type; };
-template <typename ChannelValue, typename Layout, bool IsPlanar=false, bool IsXStep=false, bool IsMutable=true>
-struct locator_type { typedef … type; };
-template <typename ChannelValue, typename Layout, bool IsPlanar=false, bool IsXStep=false, bool IsMutable=true>
-struct view_type { typedef … type; };
-template <typename ChannelValue, typename Layout, bool IsPlanar=false, typename Alloc=std::allocator<unsigned char> >
-struct image_type { typedef … type; };
-template <typename BitField, typename ChannelBitSizeVector, typename Layout, typename Alloc=std::allocator<unsigned char> >
-struct packed_image_type { typedef … type; };
-template <typename ChannelBitSizeVector, typename Layout, typename Alloc=std::allocator<unsigned char> >
-struct bit_aligned_image_type { typedef … type; };
-
There are also helper metafunctions to construct packed and
bit-aligned images with up to five channels:
template <typename BitField, unsigned Size1,