Skip to content

Commit

Permalink
fix: anti aliased history trail dots
Browse files Browse the repository at this point in the history
The dots were no longer antialiased as the drawing had been moved inside
a GDC container, which removed the AA settings.

This change fixes the issue by setting AA in the right place.
  • Loading branch information
AndyTWF committed Jul 10, 2023
1 parent 454183e commit cd66452
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/plugin/historytrail/HistoryTrailRenderer.cpp
Expand Up @@ -257,9 +257,6 @@ namespace UKControllerPlugin::HistoryTrail {
this->pen->SetColor(currentColourArgb);
this->brush->SetColor(currentColourArgb);

// Anti aliasing
graphics.SetAntialias(this->antialiasedTrails);

// The dot we are to make.
Gdiplus::RectF dot;

Expand Down Expand Up @@ -316,9 +313,11 @@ namespace UKControllerPlugin::HistoryTrail {

if (this->rotatedDots) {
graphics.Rotated(static_cast<Gdiplus::REAL>(position->heading), [&graphics, &dot, this]() {
graphics.SetAntialias(this->antialiasedTrails);
this->drawDot(graphics, dot);
});
} else {
graphics.SetAntialias(this->antialiasedTrails);
this->drawDot(graphics, dot);
}
});
Expand Down

0 comments on commit cd66452

Please sign in to comment.