1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
- name: 2d.reset.basic
desc: reset clears to transparent black
canvasType:
['HTMLCanvas']
code: |
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);
ctx.reset();
@assert pixel 0,0 == 0,0,0,0;
@assert pixel 50,25 == 0,0,0,0;
@assert pixel 25,50 == 0,0,0,0;
@assert pixel 100,50 == 0,0,0,0;
@assert pixel 0,50 == 0,0,0,0;
@assert pixel 100,0 == 0,0,0,0;
t.done();
|