Android: Drawing to canvas, way to make bottom left correspond to (0,0)?

No, I don't know of a way to move 0,0 to the bottom left and get what you would typically think of as "normal" coordinates But combining scale() and translate() might do the trick to achieve the same effect canvas. Translate(0,canvas.getHeight()); // reset where 0,0 is located canvas. Scale(1,-1); // invert.

No, I don't know of a way to move 0,0 to the bottom left and get what you would typically think of as "normal" coordinates. But combining scale() and translate() might do the trick to achieve the same effect. Canvas.

Translate(0,canvas.getHeight()); // reset where 0,0 is located canvas. Scale(1,-1); // invert.

Nothing is drawing after I do this. – John Lotacs Jul 13 at 17:01 The translation needs to come before the scale. Since you're scaling first, the translation is shifting the canvas the opposite direction that you intend.

Also remember to call canvas.save() before the transformation and canvas.restore() after you've completed drawing. – LeffelMania Jul 13 at 17:02 The problem was you need to call translate() before scale(), works now. – John Lotacs Jul 13 at 17:04 I will update the code in the above answer to match the comments!

– dustmachine Jul 13 at 17:06.

You can use canvas.translate() developer.android.com/reference/android/..., float) to move the origin to where you want.

You can flip your Canvas with something like canvas. Scale(1, -1) and then translate it to the right place.

No, I don't know of a way to move 0,0 to the bottom left and get what you would typically think of as "normal" coordinates. But combining scale() and translate() might do the trick to achieve the same effect. You can flip your Canvas with something like canvas.

Scale(1, -1) and then translate it to the right place. You can use canvas.translate() http://developer.android.com/reference/android/graphics/Canvas.html#translate(float, float) to move the origin to where you want. Terms of service.

Not the answer you're looking for?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions