diff options
Diffstat (limited to 'src/subway_map.cpp')
-rw-r--r-- | src/subway_map.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/subway_map.cpp b/src/subway_map.cpp index f00f03f..94292fd 100644 --- a/src/subway_map.cpp +++ b/src/subway_map.cpp | |||
@@ -611,7 +611,18 @@ void SubwayMap::Redraw() { | |||
611 | if (draw_type == ItemDrawType::kBox) { | 611 | if (draw_type == ItemDrawType::kBox) { |
612 | gcdc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1)); | 612 | gcdc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1)); |
613 | gcdc.SetBrush(*brush_color); | 613 | gcdc.SetBrush(*brush_color); |
614 | gcdc.DrawRectangle(real_area_pos, {real_area_size, real_area_size}); | 614 | |
615 | if (subway_item.tilted) { | ||
616 | constexpr int AREA_TILTED_SIDE = | ||
617 | static_cast<int>(AREA_ACTUAL_SIZE / 1.41421356237); | ||
618 | const wxPoint poly_points[] = {{AREA_TILTED_SIDE, 0}, | ||
619 | {2 * AREA_TILTED_SIDE, AREA_TILTED_SIDE}, | ||
620 | {AREA_TILTED_SIDE, 2 * AREA_TILTED_SIDE}, | ||
621 | {0, AREA_TILTED_SIDE}}; | ||
622 | gcdc.DrawPolygon(4, poly_points, subway_item.x, subway_item.y); | ||
623 | } else { | ||
624 | gcdc.DrawRectangle(real_area_pos, {real_area_size, real_area_size}); | ||
625 | } | ||
615 | } else if (draw_type == ItemDrawType::kOwl || draw_type == ItemDrawType::kOwlExit) { | 626 | } else if (draw_type == ItemDrawType::kOwl || draw_type == ItemDrawType::kOwlExit) { |
616 | gcdc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1)); | 627 | gcdc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1)); |
617 | gcdc.SetBrush(*brush_color); | 628 | gcdc.SetBrush(*brush_color); |