21 #include "ShaderDraw.h" 27 template<
typename Pixel>
42 inline ShaderRepeat(
const std::vector<Pixel>& f,
int max_x,
int max_y):
43 _base(f, max_x, max_y)
48 inline void setOffset(
int x,
int y)
53 inline void addOffset(
int x,
int y)
64 template<
typename Pixel>
67 typedef typename ShaderRepeat<Pixel>::PixelPtr PixelPtr;
68 typedef typename ShaderRepeat<Pixel>::PixelRef PixelRef;
91 _range_domain(f.getDomain()),
95 _size_x(_range_domain.size_x()),
96 _size_y(_range_domain.size_y()),
118 inline void mod_y(
int&,
int&)
120 _curr_y = ( _range_image.beg_y - _off_y)%_size_y;
125 inline void set_y(
const int& begin,
const int&)
127 _curr_y = (_curr_y + begin)%_size_y;
128 _ptr_curr_y += (_range_domain.beg_y+_curr_y)*_pitch;
133 _ptr_curr_y += _pitch;
134 if (_curr_y == _size_y)
137 _ptr_curr_y -= _size_y*_pitch;
142 inline void mod_x(
int&,
int&)
144 _curr_x = ( _range_image.beg_x - _off_x)%_size_x;
147 _ptr_curr_x = _ptr_curr_y;
149 inline void set_x(
const int& begin,
const int&)
151 _curr_x = (_curr_x + begin)%_size_x;
152 _ptr_curr_x += _range_domain.beg_x +_curr_x;
158 if (_curr_x == _size_x)
161 _ptr_curr_x -= _size_x;
165 inline PixelRef get_ref()
helper class for handling implementation differences in different surfaces types Used in function Sha...
Definition: ShaderDrawHelper.h:416
This is surface argument to ShaderDraw.
Definition: ShaderDrawHelper.h:136
Definition: ShaderRepeat.h:28
void set_range(const GraphSubset &g)
set final drawing range.
Element that is blit (rendered) onto the screen.
Definition: Surface.h:38
Definition: GraphSubset.h:32
This is surface argument to ShaderDraw.
Definition: ShaderDrawHelper.h:60
void mod_range(GraphSubset &g)
function used only when SurfaceType is used as source surface.
Definition: BaseInfoState.cpp:40