matt-dray / pixeltrix

:space_invader::computer_mouse: R package: make pixel art interactively in a plot window, get a matrix, make a gif
Other
21 stars 0 forks source link

Add a grid around the pixels #5

Closed matt-dray closed 1 year ago

matt-dray commented 1 year ago

You can't see where each pixel's area is in a blank image(). This is especially bad when there's a large number of pixels. An overlaid grid, which can be subtle, will help. This could be an argument like grid = TRUE.

In other words, abline(). The h and v positions will have to be calculated given the n_row and n_col, as per the calculations that take place to match the x and y of a point click to the nearest pixel.

I implemented this sort of functionality in my pixel art blog post.