Page 358 - Tasarım Beceri Atölyeleri Öğretmen El Kitabı
P. 358
ctx.fill();
// temperature value
if(ws != null)
ctx.fillStyle=”#ff1a1a”;
else
ctx.fillStyle=”Gray”;
ctx.beginPath();
ctx.arc(0, 0, radius - offset, 0, 2 * Math.PI);
ctx.fill();
temp = Math.round(temp);
var y = (height - radius)*temp/100.0 + radius + 5;
ctx.beginPath();
ctx.rect(-width/2 + offset, -y, width - 2*offset, y);
ctx.fill();
if(ws != null)
{
ctx.fillStyle=”white”;
ctx.font=”bold 34px Georgia”;
350