harshagomes wrote:

//the function
void draw_bitmap( FT_Bitmap*  bitmap, FT_Int x, FT_Int y )
{
    FT_Int  i, j, p, q;
    FT_Int  x_max = x + bitmap->width;
    FT_Int  y_max = y + bitmap->rows;

    for ( i = x, p = 0; i < x_max; i++, p++ )
    {
      for ( j = y, q = 0; j < y_max; j++, q++ )
      {
         if ( i < 0      || j < 0       ||
              i >= width || j >= height )
                         continue;
        else
{ BYTE r = bitmap->buffer[q * bitmap->width + p];
                BYTE g = bitmap->buffer[q * bitmap->width + p];
                BYTE b = bitmap->buffer[q * bitmap->width + p];
                BYTE a = 255;
RGBQUAD colorbit = { r,g,b,a }; OutputBuffer[ i ][ j ] = colorbit; }
      }
   }
}



as explained, if i try to blit the 'OutputBuffer' onto the window DC, am
gettin the texts crumpled..

i really cant figure out the reason why am getting like this..
am struck up with this for quite some time... so pls help...
thanks.

"q * bitmap->width" may be the problem. You should be using "bitmap->pitch".





_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to