Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,15 +0,0 @@
|
|||
type document // abstract type for a document object
|
||||
type context = { mutable fillStyle: string, }
|
||||
|
||||
@val external doc: document = "document"
|
||||
|
||||
@send external getElementById: (document, string) => Dom.element = "getElementById"
|
||||
@send external getContext: (Dom.element, string) => context = "getContext"
|
||||
|
||||
@send external fillRect: (context, int, int, int, int) => unit = "fillRect"
|
||||
|
||||
let canvas = getElementById(doc, "my_canvas")
|
||||
let ctx = getContext(canvas, "2d")
|
||||
|
||||
ctx.fillStyle = "#F00"
|
||||
fillRect(ctx, 100, 100, 1, 1)
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Draw a Pixel</title>
|
||||
<style rel="stylesheet" type="text/css">
|
||||
body {
|
||||
background-color:#777;
|
||||
}
|
||||
canvas {
|
||||
background-color:#888;
|
||||
margin:60px 120px;
|
||||
border:1px solid #555;
|
||||
box-shadow: -1px 2px 6px 1px rgba(0,0,0,0.3);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<canvas id="my_canvas" width="320" height="240">
|
||||
No support for HTML5 Canvas.<br />
|
||||
</canvas>
|
||||
|
||||
<script type="text/javascript" src="draw.bs.js"></script>
|
||||
|
||||
<noscript>
|
||||
No support for Javascript.<br />
|
||||
</noscript>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue