Wednesday, April 10, 2013

[android help] Android drawing a matrix

Android drawing a matrix - Stack Overflow




















Is it possible to draw a map (matrix-like structure) as an image on a particular layout (LinearLayout, etc.)? I am having a difficult time implementing such event.


For example I have this map input:



2222222222222
2-----2-----2
2--a--2--b--2
2-----2-----2
2222232222232


And I want to produce an image of the map (table-like structure) on a particular layout in which translation (rotation) and scaling is possible.


Can such be possible?


NOTE: There is no image file to derive. The map itself is to be generated as an image for translation and scaling.



UPDATE:


  • android.Graphics.Matrix wouldn't be a possible solution since there is no image file to derive the matrix. If an alternative is found to use Matrix it will be accepted.





























Matrix matrix = new Matrix();
matrix.postScale(scaleX, ScaleY);
matrix.postRotate(50);
matrix.postTranslate(xDisance, yDiastance);


You can achieve it by using Matrix Class. For more info on this check out the developer docs




















default







.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...