void text_clipped(PixelScalar x, PixelScalar y, const PixelRect &rc, const TCHAR *text) { // XXX if (x < rc.right) text_clipped(x, y, rc.right - x, text); }
void Canvas::text_clipped(int x, int y, unsigned width, const TCHAR *text) { const SIZE size = text_size(text); RECT rc; ::SetRect(&rc, x, y, x + min(width, (unsigned)size.cx), y + size.cy); text_clipped(x, y, rc, text); }
void Canvas::text_clipped(PixelScalar x, PixelScalar y, UPixelScalar width, const TCHAR *text) { const PixelSize size = CalcTextSize(text); PixelRect rc; ::SetRect(&rc, x, y, x + min(width, (UPixelScalar)size.cx), y + size.cy); text_clipped(x, y, rc, text); }