61 template<
typename Image,
typename Pixel>
63 : m_owner(NULL), m_pos(0, 0)
75 template<
typename Image,
typename Pixel>
77 ( image_type& owner,
unsigned int x,
unsigned int y )
78 : m_owner(&owner), m_pos(x, y)
88 template<
typename Image,
typename Pixel>
93 if ( is_final() && that.is_final() )
95 else if ( m_owner == that.m_owner )
96 return m_pos == that.m_pos;
106 template<
typename Image,
typename Pixel>
108 claw::graphic::image::base_iterator<Image, Pixel>::operator!=
111 return !(*
this == that);
119 template<
typename Image,
typename Pixel>
121 claw::graphic::image::base_iterator<Image, Pixel>::operator<
124 if ( this->m_pos.y == that.m_pos.y)
125 return this->m_pos.
x < that.m_pos.x;
127 return this->m_pos.y < that.m_pos.y;
135 template<
typename Image,
typename Pixel>
137 claw::graphic::image::base_iterator<Image, Pixel>::operator>
149 template<
typename Image,
typename Pixel>
151 claw::graphic::image::base_iterator<Image, Pixel>::operator<=
154 return !(*
this > that);
163 template<
typename Image,
typename Pixel>
165 claw::graphic::image::base_iterator<Image, Pixel>::operator>=
168 return !(*
this < that);
176 template<
typename Image,
typename Pixel>
186 unsigned int n_y = n / m_owner->width();
187 unsigned int n_x = n % m_owner->width();
201 template<
typename Image,
typename Pixel>
211 unsigned int n_y = n / m_owner->width();
212 unsigned int n_x = n % m_owner->width();
229 template<
typename Image,
typename Pixel>
243 template<
typename Image,
typename Pixel>
258 template<
typename ImageT,
typename PixelT>
273 template<
typename Image,
typename Pixel>
276 claw::graphic::image::base_iterator<Image, Pixel>::operator-
279 CLAW_PRECOND( is_final() || that.is_final() || (m_owner == that.m_owner) );
281 if ( that.is_final() )
286 return -(m_owner->height() - m_pos.y) * m_owner->width() - m_pos.x;
288 else if ( is_final() )
289 return (that.m_owner->height() - that.m_pos.y) * that.m_owner->width()
292 return m_pos.y * m_owner->width() + m_pos.x
293 - that.m_pos.y * that.m_owner->width() + that.m_pos.x;
300 template<
typename Image,
typename Pixel>
308 if ( m_pos.x == m_owner->width() )
321 template<
typename Image,
typename Pixel>
334 template<
typename Image,
typename Pixel>
343 m_pos.x = m_owner->width() - 1;
356 template<
typename Image,
typename Pixel>
369 template<
typename Image,
typename Pixel>
375 return (*m_owner)[m_pos.y][m_pos.x];
382 template<
typename Image,
typename Pixel>
388 return &(*m_owner)[m_pos.y][m_pos.x];
396 template<
typename Image,
typename Pixel>
407 template<
typename Image,
typename Pixel>
413 else if ( m_pos.y >= m_owner->height() )
415 else if ( m_pos.y == m_owner->height() - 1 )
416 return m_pos.x >= m_owner->width();