File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,12 @@ using namespace Microsoft::Console::Render;
273
273
rect.right = std::accumulate (advancesSpan.cbegin (), advancesSpan.cend (), rect.right );
274
274
275
275
// Clip all drawing in this glyph run to where we expect.
276
- d2dContext->PushAxisAlignedClip (rect, D2D1_ANTIALIAS_MODE_PER_PRIMITIVE);
276
+ // We need the AntialiasMode here to be Aliased to ensure
277
+ // that background boxes line up with each other and don't leave behind
278
+ // stray colors.
279
+ // See GH#3626 for more details.
280
+ d2dContext->PushAxisAlignedClip (rect, D2D1_ANTIALIAS_MODE_ALIASED);
281
+
277
282
// Ensure we pop it on the way out
278
283
auto popclip = wil::scope_exit ([&d2dContext]() noexcept {
279
284
d2dContext->PopAxisAlignedClip ();
Original file line number Diff line number Diff line change @@ -533,6 +533,11 @@ void DxEngine::_ComputePixelShaderSettings() noexcept
533
533
&props,
534
534
&_d2dRenderTarget));
535
535
536
+ // We need the AntialiasMode for non-text object to be Aliased to ensure
537
+ // that background boxes line up with each other and don't leave behind
538
+ // stray colors.
539
+ // See GH#3626 for more details.
540
+ _d2dRenderTarget->SetAntialiasMode (D2D1_ANTIALIAS_MODE_ALIASED);
536
541
_d2dRenderTarget->SetTextAntialiasMode (_antialiasingMode);
537
542
538
543
RETURN_IF_FAILED (_d2dRenderTarget->CreateSolidColorBrush (D2D1::ColorF (D2D1::ColorF::DarkRed),
You can’t perform that action at this time.
0 commit comments