Skip to content

Commit

Permalink
Remove gaps in veritical bars when using Car stipple shape
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Oct 7, 2023
1 parent 8a6b2e4 commit 731f71f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/graphs/barchart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1439,6 +1439,12 @@ namespace Wisteria::Graphs
L"Non-rectangular shapes not currently "
"supported with stipple bar effect.");
auto shapeHeight{ barWidth };
// These particular icons are drawn with a ratio where the height
// is 75% of the width if the drawing area is square. To prevent
// having large gaps between the icons, adjust the height of the icons'
// drawing areas so that they aren't drawn inside of squares.
if (GetStippleShape() == Icons::IconShape::Car)
{ shapeHeight *= 0.75; }
auto currentYTop = lineYStart - shapeHeight;
while ((currentYTop + shapeHeight) > lineYEnd)
{
Expand Down

0 comments on commit 731f71f

Please sign in to comment.