Is it possible to create a pixel drawing grid?
4 views (last 30 days)
Show older comments
I want to know if it is possible to create a special grid that allows writing pixels into it. I have an example of what I want to make, but it uses jQuery: http://jsfiddle.net/V8N7f/
0 Comments
Accepted Answer
Geoff Hayes
on 24 Apr 2016
Barayams - yes, it is possible to create a grid that will allow you to turn on or off the pixels (or pxp squares that represent a pixel). I recommend that you use an axes to draw an mxnx3 image which you then fill in with the solid white or black (or any other) colour. You will need to use the WindowButtonDownFcn on your figure to respond to the user's press of the mouse button within the grid. See one of the examples from http://www.mathworks.com/matlabcentral/answers/254813-i-made-a-minesweeper-game-and-i-need-to-know-how-to-get-an-image-of-a-bomb-to-display-on-the-grid for an idea of how to proceed.
0 Comments
More Answers (0)
See Also
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!