柯萨奇病毒是什么病| 信奥是什么| 邓紫棋和华晨宇什么关系| 脚怕冷是什么原因引起的| 为什么手上会长小水泡| 柔软对什么| 辣条是什么意思| 胚芽是什么意思| 饭票是什么意思| 缺氯有什么症状怎么补| 前列腺在人体什么位置| 公分是什么单位| 鸭子为什么会游泳| 用什么泡脚好| 总出汗是什么原因| 六味地黄丸是治什么的| 五月17号是什么星座| 绅士是什么意思| 过堂是什么意思| 自主能力是什么意思| knife是什么意思| kipling是什么牌子| 尿液中有泡沫是什么原因| 流鼻子打喷嚏吃什么药| 体寒的女人吃什么能调理好身体| 为什么会上火| 下下签是什么意思| 吃什么降糖| 可惜是什么意思| 糖尿病人能吃什么| 电波是什么意思| 高兴的反义词是什么| 窦性心律不齐吃什么药| 什么叫菩提| 做完手术吃什么水果好| 梦见自己结婚了是什么征兆| 拍大腿内侧有什么好处| 青定读什么| 请问紫苏叶有什么功效| 心脏造影是什么意思| 七月十三号是什么星座| 调理脾胃吃什么药| 1980年属什么| 鱼石是什么| 记吃不记打的下一句是什么| 尿路结石有什么症状| 八卦分别代表什么| 男性乳头疼是什么原因| 心口下面疼是什么原因| 梦见买楼房有什么预兆| 鱼腥味是什么妇科病| 梦见下暴雨是什么意思| 火气太旺是什么原因| acer是什么牌子的电脑| 彪悍是什么意思| 滑膜炎吃什么药好| cra是什么| 高干文是什么意思| 酒量越来越差什么原因| 大安是什么意思| 淋球菌阳性是什么意思| 羊肉馅饺子配什么菜好| 二级烧伤是什么程度| 发烧喝什么药| 毛孔粗大用什么洗面奶好| 属羊的是什么命| hpv59阳性是什么意思| 脑供血不足做什么检查| 冰雪什么| 缺维生素D吃什么补得最快| 无关风月是什么意思| 腋下异味看什么科| 猥琐是什么意思| 肝囊肿吃什么药能消除| 什么床不能睡觉| ki是什么意思| 血小板低有什么危险| 什么是生化妊娠| 梦到涨大水预示着什么| 自求多福什么意思| 办护照需要什么资料| 阴道镜活检是什么意思| 绝对值什么意思| 主心骨是什么意思| 西洋参有什么作用和功效| cdfi未见明显血流信号是什么意思| 一本万利是什么生肖| 宵字五行属什么| 长期熬夜有什么危害| 和是什么意思| 慢性浅表性胃炎吃什么药好得快| 男人喝红糖水有什么好处| 红白相间是什么意思| 失败是成功之母是什么意思| 级配是什么意思| 梦见买楼房有什么预兆| 佳偶天成是什么意思| 眼底充血用什么眼药水| 什么是物理防晒| 指鹿为马的反义词是什么| 大黄是什么| 什么是桥本氏甲状腺炎| 头皮痒用什么药| 牛瓦沟是什么部位| 四个木是什么字| 无花果吃了有什么好处| 购置是什么意思| 胆囊肿是什么病严重吗| 属虎的本命佛是什么佛| 喝什么可以解酒| 煮红枣为什么有白色的漂浮物| 什么症状吃保心丸| 新生婴儿吃什么奶粉| 唯小人与女子难养也什么意思| 蚊虫叮咬涂什么药| 一个巾一个占念什么| 胚芽发育成什么| pad是什么| 脖子疼是什么原因引起的| 宜夫痣是什么意思| 囊肿吃什么药| 性生活时间短吃什么药| 牛子是什么| 鸭子为什么会游泳| 不孕不育的症状是什么| 拔牙有什么危害| 息怒是什么意思| 狸是什么动物| 肝不好有什么症状有哪些表现| 茜字五行属什么| 腿总是抽筋是什么原因| 床咚是什么意思啊| 一什么金鱼| 双向是什么意思| 畏光是什么意思| 水蛭怕什么| 真丝和桑蚕丝有什么区别| 抗心磷脂抗体是什么| 五根手指叫什么| 供不应求是什么意思| 玄关挂什么装饰画好| 为什么月经迟迟不来| 经常咳嗽是什么病| 射手属于什么象星座| 什么奔什么走| 麻瓜是什么意思| 蚂蚁吃什么| 为什么六月腊月不搬家| 脸上爱长痘痘是什么原因| 青蛙像什么| 左脚大拇指麻木是什么原因| 屁多且臭是什么原因| 脱发严重是什么原因| 床上用品四件套都有什么| 出圈是什么意思| 刘欢属什么生肖| 下巴脱臼是什么感觉| 哀鸿遍野是什么意思| 彩超是检查什么的| 小太阳是什么牌子| 高锰酸钾是什么颜色| 什么炒肉好吃| 口腔痛什么原因| 神经衰弱吃什么药效果最好| 子宫外怀孕有什么症状| 什么叫法令纹| 成人晚上磨牙是什么原因| 核辐射是什么| 房性逸搏心律是什么意思| 卫生局是什么单位| 特派员是什么级别| 花中隐士是什么花| 萌字五行属什么| 更年期皮肤瘙痒是什么原因| 缺少电解质有什么症状| 数是什么意思| 口若悬河是什么意思| 欲语还休是什么意思| 喝什么可以变白| 什么是横纹肌溶解| 飞蛾为什么扑火| 石棉是什么东西| 牙疼吃什么水果好| 百福图挂在家里什么位置好| 休是什么意思| 头发长的慢是什么原因| k9什么意思| 什么叫窝沟封闭| 七年是什么婚| 什么是音序| 白露是什么季节的节气| 心脏五行属什么| 藕色是什么颜色| 怕空调冷风什么原因| 扫描件是什么意思| 嘴巴苦什么原因| 眼睛发黄是什么原因引起的| 昀是什么意思| 骨癌的前兆是什么症状| 白牡丹属于什么茶| 什么叫物质女人| 人体缺钾是什么原因引起的| 牙齿脱矿是什么原因| 很什么很什么| 脚上长水泡是什么原因引起的| 梦到认识的人死了是什么意思| 6月20日是什么节日| 指甲长出来是白色的什么原因| mg是什么元素| 心肌炎是什么病严重吗| 情绪什么意思| 为什么会有台风| 什么是筋膜| 一个火一个日一个立念什么| 颈椎痛挂什么科| 禁欲有什么好处| 骨裂是什么感觉| 不知道吃什么| 罴是什么动物| 愚公移山是什么意思| 提高免疫力吃什么维生素| 脚趾发紫是什么原因| ugg是什么品牌| 西安有什么好吃的特产| 研究员是什么级别| 加特纳菌阳性是什么病| 亲夫是什么意思| 海鲜不能和什么一起吃| 文盲是什么意思| 牛标志的车是什么牌子| 二月花是什么花| 肾的主要功能是什么| 性病是什么| 女人能日到什么时候| hopeshow是什么牌子| 头疼什么原因| 射精无力是什么原因| her是什么意思| 腿发软无力是什么原因引起的| 突然发胖要警惕什么病| 春茶是什么茶| 为什么一生气就胃疼| 脾虚的人有什么症状| 国药准字是什么意思| 肚子疼吃什么药最有效| 什么样的人容易抑郁| 实时播报什么意思| 梦见屎是什么预兆| 每天放很多屁是什么原因| 手掌发黄是什么原因| 甲氰咪胍又叫什么| 叩齿是什么意思| pc是什么意思| 人生海海是什么意思| 拍档是什么意思| 什么油适合油炸| 人为什么要死| 什么样的人不适合吃人参| 神经外科和神经内科有什么区别| 轩字属于五行属什么| 梦到自行车丢了是什么意思| 睡觉时胳膊和手发麻是什么原因| 十二指肠溃疡是什么症状| 一一是什么意思| 百度Jump to content

