- Jun 6, 2020
- 11,559
- 4,422
I want to be able to draw a selection rectangle under the control of the pointer.
I have read this post
BUT all that actually does is draw a black or white rectangle on a black background.
if I have a canvas that already has a picture in it, how do I draw such a rectangle without erasing the picture?
In the past I have used XOR drawing as one method - darw twice and it is back to normal
I have tried taking a copy of the image on TOUCH_ACTION_DOWN, to be able to DrawBitmap later
(bmp = mycanvas.snapshot)
But that line of code somehow 'freezes' the image so that I cannot draw on it at all.
I have read this post
برای دیدن لینک ها باید ثبت نام کنید
BUT all that actually does is draw a black or white rectangle on a black background.
if I have a canvas that already has a picture in it, how do I draw such a rectangle without erasing the picture?
In the past I have used XOR drawing as one method - darw twice and it is back to normal
I have tried taking a copy of the image on TOUCH_ACTION_DOWN, to be able to DrawBitmap later
(bmp = mycanvas.snapshot)
But that line of code somehow 'freezes' the image so that I cannot draw on it at all.
برای دیدن لینک ها باید ثبت نام کنید