30 using namespace ystdex;
34 using namespace Drawing;
42 const u8 BLT_TEXT_ALPHA_THRESHOLD(16);
45 template<
bool _bPositiveScan>
50 operator()(
int delta_x,
int delta_y,
52 int dst_inc,
int src_inc)
54 for(; delta_y > 0; --delta_y)
56 for(
int x(0); x < delta_x; ++x)
58 if(*src_iter >= BLT_TEXT_ALPHA_THRESHOLD)
60 *dst_iter = char_color);
61 yunseq(++src_iter, xcrease<_bPositiveScan>(dst_iter));
64 delta_assign<_bPositiveScan>(dst_iter, dst_inc);
75 YAssert(cbuf,
"Invalid buffer found.");
83 const Size& ss,
u8* alpha)
85 YAssert(cbuf,
"Invalid buffer found.");
89 pc.Target.GetBufferPtr(), alpha), cbuf, ss, pc);
104 const int max_w(GetBufferWidthN() - 1),
105 space_w(ts.GetCache().GetAdvance(
' '));
108 return line_breaks_l = 1;
110 if(
YB_UNLIKELY(ts.Pen.X + ts.Font.GetAdvance(c) > eol))