Skip to content

Commit

Permalink
Merge pull request #531 from AndyTWF/history-trail-fill-fix
Browse files Browse the repository at this point in the history
History trail fill fix
  • Loading branch information
AndyTWF authored Jul 10, 2023
2 parents cc51209 + cd66452 commit 0a15aea
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/plugin/historytrail/HistoryTrailRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace UKControllerPlugin::HistoryTrail {
this->reducePerDot = (this->historyTrailDotSizeFloat / this->historyTrailLength) / 2;

// Load the dot drawing function
this->drawDot = this->GetDrawDotFunction();
this->drawDot = this->GetDoDotFunction();
}

/*
Expand Down Expand Up @@ -118,7 +118,7 @@ namespace UKControllerPlugin::HistoryTrail {
this->reducePerDot = (this->historyTrailDotSizeFloat / this->historyTrailLength) / 2;

// Change the rendering function
this->drawDot = this->GetDrawDotFunction();
this->drawDot = this->GetDoDotFunction();
}

/*
Expand Down 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 0a15aea

Please sign in to comment.