Ejemplo n.º 1
0
  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);
  }
Ejemplo n.º 2
0
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);
}
Ejemplo n.º 3
0
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);
}