Is it possible to create a pixel drawing grid?
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Geoff Hayes
2016-4-24
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!