StretchBlt - logical units ?
-
Hello, Do you know what it means logical units at the help (MSDN) of StretchBlt ? I found problem to define to origin at this function... Thanks! :confused:
-
Hello, Do you know what it means logical units at the help (MSDN) of StretchBlt ? I found problem to define to origin at this function... Thanks! :confused:
-
you better post the link :) I got the documentation about Windows GDI . Without knowing anything I guess origin (0,0) is the top left corner of the window, and logical coordinates are pixels.
-
Hello, Do you know what it means logical units at the help (MSDN) of StretchBlt ? I found problem to define to origin at this function... Thanks! :confused:
Do you want to print any thing?
-
Do you want to print any thing?
Hello, I want to draw a BYTE* array on the screen by creating a bitmap and use StrechBlt function. The problem was that the origin point was not (top, left) but (bottom, left). I thought that it may be the StrechBlt function but finally I found that the problem is the creation of the bitmap from the BYTE* array. The fix is: m_bitmapInfo.bmiHeader.biHeight = -m_nImageHeight; // top-down DIB The height should be -. // Populate bitmapinfo header m_bitmapInfo.bmiHeader.biSize = m_nBitmapInfoSize; m_bitmapInfo.bmiHeader.biWidth = m_nImageWidth; m_bitmapInfo.bmiHeader.biHeight = -m_nImageHeight; // top-down DIB m_bitmapInfo.bmiHeader.biPlanes = 1; m_bitmapInfo.bmiHeader.biBitCount = BPP; m_bitmapInfo.bmiHeader.biSizeImage = m_nImageSize; m_bitmapInfo.bmiHeader.biCompression = BI_RGB; m_bitmapInfo.bmiHeader.biClrImportant = 0; m_bitmapInfo.bmiHeader.biClrUsed = 0; m_bitmapInfo.bmiHeader.biXPelsPerMeter = 0; m_bitmapInfo.bmiHeader.biYPelsPerMeter = 0; Thanks for all!