常州两场招聘会效果不佳 大学生对规划很迷茫

From Wikipedia, the free encyclopedia
百度   脸书5000万用户的个人信息被泄露,并且被英国的剑桥分析公司加以利用影响美国2016年大选的丑闻震动了西方世界。

The HTML canvas element allows for dynamic, scriptable rendering of 2D shapes and bitmap images. Introduced in HTML5, it is a low level, procedural model that updates a bitmap. The <canvas> element also helps in making 2D games.

While the <canvas> element offers its own 2D drawing API, it also supports the WebGL API to allow 3D rendering with OpenGL ES.

History

[edit]

Canvas was initially introduced by Apple for use in their own Mac OS X WebKit component in 2004,[1] powering applications like Dashboard widgets and the Safari browser. Later, in 2005, it was adopted in version 1.8 of Gecko browsers,[2] and Opera in 2006,[3] and standardized by the Web Hypertext Application Technology Working Group (WHATWG) on new proposed specifications for next generation web technologies.[4]

Usage

[edit]

A canvas consists of a drawable region defined in HTML code with height and width attributes. JavaScript code may access the area through a full set of drawing functions similar to those of other common 2D APIs, thus allowing for dynamically generated graphics. Some anticipated uses of canvas include building graphs, animations, games, and image composition.

Interacting with the canvas involves obtaining the canvas' rendering context, which determines whether to use the canvas API, WebGL, or WebGL2 rendering context.

Example

[edit]

The following code creates a <canvas> element in an HTML page:

<canvas id="example" width="200" height="200">
This text is displayed if your browser does not support HTML canvas element.
</canvas>

Using JavaScript, you can draw on the canvas:

var example = document.getElementById('example');
var context = example.getContext('2d');
context.fillStyle = 'red';
context.fillRect(30, 30, 50, 50);

This code draws a red rectangle on the screen.

The Canvas API also provides save() and restore(), for saving and restoring all the canvas context's attributes.

Canvas element size versus drawing surface size

[edit]

A canvas actually has two sizes: the size of the element itself and the size of the element's drawing surface. Setting the element's width and height attributes sets both of these sizes; CSS attributes affect only the element's size and not the drawing surface.

By default, both the canvas element's size and the size of its drawing surface is 300 screen pixels wide and 150 screen pixels high. In the listing shown in the example, which uses CSS to set the canvas element's size, the size of the element is 600 pixels wide and 300 pixels high, but the size of the drawing surface remains unchanged at the default value of 300 pixels × 150 pixels. When a canvas element's size does not match the size of its drawing surface, the browser scales the drawing surface to fit the element (which may result in surprising and unwanted effects).

Example setting element size and drawing surface size to different values:

<!DOCTYPE html>
<html>
    <head>
    <title>Canvas element size: 600 x 300,
    Canvas drawing surface size: 300 x 150</title>
    <style>
        body {
            background: #dddddd;
        }
        #canvas {
            margin: 20px;
            padding: 20px;
            background: #ffffff;
            border: thin inset #aaaaaa;
            width: 600px;
            height: 300px;
        }
    </style>
    </head>
    <body>
        <canvas id="canvas">
        Canvas not supported
        </canvas>
    </body>
</html>

Canvas versus Scalable Vector Graphics (SVG)

[edit]

SVG is an alternative approach to drawing shapes in browsers.[5] Unlike canvas, which is raster-based, SVG is vector-based, so that each drawn shape is remembered as an object in a scene graph or Document Object Model, which is subsequently rendered to a bitmap. This means that if attributes of an SVG object are changed, the browser can automatically re-render the scene.

Canvas objects, on the other hand, are drawn in immediate mode. In the canvas example above, the rectangle draw operation modifies the canvas, and its representation as a rectangle is forgotten by the system. If the rectangle's position were to be changed, the canvas would need to be redrawn, including any objects that might have been covered by the rectangle. In the equivalent SVG case, one could simply change the position attributes of the rectangle and the browser would determine how to repaint it. There are additional JavaScript libraries that abstract the canvas model to have svg-like scene capabilities within the canvas element. Multiple canvas layers can also be used, meaning that only specific layers need to be recreated when changes are required.

SVG images are represented in XML, and complex scenes can be created and maintained with XML editing tools.

The SVG scene graph enables event handlers to be associated with objects, so a rectangle may respond to an onClick event. To get the same functionality with canvas, one must manually match the coordinates of the mouse click with the coordinates of the drawn rectangle to determine whether it was clicked.

Conceptually, canvas is a lower-level API upon which higher-level interfaces might be built (for example, SVG support). There are JavaScript libraries that provide partial SVG implementations using canvas for browsers that do not provide SVG but support canvas, such as the browsers in Android 2.x. However, this is not normally the case—they are independent standards. The situation is complicated because there are scene graph libraries for canvas, and SVG has some bitmap manipulation functionality.

Reactions

[edit]

At the time of its introduction, the canvas element was met with mixed reactions from the web standards community. There have been arguments against Apple's decision to create a new proprietary element instead of supporting the SVG standard. There are other concerns about syntax, such as the absence of a namespace.[6]

Intellectual property over canvas

[edit]

On March 14, 2007, WebKit developer Dave Hyatt forwarded an email from Apple's Senior Patent Counsel, Helene Plotka Workman,[7] which stated that Apple reserved all intellectual property rights relative to WHATWG's Web Applications 1.0 Working Draft, dated March 24, 2005, Section 10.1, entitled "Graphics: The bitmap canvas",[8] but left the door open to licensing the patents should the specification be transferred to a standards body with a formal patent policy. This caused considerable discussion among web developers and raised questions concerning the WHATWG's lack of a policy on patents in comparison to the World Wide Web Consortium (W3C)'s explicit favoring of royalty-free licenses. Apple later disclosed the patents under the W3C's royalty-free patent licensing terms.[9] The disclosure means that Apple is required to provide royalty-free licensing for the patent whenever the Canvas element becomes part of a future W3C recommendation created by the HTML working group.[10]

Privacy concerns

[edit]

Canvas fingerprinting is one of a number of browser fingerprinting techniques for tracking online users that allow websites to identify and track visitors using the HTML <canvas> element. The technique received wide media coverage in 2014,[11][12][13][14] after researchers from Princeton University and KU Leuven University described it in their paper The Web never forgets.[15] The privacy concerns regarding canvas fingerprinting center around the fact that even deleting cookies and clearing the cache will not be sufficient for users to avoid online tracking.

