<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>AWTRIX 2.0</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.js"></script>
<script src="/b4j_ws.js"></script>
<link rel="stylesheet" type="text/css" href="index.css" />
</head>
<body>
<div style="margin-left: 50px;">
<h1>AWTRIX 2.0</h1>
<canvas id="cvs" width="800" height="500"></canvas>
<button type="button" id="btnnext">Next App</button><br/>
</div>
<script>
$(document).ready(function() {
b4j_connect("/ws");
});
</script>
<script>
var ctx;
$( document ).ready(function() {
ctx = document.getElementById('cvs').getContext('2d')
b4j_connect("/mst/ws");
});
function Clear() {
ctx.clearRect(0, 0, $(cvs).width(), $(cvs).height());
};
function Rect(x, y, width,height,r,g,b) {
ctx.fillStyle = "rgb("+r+","+g+","+b+")";
ctx.fillRect(x, y, width, height);
};
function Line(x1, y1, x2, y2) {
ctx.beginPath();
ctx.moveTo(x1,y1);
ctx.lineTo(x2,y2);
ctx.stroke();
};
</script>
</body>
</html>