I think that you should finish your onDraw like this if (mScaled) { Bitmap out = Bitmap. CreateScaledBitmap(mBitmap, (int) thumbWidth, (int) thumbHeight, false); mCanvas. DrawBitmap(out, null, thumbnailRectF, thumbCanvasPaint); } canvas.
DrawBitmap(mBitmap, 0, 0, null) note "mCanvas. DrawBitmap", rather than "canvas. DrawBitmap".
The last line depends whether you were drawing your changes to mCanvas or canvas? It is logical to draw everything on mCanvas and then just use canvas. DrawBitmap(mBitmap, 0, 0, null); in your onDraw, otherwise things get confusing.
I think that you should finish your onDraw like this if (mScaled) { Bitmap out = Bitmap. CreateScaledBitmap(mBitmap, (int) thumbWidth, (int) thumbHeight, false); mCanvas. DrawBitmap(out, null, thumbnailRectF, thumbCanvasPaint); } canvas.
DrawBitmap(mBitmap, 0, 0, null); note "mCanvas. DrawBitmap", rather than "canvas. DrawBitmap".
The last line depends whether you were drawing your changes to mCanvas or canvas? It is logical to draw everything on mCanvas and then just use canvas. DrawBitmap(mBitmap, 0, 0, null); in your onDraw, otherwise things get confusing.
I can see similarity of your solution whith this example: barebonescoder. Com/2010/06/… – Lumis Feb 8 at 2:06 Wow, yes, that linked program is constructed almost 100% the same, except for my issue with tying the bitmap to the canvas, etc. Trying this solution now. – Paul Feb 8 at 3:01.
I have a drawing app that allows the user to draw to a blank canvas. I am attempting to draw a scaled 'thumbnail' of the current bitmap so that when the user has scaled in the View, they can reference the thumbnail to get a sense as to where they are in the overall draw canvas. I have the scaling working, and am displaying the thumbnail in the correct location, but it appears that the thumbnail is not being updated on subsequent onDraws when new lines/shapes are added.
The thumbnail gets displayed in the space defined by thumbnailRectF using the thumbCanvasPaint, but in subsequent onDraw() calls, the scaled bitmap has not changed from it's original state, even though the full-sized active canvas shows all of the drawings, etc. Based on some testing, it seems to me that while I am setting the Bitmap with the initial call to draw(mCanvas);, subsequent onDraws are writing to the underlying Bitmap rather than the one specified in onSizeChanged(). So, I guess I am trying to figure out how I tie the onDraw canvas to a Bitmap that I can readliy access to perform re-sizes, save, etc. Looking at this question, I thought that the draw(mCanvas); call would tie the onDraw to the bitmap specified in the mCanvas (in my case, mBitmap), but in practice, it doesn't seem to be working, in so far as updats to the canvas are concerned.
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.