Skip to content

Commit

Permalink
implemented area preview
Browse files Browse the repository at this point in the history
  • Loading branch information
loonsies committed Oct 20, 2023
1 parent c004e8d commit 2279fe7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion srcs/subtitlesWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ LRESULT CALLBACK subtitlesWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
graphics.SetInterpolationMode(Gdiplus::InterpolationModeHighQualityBicubic);
graphics.Clear(Gdiplus::Color(0, 0, 0, 0));

if (config.areaPreview)
{
Gdiplus::Pen outlinePen(Gdiplus::Color(255, 0, 0), 4);
graphics.DrawRectangle(&outlinePen, rect);
}
text.TextOutline(fontColor, outlineColor, config.outlineWidth);
text.EnableShadow(true);
if (config.shadowsDiffuse)
Expand All @@ -57,7 +62,7 @@ LRESULT CALLBACK subtitlesWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
POINT ptSrc = { 0, 0 };
UpdateLayeredWindow(hwnd, hdc, &ptLocation, &szWnd, memdc, &ptSrc, 0, &blend, ULW_ALPHA);
SelectObject(hdc, original);

DeleteObject(bmp);
DeleteObject(memdc);
}
Expand Down

0 comments on commit 2279fe7

Please sign in to comment.