#include <_surface.h>
Public Types | |
typedef T | value_type |
typedef AT | accumulator_type |
typedef value_type * | pointer |
typedef const value_type * | const_pointer |
typedef value_type & | reference |
typedef generic_pen< value_type, accumulator_type > | pen |
typedef generic_pen< const value_type, accumulator_type > | const_pen |
typedef VP | value_prep_type |
typedef alpha_pen< const_pen > | const_alpha_pen |
typedef alpha_pen< pen > | alpha_pen |
typedef pen::difference_type | size_type |
typedef pen::difference_type | difference_type |
typedef pen::iterator_x | iterator_x |
typedef pen::iterator_y | iterator_y |
typedef pen::const_iterator_x | const_iterator_x |
typedef pen::const_iterator_y | const_iterator_y |
Public Member Functions | |
surface () | |
surface (value_type *data, int w, int h, bool deletable=false) | |
surface (const typename size_type::value_type &w, const typename size_type::value_type &h) | |
surface (const size_type &s) | |
template<typename _pen> | |
surface (const _pen &_begin, const _pen &_end) | |
surface (const surface &s) | |
~surface () | |
size_type | size () const |
size_type::value_type | get_pitch () const |
size_type::value_type | get_w () const |
size_type::value_type | get_h () const |
const surface & | mirror (const surface &rhs) |
const surface & | operator= (const surface &rhs) |
void | set_wh (typename size_type::value_type w, typename size_type::value_type h) |
void | fill (value_type v, int x, int y, int w, int h) |
template<class _pen> | |
void | fill (value_type v, _pen &PEN, int w, int h) |
void | fill (value_type v) |
template<class _pen> | |
void | blit_to (_pen &pen) |
template<class _pen> | |
void | blit_to (_pen &DEST_PEN, int x, int y, int w, int h) |
void | clear () |
iterator_x | operator[] (const int &y) |
const_iterator_x | operator[] (const int &y) const |
void | flip_v () |
bool | is_valid () const |
operator bool () const | |
pen | begin () |
pen | get_pen (int x, int y) |
pen | end () |
const_pen | begin () const |
const_pen | get_pen (int x, int y) const |
const_pen | end () const |
value_type | linear_sample (const float x, const float y) const |
Linear sample. | |
value_type | cosine_sample (const float x, const float y) const |
Cosine sample. | |
value_type | cubic_sample (float x, float y) const |
Cubic sample. | |
value_type | sample_rect (float x0, float y0, float x1, float y1) const |
value_type | sample_rect_clip (float x0, float y0, float x1, float y1) const |
Private Member Functions | |
void | swap (const surface &x) |
Private Attributes | |
value_type * | data_ |
value_type * | zero_pos_ |
difference_type::value_type | pitch_ |
int | w_ |
int | h_ |
bool | deletable_ |
value_prep_type | cooker_ |
Definition at line 54 of file _surface.h.
typedef T surface< T, AT, VP >::value_type |
Definition at line 57 of file _surface.h.
typedef AT surface< T, AT, VP >::accumulator_type |
Definition at line 58 of file _surface.h.
typedef value_type* surface< T, AT, VP >::pointer |
Definition at line 59 of file _surface.h.
typedef const value_type* surface< T, AT, VP >::const_pointer |
Definition at line 60 of file _surface.h.
typedef value_type& surface< T, AT, VP >::reference |
Definition at line 61 of file _surface.h.
typedef generic_pen<value_type,accumulator_type> surface< T, AT, VP >::pen |
Definition at line 62 of file _surface.h.
typedef generic_pen<const value_type,accumulator_type> surface< T, AT, VP >::const_pen |
Definition at line 63 of file _surface.h.
typedef VP surface< T, AT, VP >::value_prep_type |
Definition at line 64 of file _surface.h.
typedef alpha_pen<const_pen> surface< T, AT, VP >::const_alpha_pen |
Definition at line 66 of file _surface.h.
typedef alpha_pen<pen> surface< T, AT, VP >::alpha_pen |
Definition at line 67 of file _surface.h.
typedef pen::difference_type surface< T, AT, VP >::size_type |
Definition at line 69 of file _surface.h.
typedef pen::difference_type surface< T, AT, VP >::difference_type |
Definition at line 70 of file _surface.h.
typedef pen::iterator_x surface< T, AT, VP >::iterator_x |
Definition at line 72 of file _surface.h.
typedef pen::iterator_y surface< T, AT, VP >::iterator_y |
Definition at line 73 of file _surface.h.
typedef pen::const_iterator_x surface< T, AT, VP >::const_iterator_x |
Definition at line 74 of file _surface.h.
typedef pen::const_iterator_y surface< T, AT, VP >::const_iterator_y |
Definition at line 75 of file _surface.h.
surface< T, AT, VP >::surface | ( | ) | [inline] |
Definition at line 97 of file _surface.h.
surface< T, AT, VP >::surface | ( | value_type * | data, | |
int | w, | |||
int | h, | |||
bool | deletable = false | |||
) | [inline] |
Definition at line 104 of file _surface.h.
surface< T, AT, VP >::surface | ( | const typename size_type::value_type & | w, | |
const typename size_type::value_type & | h | |||
) | [inline] |
Definition at line 111 of file _surface.h.
surface< T, AT, VP >::surface | ( | const size_type & | s | ) | [inline] |
Definition at line 118 of file _surface.h.
surface< T, AT, VP >::surface | ( | const _pen & | _begin, | |
const _pen & | _end | |||
) | [inline] |
Definition at line 126 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::deletable_, surface< T, AT, VP >::h_, surface< T, AT, VP >::pitch_, surface< T, AT, VP >::size(), surface< T, AT, VP >::w_, generic_pen< T, AT >::difference_type::x, generic_pen< T, AT >::difference_type::y, and surface< T, AT, VP >::zero_pos_.
surface< T, AT, VP >::surface | ( | const surface< T, AT, VP > & | s | ) | [inline] |
Definition at line 144 of file _surface.h.
References abs(), surface< T, AT, VP >::data_, surface< T, AT, VP >::h_, and surface< T, AT, VP >::pitch_.
surface< T, AT, VP >::~surface | ( | ) | [inline] |
Definition at line 161 of file _surface.h.
References surface< T, AT, VP >::data_, and surface< T, AT, VP >::deletable_.
void surface< T, AT, VP >::swap | ( | const surface< T, AT, VP > & | x | ) | [inline, private] |
Definition at line 86 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::deletable_, surface< T, AT, VP >::h_, surface< T, AT, VP >::pitch_, surface< T, AT, VP >::w_, and surface< T, AT, VP >::zero_pos_.
size_type surface< T, AT, VP >::size | ( | ) | const [inline] |
Definition at line 168 of file _surface.h.
References surface< T, AT, VP >::h_, and surface< T, AT, VP >::w_.
Referenced by surface< T, AT, VP >::surface().
size_type::value_type surface< T, AT, VP >::get_pitch | ( | ) | const [inline] |
size_type::value_type surface< T, AT, VP >::get_w | ( | ) | const [inline] |
Definition at line 172 of file _surface.h.
References surface< T, AT, VP >::w_.
Referenced by surface< T, AT, VP >::blit_to(), and surface< T, AT, VP >::sample_rect_clip().
size_type::value_type surface< T, AT, VP >::get_h | ( | ) | const [inline] |
Definition at line 173 of file _surface.h.
References surface< T, AT, VP >::h_.
Referenced by surface< T, AT, VP >::blit_to(), and surface< T, AT, VP >::sample_rect_clip().
const surface& surface< T, AT, VP >::mirror | ( | const surface< T, AT, VP > & | rhs | ) | [inline] |
Definition at line 175 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::deletable_, surface< T, AT, VP >::h_, surface< T, AT, VP >::pitch_, surface< T, AT, VP >::w_, and surface< T, AT, VP >::zero_pos_.
const surface& surface< T, AT, VP >::operator= | ( | const surface< T, AT, VP > & | rhs | ) | [inline] |
Definition at line 189 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::deletable_, surface< T, AT, VP >::h_, surface< T, AT, VP >::pitch_, surface< T, AT, VP >::set_wh(), surface< T, AT, VP >::w_, and surface< T, AT, VP >::zero_pos_.
void surface< T, AT, VP >::set_wh | ( | typename size_type::value_type | w, | |
typename size_type::value_type | h | |||
) | [inline] |
Definition at line 202 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::deletable_, surface< T, AT, VP >::h_, surface< T, AT, VP >::pitch_, surface< T, AT, VP >::w_, and surface< T, AT, VP >::zero_pos_.
Referenced by surface< T, AT, VP >::operator=().
void surface< T, AT, VP >::fill | ( | value_type | v, | |
int | x, | |||
int | y, | |||
int | w, | |||
int | h | |||
) | [inline] |
Definition at line 220 of file _surface.h.
References surface< T, AT, VP >::data_, generic_pen< T, AT >::dec_x(), surface< T, AT, VP >::get_pen(), generic_pen< T, AT >::inc_y(), generic_pen< T, AT >::put_hline(), and generic_pen< T, AT >::set_value().
Referenced by surface< T, AT, VP >::clear().
void surface< T, AT, VP >::fill | ( | value_type | v, | |
_pen & | PEN, | |||
int | w, | |||
int | h | |||
) | [inline] |
void surface< T, AT, VP >::fill | ( | value_type | v | ) | [inline] |
Definition at line 243 of file _surface.h.
References surface< T, AT, VP >::begin(), surface< T, AT, VP >::data_, generic_pen< T, AT >::dec_x(), surface< T, AT, VP >::h_, generic_pen< T, AT >::inc_y(), generic_pen< T, AT >::put_hline(), generic_pen< T, AT >::set_value(), and surface< T, AT, VP >::w_.
void surface< T, AT, VP >::blit_to | ( | _pen & | pen | ) | [inline] |
Definition at line 253 of file _surface.h.
References surface< T, AT, VP >::get_h(), and surface< T, AT, VP >::get_w().
void surface< T, AT, VP >::blit_to | ( | _pen & | DEST_PEN, | |
int | x, | |||
int | y, | |||
int | w, | |||
int | h | |||
) | [inline] |
Definition at line 257 of file _surface.h.
References generic_pen< T, AT >::dec_x(), surface< T, AT, VP >::get_pen(), generic_pen< T, AT >::get_value(), surface< T, AT, VP >::h_, generic_pen< T, AT >::inc_x(), generic_pen< T, AT >::inc_y(), and surface< T, AT, VP >::w_.
void surface< T, AT, VP >::clear | ( | ) | [inline] |
Definition at line 302 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::fill(), surface< T, AT, VP >::h_, surface< T, AT, VP >::pitch_, and surface< T, AT, VP >::w_.
iterator_x surface< T, AT, VP >::operator[] | ( | const int & | y | ) | [inline] |
Definition at line 312 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::pitch_, and surface< T, AT, VP >::zero_pos_.
const_iterator_x surface< T, AT, VP >::operator[] | ( | const int & | y | ) | const [inline] |
Definition at line 316 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::pitch_, and surface< T, AT, VP >::zero_pos_.
void surface< T, AT, VP >::flip_v | ( | ) | [inline] |
Definition at line 320 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::h_, surface< T, AT, VP >::pitch_, and surface< T, AT, VP >::zero_pos_.
bool surface< T, AT, VP >::is_valid | ( | ) | const [inline] |
Definition at line 329 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::h_, surface< T, AT, VP >::pitch_, surface< T, AT, VP >::w_, and surface< T, AT, VP >::zero_pos_.
Referenced by surface< T, AT, VP >::operator bool().
surface< T, AT, VP >::operator bool | ( | ) | const [inline] |
pen surface< T, AT, VP >::begin | ( | ) | [inline] |
Definition at line 341 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::h_, surface< T, AT, VP >::pitch_, and surface< T, AT, VP >::w_.
Referenced by surface< T, AT, VP >::fill(), and surface< T, AT, VP >::get_pen().
pen surface< T, AT, VP >::get_pen | ( | int | x, | |
int | y | |||
) | [inline] |
Definition at line 342 of file _surface.h.
References surface< T, AT, VP >::begin(), surface< T, AT, VP >::data_, and generic_pen< T, AT >::move().
Referenced by surface< T, AT, VP >::blit_to(), surface< T, AT, VP >::end(), surface< T, AT, VP >::fill(), surface< T, AT, VP >::sample_rect(), and surface< T, AT, VP >::sample_rect_clip().
pen surface< T, AT, VP >::end | ( | ) | [inline] |
Definition at line 343 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::get_pen(), surface< T, AT, VP >::h_, and surface< T, AT, VP >::w_.
const_pen surface< T, AT, VP >::begin | ( | ) | const [inline] |
Definition at line 345 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::h_, surface< T, AT, VP >::pitch_, and surface< T, AT, VP >::w_.
const_pen surface< T, AT, VP >::get_pen | ( | int | x, | |
int | y | |||
) | const [inline] |
Definition at line 346 of file _surface.h.
References surface< T, AT, VP >::begin(), surface< T, AT, VP >::data_, and generic_pen< T, AT >::move().
const_pen surface< T, AT, VP >::end | ( | ) | const [inline] |
Definition at line 347 of file _surface.h.
References surface< T, AT, VP >::data_, surface< T, AT, VP >::get_pen(), surface< T, AT, VP >::h_, and surface< T, AT, VP >::w_.
value_type surface< T, AT, VP >::linear_sample | ( | const float | x, | |
const float | y | |||
) | const [inline] |
Linear sample.
Definition at line 350 of file _surface.h.
References surface< T, AT, VP >::cooker_, f, floor_to_int(), surface< T, AT, VP >::h_, and surface< T, AT, VP >::w_.
value_type surface< T, AT, VP >::cosine_sample | ( | const float | x, | |
const float | y | |||
) | const [inline] |
Cosine sample.
Definition at line 376 of file _surface.h.
References surface< T, AT, VP >::cooker_, cos(), f, floor_to_int(), surface< T, AT, VP >::h_, and surface< T, AT, VP >::w_.
value_type surface< T, AT, VP >::cubic_sample | ( | float | x, | |
float | y | |||
) | const [inline] |
Cubic sample.
Definition at line 406 of file _surface.h.
References surface< T, AT, VP >::cooker_, f, floor(), floor_to_int(), surface< T, AT, VP >::h_, and surface< T, AT, VP >::w_.
value_type surface< T, AT, VP >::sample_rect | ( | float | x0, | |
float | y0, | |||
float | x1, | |||
float | y1 | |||
) | const [inline] |
Definition at line 488 of file _surface.h.
References surface< T, AT, VP >::cooker_, generic_pen< T, AT >::dec_x(), floor(), surface< T, AT, VP >::get_pen(), generic_pen< T, AT >::get_value(), generic_pen< T, AT >::inc_x(), and generic_pen< T, AT >::inc_y().
value_type surface< T, AT, VP >::sample_rect_clip | ( | float | x0, | |
float | y0, | |||
float | x1, | |||
float | y1 | |||
) | const [inline] |
Definition at line 554 of file _surface.h.
References surface< T, AT, VP >::cooker_, floor(), surface< T, AT, VP >::get_h(), surface< T, AT, VP >::get_pen(), and surface< T, AT, VP >::get_w().
value_type* surface< T, AT, VP >::data_ [private] |
Definition at line 78 of file _surface.h.
Referenced by surface< T, AT, VP >::begin(), surface< T, AT, VP >::clear(), surface< T, AT, VP >::end(), surface< T, AT, VP >::fill(), surface< T, AT, VP >::flip_v(), surface< T, AT, VP >::get_pen(), surface< T, AT, VP >::is_valid(), surface< T, AT, VP >::mirror(), surface< T, AT, VP >::operator=(), surface< T, AT, VP >::operator[](), surface< T, AT, VP >::set_wh(), surface< T, AT, VP >::surface(), surface< T, AT, VP >::swap(), and surface< T, AT, VP >::~surface().
value_type* surface< T, AT, VP >::zero_pos_ [private] |
Definition at line 79 of file _surface.h.
Referenced by surface< T, AT, VP >::flip_v(), surface< T, AT, VP >::is_valid(), surface< T, AT, VP >::mirror(), surface< T, AT, VP >::operator=(), surface< T, AT, VP >::operator[](), surface< T, AT, VP >::set_wh(), surface< T, AT, VP >::surface(), and surface< T, AT, VP >::swap().
difference_type::value_type surface< T, AT, VP >::pitch_ [private] |
Definition at line 80 of file _surface.h.
Referenced by surface< T, AT, VP >::begin(), surface< T, AT, VP >::clear(), surface< T, AT, VP >::flip_v(), surface< T, AT, VP >::get_pitch(), surface< T, AT, VP >::is_valid(), surface< T, AT, VP >::mirror(), surface< T, AT, VP >::operator=(), surface< T, AT, VP >::operator[](), surface< T, AT, VP >::set_wh(), surface< T, AT, VP >::surface(), and surface< T, AT, VP >::swap().
int surface< T, AT, VP >::w_ [private] |
Definition at line 81 of file _surface.h.
Referenced by surface< T, AT, VP >::begin(), surface< T, AT, VP >::blit_to(), surface< T, AT, VP >::clear(), surface< T, AT, VP >::cosine_sample(), surface< T, AT, VP >::cubic_sample(), surface< T, AT, VP >::end(), surface< T, AT, VP >::fill(), surface< T, AT, VP >::get_w(), surface< T, AT, VP >::is_valid(), surface< T, AT, VP >::linear_sample(), surface< T, AT, VP >::mirror(), surface< T, AT, VP >::operator=(), surface< T, AT, VP >::set_wh(), surface< T, AT, VP >::size(), surface< T, AT, VP >::surface(), and surface< T, AT, VP >::swap().
int surface< T, AT, VP >::h_ [private] |
Definition at line 81 of file _surface.h.
Referenced by surface< T, AT, VP >::begin(), surface< T, AT, VP >::blit_to(), surface< T, AT, VP >::clear(), surface< T, AT, VP >::cosine_sample(), surface< T, AT, VP >::cubic_sample(), surface< T, AT, VP >::end(), surface< T, AT, VP >::fill(), surface< T, AT, VP >::flip_v(), surface< T, AT, VP >::get_h(), surface< T, AT, VP >::is_valid(), surface< T, AT, VP >::linear_sample(), surface< T, AT, VP >::mirror(), surface< T, AT, VP >::operator=(), surface< T, AT, VP >::set_wh(), surface< T, AT, VP >::size(), surface< T, AT, VP >::surface(), and surface< T, AT, VP >::swap().
bool surface< T, AT, VP >::deletable_ [private] |
Definition at line 82 of file _surface.h.
Referenced by surface< T, AT, VP >::mirror(), surface< T, AT, VP >::operator=(), surface< T, AT, VP >::set_wh(), surface< T, AT, VP >::surface(), surface< T, AT, VP >::swap(), and surface< T, AT, VP >::~surface().
value_prep_type surface< T, AT, VP >::cooker_ [private] |
Definition at line 84 of file _surface.h.
Referenced by surface< T, AT, VP >::cosine_sample(), surface< T, AT, VP >::cubic_sample(), surface< T, AT, VP >::linear_sample(), surface< T, AT, VP >::sample_rect(), and surface< T, AT, VP >::sample_rect_clip().