您在 Virtual PC 上进行开发时遇到过问题吗?
我的项目使用虚拟 PC(具有远程桌面连接)。 该项目使用一些 GDI+ 功能。
现在,显然在真实和虚拟PC上显示图形对象时存在问题。
一个简单的示例:
public class Form1 : Form
{
private void Form1_Paint(System.Object sender,
System.Windows.Forms.PaintEventArgs e)
{
Graphics g = e.Graphics;
using (Pen pen = new Pen(Color.Blue, 3)) {
g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias;
g.DrawLine(pen, 10, 10, 50, 150);
g.SmoothingMode = Drawing2D.SmoothingMode.None;
g.DrawLine(pen, 30, 10, 70, 150);
}
}
}
结果:
Virtual PC Real PC
替代文本 http://lh6。 ggpht.com/_1TPOP7DzY1E/S45E8Ns3X0I/AAAAAAAADFE/3SROt2yQz_w/s800/Capture4.png
因此,对于“虚拟”开发应该予以考虑。你有过类似的情况吗?
I use a virtual PC (with remote desktop connection) for my project.
The project uses some GDI+ functionality.
Now, apparently there is a problem when displaying graphics object on the real and virtual PC.
A simple example:
public class Form1 : Form
{
private void Form1_Paint(System.Object sender,
System.Windows.Forms.PaintEventArgs e)
{
Graphics g = e.Graphics;
using (Pen pen = new Pen(Color.Blue, 3)) {
g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias;
g.DrawLine(pen, 10, 10, 50, 150);
g.SmoothingMode = Drawing2D.SmoothingMode.None;
g.DrawLine(pen, 30, 10, 70, 150);
}
}
}
Result:
Virtual PC Real PC
alt text http://lh6.ggpht.com/_1TPOP7DzY1E/S45E8Ns3X0I/AAAAAAAADFE/3SROt2yQz_w/s800/Capture4.png
So, for a "virtual" development is should be take in consideration. Have you had the similar situations?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 RDC 的问题,而不是虚拟桌面的问题。例如,RDC 可以消除抗锯齿,以实现更低的数据传输。
解决方案:
This is problem with RDC, not with virtual desktop. RDC can remove antialiasing, for example, to achieve lower data transmission.
Solutions: