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

Function MdDrawCodeBackground

src/windows/TextInterface_Win32.cpp:276–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276void MdDrawCodeBackground(DrawingContext* context, const Rect& rect)
277{
278 RECT rc = RectToNative(rect);
279
280 if (context->m_bInvertTextColor) {
281 COLORREF old = ri::SetDCBrushColor(context->m_hdc, context->InvertIfNeeded(GetSysColor(COLOR_WINDOW)));
282 FillRect(context->m_hdc, &rc, ri::GetDCBrush());
283 ri::SetDCBrushColor(context->m_hdc, old);
284 }
285 else {
286 FillRect(context->m_hdc, &rc, ri::GetSysColorBrush(COLOR_WINDOW));
287 }
288
289 ri::DrawEdge(context->m_hdc, &rc, BDR_SUNKEN, BF_RECT);
290}
291
292void MdDrawForwardBackground(DrawingContext* context, const Rect& rect)
293{

Callers 1

DrawMethod · 0.85

Calls 2

RectToNativeFunction · 0.85
InvertIfNeededMethod · 0.45

Tested by

no test coverage detected