html5画布元素和svg [英] html5 canvas element and svg

查看:87
本文介绍了html5画布元素和svg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我们需要html5 canvas元素,同样可以通过嵌入式svg实现?

Why do we need the html5 canvas element, when the same can be achieved through embedded svg?

推荐答案

SVG和canvas并非真正可互换的技术。 SVG是一种保留模式图形,其中所有内容都是从相当抽象的模型(SVG文档)中提取的。另一方面,Canvas是一种立即模式图形,没有模型,客户端(JavaScript)必须处理重绘,动画等。

SVG and canvas aren't really interchangeable technologies. SVG is a type of retained mode graphics where everything is drawn from a rather abstract model (the SVG document). Canvas on the other hand is a kind of immediate mode graphics, where there is no model and the client (JavaScript) must take care of redrawing, animations etc.

这篇关于html5画布元素和svg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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