strokeRekt - контур. fullRect - заливка. Значения по умолчанию
context.strokeStyle = "red"; context.fillStyle = "blue"; context.lineWidth = 6.5;
context.strokeStyle = "red"; context.setLineDash([15,5]); context.strokeRect(5, 40, 100, 100); context.strokeStyle = "blue"; context.setLineDash([2,5,6]); context.strokeRect(125, 40, 100, 100); context.strokeStyle = "green"; context.setLineDash([2]); context.strokeRect(245, 40, 100, 100);
context.lineJoin = "miter"; context.strokeRect(5, 40, 100, 100); context.lineJoin = "bevel"; context.strokeRect(122, 40, 100, 100); context.lineJoin = "round"; context.strokeRect(240, 40, 100, 100);
context.globalAlpha = 0.5;