你让我研究了这个非常有趣的问题,在 Android 中似乎很容易做到。对 Mesh 的四个点使用绝对坐标:
float[] mVerts = {
topLeftX, topLeftY,
topRightX, topRightY,
bottomLeftX, bottomLeftY,
bottomRightX, bottomRightY
};
canvas.drawBitmapMesh(myImage, 1, 1, mVerts, 0, null, 0, null);
Run Code Online (Sandbox Code Playgroud)
您必须弄清楚如何获得这些点,但 drawBitmapMesh 会为您拉伸它。
| 归档时间: |
|
| 查看次数: |
930 次 |
| 最近记录: |