Go to the documentation of this file.
22 #ifndef GNASH_IMAGE_ITERATORS_H
23 #define GNASH_IMAGE_ITERATORS_H
25 #include <boost/iterator/iterator_facade.hpp>
56 std::copy(other._it, other._it + 4, _it);
61 std::copy(other._it, other._it + 3, _it);
67 std::copy(other._it, other._it + 3, _it);
82 *(_it + 3) = (pixel & 0xff000000) >> 24;
84 *_it = (pixel & 0x00ff0000) >> 16;
85 *(_it + 1) = (pixel & 0x0000ff00) >> 8;
86 *(_it + 2) = (pixel & 0x000000ff);
94 operator std::uint32_t()
const {
95 std::uint32_t ret = 0xff000000;
99 ret = *(_it + 3) << 24;
101 ret |= (*_it << 16 | *(_it + 1) << 8 | *(_it + 2));
121 template<
typename Pixel>
123 pixel_iterator<Pixel>,
125 std::random_access_iterator_tag>
160 const Pixel& dereference()
const {
177 return (
o._it - _it) /
static_cast<int>(
numChannels(_t));
pixel_iterator< T > begin(GnashImage &im)
Definition: ImageIterators.h:191
@ i
Definition: GnashKey.h:155
Adapt a pixel_iterator to use 32-bit values in ARGB byte order.
Definition: ImageIterators.h:36
value_type * iterator
Definition: GnashImage.h:83
friend class boost::iterator_core_access
Definition: ImageIterators.h:158
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
ARGB & operator=(const ARGB &other)
Standard assignment just copies bytes.
Definition: ImageIterators.h:51
Base class for different types of bitmaps.
Definition: GnashImage.h:78
ARGB(iterator &i, ImageType t)
Construct an ARGB pixel helper.
Definition: ImageIterators.h:42
@ n
Definition: GnashKey.h:160
ImageType type() const
Return the ImageType of the image.
Definition: GnashImage.h:91
iterator end()
An iterator to the end of the data.
Definition: GnashImage.h:164
const ARGB & operator=(std::uint32_t pixel) const
Writes a 32-bit unsigned value in ARGB byte order to the image.
Definition: ImageIterators.h:78
@ t
Definition: GnashKey.h:166
The pixel_iterator class is a pixel-level adaptor for a GnashImage.
Definition: ImageIterators.h:126
pixel_iterator & operator=(const pixel_iterator &other)
Assign to a pixel_iterator.
Definition: ImageIterators.h:148
pixel_iterator(const pixel_iterator &other)
Copy a pixel_iterator.
Definition: ImageIterators.h:140
pixel_iterator< T > end(GnashImage &im)
Definition: ImageIterators.h:198
GnashImage::iterator iterator
Definition: ImageIterators.h:39
@ TYPE_RGB
Definition: GnashImage.h:49
virtual iterator begin()
Access the raw data.
Definition: GnashImage.h:154
ImageType
The types of images handled in Gnash.
Definition: GnashImage.h:47
bool equal(string_table &st, string_table::key a, string_table::key b, bool caseless)
Check whether two keys are equivalent.
Definition: string_table.cpp:174
std::ptrdiff_t difference_type
Definition: ImageIterators.h:128
@ o
Definition: GnashKey.h:161
Pixel::iterator iterator
Definition: ImageIterators.h:129
pixel_iterator(iterator it, ImageType t)
Construct a pixel_iterator.
Definition: ImageIterators.h:132
@ TYPE_RGBA
Definition: GnashImage.h:50
size_t numChannels(ImageType t)
Definition: GnashImage.h:61