| 372 | return result; |
| 373 | } |
| 374 | HBITMAP WINAPI CaptionTextHandler::MyCreateBitmap( |
| 375 | int nWidth, |
| 376 | int nHeight, |
| 377 | [[maybe_unused]] UINT nPlanes, |
| 378 | [[maybe_unused]] UINT nBitCount, |
| 379 | [[maybe_unused]] const void* lpBits |
| 380 | ) |
| 381 | { |
| 382 | if (!g_textVisual) |
| 383 | { |
| 384 | return g_CreateBitmap_Org(nWidth, nHeight, nPlanes, nBitCount, lpBits); |
| 385 | } |
| 386 | |
| 387 | g_textSize = { nWidth, nHeight }; |
| 388 | nWidth += g_textGlowSize * 2; |
| 389 | nHeight += g_textGlowSize * 2; |
| 390 | |
| 391 | PVOID bits{ nullptr }; |
| 392 | BITMAPINFO bitmapInfo{ {sizeof(bitmapInfo.bmiHeader), nWidth, -nHeight, 1, 32, BI_RGB} }; |
| 393 | HBITMAP bitmap{ CreateDIBSection(nullptr, &bitmapInfo, DIB_RGB_COLORS, &bits, nullptr, 0) }; |
| 394 | memset(bits, 0, sizeof(nWidth * nHeight * 4)); |
| 395 | |
| 396 | return bitmap; |
| 397 | } |
| 398 | HRESULT CaptionTextHandler::MyIWICImagingFactory2_CreateBitmapFromHBITMAP( |
| 399 | IWICImagingFactory2* This, |
| 400 | HBITMAP hBitmap, |
nothing calls this directly
no outgoing calls
no test coverage detected