views:

71

answers:

2

hi,

is there off screen drawing possible in android like a imageContext in objective C. if it is kindly tell me the link or some kind of hint.

thanks a lot.

+1  A: 

I believe you are looking for the Canvas object. This doesn't have to be on the screen when you draw on it (lines, shapes, bitmaps, etc.).

You'll first want to create a Bitmap to draw on.

colithium
canvas draws on screen images.... anyway how can i get image from canvas. if you know please tell me this because i have read the canvas api but didn't seem any method about getting image from canvas.
sajjoo
Canvases CAN be used to draw on the screen, but they don't have to. Create a Bitmap, give it to a canvas, and draw away. You have a reference to the Bitmap because you created it, you don't need to ask the canvas to get the image back.
colithium
i am totally stuck here canvas is too slow to move a map. now i am thinking about drawing my tiles off screen and get the image from that and give it to imageView to see my map. but cannot find anything which draws images off screen.
sajjoo
I mean you can always resort to OpenGL to perform complex/highspeed drawing operations but the Canvas object is perfectly capable of drawing several bitmaps (tiles) onto another bitmap. My advise is to actually try it. It is capable of drawing "off screen" though... Just don't assign the Canvas to a UI control.
colithium
There might be some inefficiency in your code besides the fact that you're using a canvas. Perhaps you could post some if relevant or start a new question?
colithium
A: 

Check out the FingerPaint application in ApiDemos/Graphics

st0le
nope that is not the solution i need to draw my images offscreen and then get that images as single image and move on the screen.
sajjoo