ETL  0.04.19
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
surface< T, AT, VP > Class Template Reference

#include <_surface.h>

Public Types

typedef T value_type
typedef AT accumulator_type
typedef value_typepointer
typedef accumulator_typeaccumulator_pointer
typedef const value_typeconst_pointer
typedef const accumulator_typeconst_accumulator_pointer
typedef value_typereference
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_penconst_alpha_pen
typedef alpha_pen< pennon_const_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 (value_type *data, int w, int h, typename difference_type::value_type pitch, 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 surfacemirror (const surface &rhs)
const surfaceoperator= (const surface &rhs)
void copy (const surface &rhs)
void set_wh (typename size_type::value_type w, typename size_type::value_type h, const typename size_type::value_type &pitch=0)
void set_wh (typename size_type::value_type w, typename size_type::value_type h, unsigned char *newdata, const typename size_type::value_type &pitch)
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 linear_sample_cooked (const float x, const float y) const
 Linear sample for already "cooked" surfaces.
value_type cosine_sample (const float x, const float y) const
 Cosine sample.
value_type cosine_sample_cooked (const float x, const float y) const
 Cosine sample for already "cooked" surfaces.
value_type cubic_sample (float x, float y) const
 Cubic sample.
value_type cubic_sample_cooked (float x, float y) const
 Cubic sample for already "cooked" surfaces.
value_type sample_rect (float x0, float y0, float x1, float y1) const
 Rectangle sample.
value_type sample_rect_cooked (float x0, float y0, float x1, float y1) const
 Rectangle sample for already "cooked" surfaces.
value_type sample_rect_clip (float x0, float y0, float x1, float y1) const
 Rectangle sample clipped.
value_type sample_rect_clip_cooked (float x0, float y0, float x1, float y1) const
 Rectangle sample clipped for already "cooked" surfaces.

Private Member Functions

void swap (const surface &x)

Private Attributes

value_typedata_
value_typezero_pos_
difference_type::value_type pitch_
int w_
int h_
bool deletable_
value_prep_type cooker_

Detailed Description

template<typename T, typename AT = T, class VP = value_prep<T,AT>>
class surface< T, AT, VP >

Definition at line 56 of file _surface.h.

Member Typedef Documentation

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef T surface< T, AT, VP >::value_type

Definition at line 59 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef AT surface< T, AT, VP >::accumulator_type

Definition at line 60 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef value_type* surface< T, AT, VP >::pointer

Definition at line 61 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef accumulator_type* surface< T, AT, VP >::accumulator_pointer

Definition at line 62 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef const value_type* surface< T, AT, VP >::const_pointer

Definition at line 63 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef const accumulator_type* surface< T, AT, VP >::const_accumulator_pointer

Definition at line 64 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef value_type& surface< T, AT, VP >::reference

Definition at line 65 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef generic_pen<value_type,accumulator_type> surface< T, AT, VP >::pen

Definition at line 66 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef generic_pen<const value_type,accumulator_type> surface< T, AT, VP >::const_pen

Definition at line 67 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef VP surface< T, AT, VP >::value_prep_type

Definition at line 68 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef alpha_pen<const_pen> surface< T, AT, VP >::const_alpha_pen

Definition at line 70 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef alpha_pen<pen> surface< T, AT, VP >::non_const_alpha_pen

Definition at line 71 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef pen::difference_type surface< T, AT, VP >::size_type

Definition at line 73 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef pen::difference_type surface< T, AT, VP >::difference_type

Definition at line 74 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef pen::iterator_x surface< T, AT, VP >::iterator_x

Definition at line 76 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef pen::iterator_y surface< T, AT, VP >::iterator_y

Definition at line 77 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef pen::const_iterator_x surface< T, AT, VP >::const_iterator_x

Definition at line 78 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
typedef pen::const_iterator_y surface< T, AT, VP >::const_iterator_y

Definition at line 79 of file _surface.h.

Constructor & Destructor Documentation

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
surface< T, AT, VP >::surface ( )
inline

Definition at line 101 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
surface< T, AT, VP >::surface ( value_type data,
int  w,
int  h,
bool  deletable = false 
)
inline

Definition at line 108 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
surface< T, AT, VP >::surface ( value_type data,
int  w,
int  h,
typename difference_type::value_type  pitch,
bool  deletable = false 
)
inline

Definition at line 115 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
surface< T, AT, VP >::surface ( const typename size_type::value_type w,
const typename size_type::value_type h 
)
inline

Definition at line 122 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
surface< T, AT, VP >::surface ( const size_type s)
inline

Definition at line 129 of file _surface.h.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
template<typename _pen >
surface< T, AT, VP >::surface ( const _pen &  _begin,
const _pen &  _end 
)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
surface< T, AT, VP >::surface ( const surface< T, AT, VP > &  s)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
surface< T, AT, VP >::~surface ( )
inline

Definition at line 172 of file _surface.h.

References surface< T, AT, VP >::data_, and surface< T, AT, VP >::deletable_.

Member Function Documentation

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
void surface< T, AT, VP >::swap ( const surface< T, AT, VP > &  x)
inlineprivate
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
size_type surface< T, AT, VP >::size ( ) const
inline

Definition at line 179 of file _surface.h.

References surface< T, AT, VP >::h_, and surface< T, AT, VP >::w_.

Referenced by surface< T, AT, VP >::surface().

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
size_type::value_type surface< T, AT, VP >::get_pitch ( ) const
inline

Definition at line 182 of file _surface.h.

References surface< T, AT, VP >::pitch_.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
size_type::value_type surface< T, AT, VP >::get_w ( ) const
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
size_type::value_type surface< T, AT, VP >::get_h ( ) const
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
const surface& surface< T, AT, VP >::mirror ( const surface< T, AT, VP > &  rhs)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
const surface& surface< T, AT, VP >::operator= ( const surface< T, AT, VP > &  rhs)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
void surface< T, AT, VP >::copy ( const surface< T, AT, VP > &  rhs)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
void surface< T, AT, VP >::set_wh ( typename size_type::value_type  w,
typename size_type::value_type  h,
const typename size_type::value_type pitch = 0 
)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
void surface< T, AT, VP >::set_wh ( typename size_type::value_type  w,
typename size_type::value_type  h,
unsigned char *  newdata,
const typename size_type::value_type pitch 
)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
void surface< T, AT, VP >::fill ( value_type  v,
int  x,
int  y,
int  w,
int  h 
)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
template<class _pen >
void surface< T, AT, VP >::fill ( value_type  v,
_pen &  PEN,
int  w,
int  h 
)
inline

Definition at line 268 of file _surface.h.

References surface< T, AT, VP >::data_.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
void surface< T, AT, VP >::fill ( value_type  v)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
template<class _pen >
void surface< T, AT, VP >::blit_to ( _pen &  pen)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
template<class _pen >
void surface< T, AT, VP >::blit_to ( _pen &  DEST_PEN,
int  x,
int  y,
int  w,
int  h 
)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
void surface< T, AT, VP >::clear ( )
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
iterator_x surface< T, AT, VP >::operator[] ( const int &  y)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
const_iterator_x surface< T, AT, VP >::operator[] ( const int &  y) const
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
void surface< T, AT, VP >::flip_v ( )
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
bool surface< T, AT, VP >::is_valid ( ) const
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
surface< T, AT, VP >::operator bool ( ) const
inline

Definition at line 375 of file _surface.h.

References surface< T, AT, VP >::is_valid().

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
pen surface< T, AT, VP >::begin ( )
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
pen surface< T, AT, VP >::get_pen ( int  x,
int  y 
)
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
pen surface< T, AT, VP >::end ( )
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
const_pen surface< T, AT, VP >::begin ( ) const
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
const_pen surface< T, AT, VP >::get_pen ( int  x,
int  y 
) const
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
const_pen surface< T, AT, VP >::end ( ) const
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_type surface< T, AT, VP >::linear_sample ( const float  x,
const float  y 
) const
inline

Linear sample.

Definition at line 386 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_.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_type surface< T, AT, VP >::linear_sample_cooked ( const float  x,
const float  y 
) const
inline

Linear sample for already "cooked" surfaces.

Definition at line 412 of file _surface.h.

References f, floor_to_int(), h, surface< T, AT, VP >::h_, and surface< T, AT, VP >::w_.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_type surface< T, AT, VP >::cosine_sample ( const float  x,
const float  y 
) const
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_type surface< T, AT, VP >::cosine_sample_cooked ( const float  x,
const float  y 
) const
inline

Cosine sample for already "cooked" surfaces.

Definition at line 471 of file _surface.h.

References cos(), f, floor_to_int(), h, surface< T, AT, VP >::h_, and surface< T, AT, VP >::w_.

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_type surface< T, AT, VP >::cubic_sample ( float  x,
float  y 
) const
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_type surface< T, AT, VP >::cubic_sample_cooked ( float  x,
float  y 
) const
inline

Cubic sample for already "cooked" surfaces.

Definition at line 587 of file _surface.h.

References f, and floor().

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_type surface< T, AT, VP >::sample_rect ( float  x0,
float  y0,
float  x1,
float  y1 
) const
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_type surface< T, AT, VP >::sample_rect_cooked ( float  x0,
float  y0,
float  x1,
float  y1 
) const
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_type surface< T, AT, VP >::sample_rect_clip ( float  x0,
float  y0,
float  x1,
float  y1 
) const
inline
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_type surface< T, AT, VP >::sample_rect_clip_cooked ( float  x0,
float  y0,
float  x1,
float  y1 
) const
inline

Member Data Documentation

template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_type* surface< T, AT, VP >::data_
private
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_type* surface< T, AT, VP >::zero_pos_
private
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
difference_type::value_type surface< T, AT, VP >::pitch_
private
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
int surface< T, AT, VP >::w_
private
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
int surface< T, AT, VP >::h_
private
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
bool surface< T, AT, VP >::deletable_
private
template<typename T , typename AT = T, class VP = value_prep<T,AT>>
value_prep_type surface< T, AT, VP >::cooker_
private

The documentation for this class was generated from the following file: