问题描述
制作一个应用程序,我需要画一个透视图。在api> 27上一切正常,但在27及以下级别上却很奇怪!下两点错误的构建视角
float[] srcT = {
0,// Coordinate of top left point
0,height,// Coordinate of bottom left point
wight,// Coordinate of bottom right point
wight,0 // Coordinate of top right point
};
float[] dstT = {
top_left_x,top_left_y,// Coordinate of top left point
bottom_left_x,bottom_left_y,// Coordinate of bottom left point
bottom_right_x,bottom_right_y,// Coordinate of bottom right point
top_right_x,top_right_y // Coordinate of top right point
};
Shader shader = new BitmapShader(bitmap,Shader.TileMode.REPEAT,Shader.TileMode.REPEAT);
matrix.setPolyToPoly(srcT,dstT,4);
shader.setLocalMatrix(matrix);
paint.setShader(shader);
它在28个api上:
这是22个api:
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)