Commit graph

5 commits

Author SHA1 Message Date
Marcus Rowe
d937289a1c Add Tile Viewer Window 2017-10-29 21:22:42 +10:00
Marcus Rowe
9965d45a4e Use cosmetic QPen in ImageGridWidget
This is the proper method of drawing lines with a constant width that is
independent of the QPainter transformation.
2017-06-06 17:43:27 +10:00
Marcus Rowe
6faffa76f6 Fix drawSelectedCell for hi-dpi displays
Optiroc has mentioned that the selected tile box's position and size is
multiplied by two on his Mac. This is caused by either
`painter->combinedTransform()` returning the wrong value for hi-dpi
displays or `painter->resetTransform()` not working as expected on
hi-dpi displays.

The new code does not call `painter->resetTransform()` but instead sets
the pen width and cell adjust to the inverse of the zoom, which cancels
out the transform and should render as one pixel to the user.
2017-03-17 23:30:46 +10:00
Marcus Rowe
9b146b4235 Add grid cell selection to ImageGridWidget 2017-03-16 20:41:47 +10:00
Marcus Rowe
f13c9a894f Add optional grid to Tilemap Viewer 2017-03-16 20:16:52 +10:00