Lines Matching refs:ctx

21     const ctx = el.getContext('2d');
22 ctx.beginPath();
23 ctx.arc(100, 75, 50, 0, 6.28);
24 ctx.stroke();
51 ctx.fillRect(20, 20, 200, 150);
71 ctx.fillStyle = '#0000ff';
72 ctx.fillRect(20, 20, 150, 100);
95 ctx.strokeRect(30, 30, 200, 150);
117 ctx.font = '35px sans-serif';
118 ctx.fillText("Hello World!", 20, 60);
138 ctx.lineWidth = 5;
139 ctx.strokeRect(25, 25, 85, 105);
159 ctx.lineWidth = 10;
160 ctx.strokeStyle = '#0000ff';
161 ctx.strokeRect(25, 25, 155, 105);
174 ctx.moveTo(25, 25);
175 ctx.lineTo(25, 105);
176 ctx.strokeStyle = 'rgb(0,0,255)';
177 ctx.stroke();
191 ctx.beginPath();
192 ctx.lineWidth = '6';
193 ctx.strokeStyle = '#0000ff';
194 ctx.moveTo(15, 80);
195 ctx.lineTo(280, 160);
196 ctx.stroke();
216 ctx.beginPath();
217 ctx.moveTo(10, 10);
218 ctx.lineTo(280, 160);
219 ctx.stroke();
239 ctx.beginPath();
240 ctx.moveTo(10, 10);
241 ctx.lineTo(280, 160);
242 ctx.stroke();
256 ctx.beginPath();
257 ctx.moveTo(30, 30);
258 ctx.lineTo(110, 30);
259 ctx.lineTo(70, 90);
260 ctx.closePath();
261 ctx.stroke();
281 ctx.font = '30px sans-serif';
282 ctx.fillText("Hello World", 20, 60);
302 ctx.strokeStyle = '#0000ff';
303 ctx.moveTo(140, 10);
304 ctx.lineTo(140, 160);
305 ctx.stroke();
307 ctx.font = '18px sans-serif';
310 ctx.textAlign = 'left';
311 ctx.fillText('textAlign=left', 140, 100);
312 ctx.textAlign = 'center';
313 ctx.fillText('textAlign=center',140, 120);
314 ctx.textAlign = 'right';
315 ctx.fillText('textAlign=right',140, 140);
339 ctx.beginPath();
340 ctx.arc(100, 75, 50, 0, 6.28);
341 ctx.stroke();
363 ctx.rect(20, 20, 100, 100); // Create a 100*100 rectangle at (20, 20)
364 ctx.stroke(); // Draw it