關(guān)于 canvas.drawBitmap這段代碼
canvas.drawBitmap(whitePiece, (whitePoint.x + (1 - ratioPieceOfLineHeight) / 2) * mLineHeight, (whitePoint.y + (1 - ratioPieceOfLineHeight) / 2) * mLineHeight, null);
為什么必須要加上(1 -
ratioPieceOfLineHeight) / 2) * mLineHeight 這些距離設(shè)置,感覺只用whitePoint.x不就可以知道圖片的坐標(biāo)直接放了,但是不加上的話就白子會(huì)一直在左上角重復(fù)出現(xiàn)