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>
158 friend class boost::iterator_core_access;
160 const Pixel& dereference()
const {
177 return (o._it - _it) /
static_cast<int>(
numChannels(_t));
180 void advance(difference_type
n) {
Definition: GnashImage.h:49
pixel_iterator< T > begin(GnashImage &im)
Definition: ImageIterators.h:191
virtual iterator begin()
Access the raw data.
Definition: GnashImage.h:154
ARGB & operator=(const ARGB &other)
Standard assignment just copies bytes.
Definition: ImageIterators.h:51
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
Definition: GnashKey.h:161
The pixel_iterator class is a pixel-level adaptor for a GnashImage.
Definition: ImageIterators.h:122
ARGB(iterator &i, ImageType t)
Construct an ARGB pixel helper.
Definition: ImageIterators.h:42
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
Definition: GnashImage.h:50
Definition: GnashKey.h:160
Definition: GnashKey.h:166
Adapt a pixel_iterator to use 32-bit values in ARGB byte order.
Definition: ImageIterators.h:35
GnashImage::iterator iterator
Definition: ImageIterators.h:39
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
ImageType
The types of images handled in Gnash.
Definition: GnashImage.h:46
size_t numChannels(ImageType t)
Definition: GnashImage.h:61
std::ptrdiff_t difference_type
Definition: ImageIterators.h:128
value_type * iterator
Definition: GnashImage.h:83
Base class for different types of bitmaps.
Definition: GnashImage.h:77
Definition: GnashKey.h:155
pixel_iterator(const pixel_iterator &other)
Copy a pixel_iterator.
Definition: ImageIterators.h:140
pixel_iterator< T > end(GnashImage &im)
Definition: ImageIterators.h:198
Pixel::iterator iterator
Definition: ImageIterators.h:129
pixel_iterator & operator=(const pixel_iterator &other)
Assign to a pixel_iterator.
Definition: ImageIterators.h:148
iterator end()
An iterator to the end of the data.
Definition: GnashImage.h:164
ImageType type() const
Return the ImageType of the image.
Definition: GnashImage.h:91
pixel_iterator(iterator it, ImageType t)
Construct a pixel_iterator.
Definition: ImageIterators.h:132