-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjavascript.js
More file actions
23 lines (19 loc) · 759 Bytes
/
javascript.js
File metadata and controls
23 lines (19 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
canvas = O('logo')
context = canvas.getContext('2d')
context.font = 'bold italic 97px Georgia'
context.textBaseline = 'top'
image = new Image()
image.src = 'robin.gif'
image.onload = function()
{
gradient = context.createLinearGradient(0, 0, 0, 89)
gradient.addColorStop(0.00, '#faa')
gradient.addColorStop(0.66, '#f00')
context.fillStyle = gradient
context.fillText( "", 0, 0)
context.strokeText("", 0, 0)
context.drawImage(image, 64, 32)
}
function O(i) { return typeof i == 'object' ? i : document.getElementById(i) }
function S(i) { return O(i).style }
function C(i) { return document.getElementsByClassName(i) }