MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / FillGradient

Function FillGradient

src/windows/WinUtils.cpp:570–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

568}
569
570void FillGradient(HDC hdc, const LPRECT lpRect, int sci1, int sci2, bool vertical)
571{
572 if (!HasGradientCaption()) {
573 if (sci1 == COLOR_GRADIENTACTIVECAPTION)
574 sci1 = COLOR_ACTIVECAPTION;
575 if (sci1 == COLOR_GRADIENTINACTIVECAPTION)
576 sci1 = COLOR_INACTIVECAPTION;
577 }
578 if (ri::HaveMsImg()) {
579 COLORREF c1 = GetSysColor(sci1);
580 COLORREF c2 = GetSysColor(sci2);
581 FillGradientColors(hdc, lpRect, c1, c2, vertical);
582 }
583 else {
584 HBRUSH hbr = ri::GetSysColorBrush(sci1);
585 FillRect(hdc, lpRect, hbr);
586 }
587}
588
589void FillGradientColors(HDC hdc, const LPRECT lpRect, COLORREF c1, COLORREF c2, bool vertical)
590{

Callers 3

DrawButtonMethod · 0.85
WndProcMethod · 0.85
DrawRoleMethod · 0.85

Calls 2

HasGradientCaptionFunction · 0.85
FillGradientColorsFunction · 0.85

Tested by

no test coverage detected