Browser support

[edit]

The element is supported by the current versions of Mozilla Firefox, Google Chrome, Internet Explorer, Safari, Konqueror, Opera[16] and Microsoft Edge.[17]

See also

[edit]

References

[edit]
  1. ^ Ian Hixie (2025-08-07). "Extending HTML". Retrieved 2025-08-07.
  2. ^ Mozilla Developer Connection. "HTMLCanvasElement". Archived from the original on 2025-08-07. Retrieved 2025-08-07.
  3. ^ "Opera 9.0 changelog". Archived from the original on 2025-08-07. Retrieved 2025-08-07.
  4. ^ "HTML Standard". html.spec.whatwg.org. Retrieved 2025-08-07.
  5. ^ "Scalable Vector Graphics | CorelDRAW". www.coreldraw.com. Retrieved 2025-08-07.
  6. ^ Ian Hickson remarks regarding canvas and other Apple extensions to HTML
  7. ^ "[whatwg] Web Applications 1.0 Draft, David Hyatt, Wed Mar 14 14:31:53 PDT 2007". Archived from the original on 2025-08-07. Retrieved 2025-08-07.
  8. ^ Web Applications 1.0 Early Working Draft - Dynamic graphics: The bitmap canvas
  9. ^ HTML Working Group Patent Policy Status – Known Disclosures
  10. ^ W3C patent policy in use by HTML working group
  11. ^ Knibbs, Kate (July 21, 2014). "What You Need to Know About the Sneakiest New Online Tracking Tool". Gizmodo. Retrieved July 21, 2014.
  12. ^ Joseph Steinberg (July 23, 2014). "You Are Being Tracked Online By A Sneaky New Technology -- Here's What You Need To Know". Forbes. Retrieved November 15, 2014.
  13. ^ Angwin, Julia (July 21, 2014). "Meet the Online Tracking Device That is Virtually Impossible to Block". ProPublica. Retrieved July 21, 2014.
  14. ^ Kirk, Jeremy (July 21, 2014). "Stealthy Web tracking tools pose increasing privacy risks to users". PC World. Retrieved July 21, 2014.
  15. ^ Acar, Gunes; Eubank, Christian; Englehardt, Steven; Juarez, Marc; Narayanan, Arvind; Diaz, Claudia (July 24, 2014). "The Web never forgets: Persistent tracking mechanisms in the wild". Retrieved July 24, 2014.
  16. ^ Sucan, Mihai (4 Feb 2010). "SVG or Canvas? Сhoosing between the two". Opera Software. Archived from the original on 23 June 2010. Retrieved 3 May 2010.
  17. ^ "Canvas, Microsoft Edge documentation".
[edit]
口苦口臭挂什么科 酸菜鱼是什么地方的菜 黑白蛇是什么蛇 胃酸过多有什么症状 窦性心律不齐是什么
拜阿司匹林什么时间吃最好 7月份可以种什么菜 梦到猪肉是什么预兆 喝蒲公英根有什么好处 12.21是什么星座
银河系的中心是什么 判决书什么时候生效 头皮屑多用什么洗发水效果好 汉族是什么人种 低密度脂蛋白胆固醇高吃什么药
艾灸的原理是什么 好学不倦什么意思 梦见打死蛇是什么意思 一个三点水一个有读什么字 鲜黄花菜含有什么毒素
胃疼吃什么食物最养胃hcv8jop3ns8r.cn 甲亢是什么原因造成的hcv7jop6ns1r.cn 男性夜间盗汗是什么原因hcv8jop6ns3r.cn fnh是什么病hcv7jop9ns9r.cn 老人生日送什么礼物好hcv7jop6ns8r.cn
自给自足是什么意思hcv8jop7ns9r.cn 2岁打什么疫苗hcv8jop3ns9r.cn 小沙弥是什么意思hcv9jop6ns3r.cn 小暑是什么hcv9jop3ns9r.cn 水疱疹什么药最快能治好hcv8jop1ns6r.cn
胆囊结石挂什么科hcv8jop2ns7r.cn 报单什么意思hcv9jop3ns6r.cn 风湿病吃什么药hcv8jop5ns6r.cn 鸟吃什么东西hcv9jop8ns3r.cn 为什么会得焦虑症hcv9jop1ns1r.cn
属猪的跟什么属相最配hcv8jop6ns7r.cn 德国人是什么人种hcv9jop0ns9r.cn 木耳属于什么类hcv8jop1ns8r.cn 一线炎是什么病严重吗hcv8jop0ns1r.cn 女人左眼角有痣代表什么hcv9jop6ns2r.cn
百度