osd->DrawText with \n and \t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello
I have some questions about the DrawText from the osd.
Is there any possibility to use newlines(\n) or tabs(\t)?
I have looked at the source and I found this method(part of 
cBitmap::DrawText):

     while (s && *s) {
           const cFont::tCharData *CharData = Font->CharData(*s++);
           if (limit && int(x + CharData->width) > limit)
              break; // we don't draw partial characters
           if (int(x + CharData->width) > 0) {
              for (int row = 0; row < h; row++) {
                  cFont::tPixelData PixelData = CharData->lines[row];
                  for (int col = CharData->width; col-- > 0; ) {
                      if (ColorBg != clrTransparent || (PixelData & 1))
                         SetIndex(x + col, y + row, (PixelData & 1) ? fg 
: bg);
                      PixelData >>= 1;
                      }
                  }
              }
           x += CharData->width;
           if (x > width - 1)
              break;
           }
     }


If there i no other possibility to use text over two lines i would like 
to patch the code, but maybe there is an other way....
I need \n but maybe \t would be nice too.

Greetings
Patrick


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux