使用c#在Web应用程序中绘制线条 [英] draw lines into web applications using c#

查看:60
本文介绍了使用c#在Web应用程序中绘制线条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

他们以任何方式在Windows应用程序等网站上划线吗?

Is their any way to draw lines into websites like windows applications?

推荐答案

可以有不同的方法,但不是很多。可能你不是指Java applet,Flash或Silverlight方法,这可能会给你最灵活的技术。



首先,你可以用图像完成所有工作。您的ASP.NET应用程序可以动态创建映像(使用 System.Drawing )并将其发送回HTTP响应(请参阅MDSN文章中的代码示例 System.Web.HttpResponse http:/ /msdn.microsoft.com/en-us/library/system.web.httpresponse.aspx [ ^ ];这将涉及相当大的性能成本。)



另一种方法可以使用客户端代码,基于HTML5 canvas 。请参阅,例如: https://developer.mozilla.org/en-US/ docs / Web / Guide / HTML / Canvas_tutorial [ ^ ]。



-SA
There can be different approaches, but not many. Probably you don't mean Java applet, Flash or Silverlight approaches, which would probably give you most flexible techniques.

First, you could do it all with images. Your ASP.NET application can create image on the fly (using System.Drawing) and send them back in HTTP response (please see the code sample in the MDSN article on System.Web.HttpResponse: http://msdn.microsoft.com/en-us/library/system.web.httpresponse.aspx[^]; it will involve considerable performance cost).

Another approach could use client-side code and is based on HTML5 canvas. Please see, for example: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Canvas_tutorial[^].

—SA


最好的要做的就是使用一些javascript库。有许多javascript库是为了绘制应用程序而构建的。它们对您来说更容易,在客户端也更轻巧。你可以查看Yahoo UI;更好的谷歌,并选择最适合您的要求。
The best way to do is to use some javascript library. There are lots of javascript libraries which are build with the purpose of drawing application in mind. They will be easier for you as well as lightweight on the client end. You can check Yahoo UI; better google for them and select the one which best suits your requirements.


the-basics-of-drawing-graphics-to-windows-forms / [ ^ ]



希望它会有所帮助......
the-basics-of-drawing-graphics-onto-windows-forms/[^]

Hope it will help..


这篇关于使用c#在Web应用程序中绘制线条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