Is it possible to create a pixel drawing grid?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Brayams Ramos
el 23 de Abr. de 2016
Respondida: Geoff Hayes
el 24 de Abr. de 2016
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 comentarios
Respuesta aceptada
Geoff Hayes
el 24 de Abr. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!