2013-08-02 90 views
0

我想在屏幕上有一個大的全景位圖,我可以用手指滾動。但我不知道如何擴展它的權利:Android比例尺位圖

rectF.set(x, 0, x + [whatToPutHere], getMeasuredHeight) canvas.drawBitmap(bmpBackground, null, rectF, null

什麼我必須把whatToPutHere如果我希望它有正確尺寸是多少?

我希望你知道我的意思

+0

什麼是rectF? –

回答

0

好吧,我解決了自己的問題:

我創建變量 int dimension = getMeasuredHeight()/bmpBackground.getHeight(); 對於whatToPutHere我把 bmpBackground.getWidth()*dimension;