20 #ifndef AGG_COLOR_CONV_INCLUDED 21 #define AGG_COLOR_CONV_INCLUDED 24 #include "agg_basics.h" 25 #include "agg_rendering_buffer.h" 34 template<
class RenBuf,
class CopyRow>
35 void color_conv(RenBuf* dst,
const RenBuf* src, CopyRow copy_row_functor)
37 unsigned width = src->width();
38 unsigned height = src->height();
40 if(dst->width() < width) width = dst->width();
41 if(dst->height() < height) height = dst->height();
46 for(y = 0; y < height; y++)
48 copy_row_functor(dst->row_ptr(0, y, width),
57 template<
class CopyRow>
58 void color_conv_row(int8u* dst,
61 CopyRow copy_row_functor)
63 copy_row_functor(dst, src, width);
71 void operator () (int8u* dst,
75 std::memmove(dst, src, width*BPP);
81 template<
class DstFormat,
class SrcFormat>
84 void operator()(
void* dst,
const void* src)
const 87 DstFormat::write_plain_color(dst, SrcFormat::read_plain_color(src));
92 template<
class DstFormat,
class SrcFormat>
95 void operator()(
void* dst,
const void* src,
unsigned width)
const 101 dst = (int8u*)dst + DstFormat::pix_width;
102 src = (int8u*)src + SrcFormat::pix_width;
109 template<
class Format>
112 void operator()(
void* dst,
const void* src,
unsigned width)
const 114 std::memmove(dst, src, width * Format::pix_width);
119 template<
class DstFormat,
class SrcFormat,
class RenBuf>
120 void convert(RenBuf* dst,
const RenBuf* src)