在线手册

  • canvas clip

    ... .getElementById("myCanvas"); var ctx=c.getContext("2d"); // Clip a rectangular area ctx.rect(50,20,200,120); ctx.stroke(); ctx.clip(); // Draw red rectangle after clip() ctx.fillStyle="red"; ctx.fillRect(0,0,150,100); </script> 尝试一下 » 浏览器支持 ...

  • canvas textbaseline

    ... ("myCanvas"); var canvOK=1; try {c.getContext("2d");} catch (er) {canvOK=0;} if (canvOK==1) { var ctx=c.getContext("2d"); //Draw a red line at y=100 ctx.strokeStyle="red"; ctx.moveTo(5,100); ctx.lineTo(395,100); ctx.stroke(); ctx.font ...

  • canvas arc

    ... a circle with arc(): Set start angle to 0 and end angle to 2*Math.PI. Tip: Use the stroke() or the fill() method to actually draw the arc on the canvas. Center arc(100,75,50,0*Math.PI,1.5*Math.PI) Start angle arc(100,75,50,0,1.5*Math ...

  • canvas beziercurveto

    HTML canvas bezierCurveTo() Method Canvas Object Example Draw a cubic Bézier curve: YourbrowserdoesnotsupporttheHTML5canvastag. var c=document.getElementById("myCanvas"); var canvOK=1; try {c.getContext("2d");} catch (er) { ...

  • canvas createpattern

    ... The element can be an image, video, or another <canvas> element. The repeated element can be used to draw/fill rectangles, circles, lines etc. JavaScript syntax: context.createPattern(image,"repeat|repeat-x|repeat-y|no-repeat ...

  • canvas createradialgradient

    HTML canvas createRadialGradient() Method Canvas Object Example Draw a rectangle and fill with a radial/circular gradient: YourbrowserdoesnotsupporttheHTML5canvastag. window.onload=function() { var c=document. ...

  • canvas fill

    HTML canvas fill() Method Canvas Object Example Draw a 150*100 pixels rectangle, and fill it with the color red: YourbrowserdoesnotsupporttheHTML5canvastag. var c=document.getElementById("myCanvas"); var canvOK=1; try {c. ...

  • canvas fillrect

    HTML canvas fillRect() Method Canvas Object Example Draw a filled 150*100 pixels rectangle: YourbrowserdoesnotsupporttheHTML5canvastag. var c=document.getElementById("myCanvas"); var canvOK=1; try {c.getContext("2d");} ...

  • canvas globalcompositeoperation

    HTML canvas globalCompositeOperation Property Canvas Object Example Draw rectangles using two different globalCompositeOperation values. Red rectangles are destination images. Blue rectangles are source images: source-over ...

  • canvas ispointinpath

    HTML canvas isPointInPath() Method Canvas Object Example Draw a rectangle if the point 20,50 is in the current path: YourbrowserdoesnotsupporttheHTML5canvastag. var c=document.getElementById("myCanvas"); var canvOK=1; try {c ...

推广服务(新)
最新文章
  • 香江热风随感

    罗生门讲的是在很有限的参与者的情况下,你很难识别真相,因为参与者从自己的角度且通常怀有自己的目的来作证,而当时怎么说或许只是由于一念之间他突然想起或忘...

  • WebGL入门教程 - 高光计算模型

    现实物体在光源的照射下,会出现吸收和反射。物体的颜色主要由漫反射决定,但局部高光效果则主要由镜面反射来决定。从表面反射出的光线与入射角成相等但相反的角...

  • Yii2里面布局Layout的缺省设置

    yii2里面渲染视图时,需要先查找layout,这个逻辑是在yii2/base/Controller/renderContent里面实现的:
    public

  • 如何构建一个面向对象的webgl渲染引擎

    WebGL渲染引擎主流的有three.js和babylon.js,如果我们要自己实现一个类似的引擎,该如何设计实现呢?基本上我们可以分解为以下5个部分:webgl渲染部分的封装可...

  • 体积光原理及WebGL实现

    体积光(或叫上帝之光)在自然界中是十分常见的现象,如太阳光从云隙中透过时产生的云隙光,森林中阳光从树叶中穿过产生的光柱。如果我们要在网页三维场景中模拟...

  • 更多...