1

Flip Canvas upside-down while preserving onTouchEvent method

view story
linux-howto

http://stackoverflow.com – I have created a bar graph by drawing rectangles on a canvas. The only problem is that graph is upside down. I tried using the following code to flip the canvas right from the start, but this affects the onTouchEvent method in a weird way: public void onDraw(final Canvas canvas) { int width = super.getWidth(); int height = super.getHeight(); canvas.scale(1f, -1f, width * 0.5f, height * 0.5f); mCanvas = canvas; super.onDraw(canvas); ....//more code after that If the code above is implemented, the g (HowTos)