Skip to content

Commit

Permalink
#187 Turn on antialiasing for all track elements for excellent image …
Browse files Browse the repository at this point in the history
…quality
  • Loading branch information
dmh23 committed Mar 14, 2023
1 parent 0957c3a commit 1d9d4a2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions src/graphics/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ def paintEvent(self, event):
super().paintEvent(event)

def _recreate_scene(self):
# print("REDRAW***", self._width, self._height)

pixmap = QPixmap(self._width, self._height)
pixmap.fill(self._background_colour)
painter = QPainter(pixmap)
painter.setRenderHint(QPainter.RenderHint.Antialiasing)
self._paint(painter)
painter.end()

Expand Down
1 change: 0 additions & 1 deletion src/graphics/track_analysis_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def __init__(self, point: Point, diameter: int, colour: Qt.GlobalColor):
self._brush.setStyle(Qt.BrushStyle.SolidPattern)

def paint(self, painter: QPainter, scale: Scale):
painter.setRenderHint(QPainter.RenderHint.Antialiasing)
x, y = scale.apply(self._point)
painter.setPen(self._pen)
painter.setBrush(self._brush)
Expand Down

0 comments on commit 1d9d4a2

Please sign in to comment.