[UWP] [win2d]使用Matrix4x4.createPerspective [英] [UWP][win2d] Using Matrix4x4.createPerspective
问题描述
我正在尝试使用win2d绘制时对图像应用旋转和透视变换,旋转效果很好,但是当我尝试添加透视图时,我的图像根本没有显示。
I'm trying to apply rotation and perspective transformation to an image when drawing with win2d, rotation works great, but when i try to add perspective my image just not showing at all.
谁知道我应该如何使用它?
Who know how should I use it?
var rotationMatrix = Matrix4x4.CreateRotationZ( rotation.ToRadians(), new Vector3(width/2, height/2, 0));
var perspectiveMatrix = Matrix4x4.CreatePerspective(1,1,1.0f,1000.0f);
var perspectiveMatrix = Matrix4x4.CreatePerspective(1, 1, 1.0f, 1000.0f);
var transformMatrix = rotationMatrix * perspectiveMatrix;
var transformMatrix = rotationMatrix * perspectiveMatrix ;
...
args.DrawingSession.DrawImage(bitmap,rect,new Rect(0,0,float.MaxValue) ,float.MaxValue),0.8f,CanvasImageInterpolation.Cubic,transformMatrix);
args.DrawingSession.DrawImage(bitmap, rect, new Rect(0, 0, float.MaxValue, float.MaxValue), 0.8f, CanvasImageInterpolation.Cubic, transformMatrix);
推荐答案
你好atrbx5,
Hi atrbx5,
请阅读粘贴帖子,特别是
发布指南:主题行标签和
已知问题适用于Windows 10 SDK和工具
Please read the sticky posts, especially the Guide to posting: subject line tags and Known Issues for Windows 10 SDK and Tools
关于你的问题, 我试图让熟悉这个主题的人参与进一步研究这个问题。可能会有
延迟一段时间。感谢你的耐心。
About your questions, I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
最好的问候,
Xavier Eoro
这篇关于[UWP] [win2d]使用Matrix4x4.createPerspective的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!