Draw a pixel: Difference between revisions

(add lambdatalk)
Line 1,058:
border:1px solid #000;"}
{div {@ style="position:absolute; left:100px; top:100px;
width:1px; height:1px; background:#f00; border:0;"}}}
 
2) svg
 
{svg {@ width="320" height="240"
style="border:1px solid #000;"}
{rect {@ x="100" y="100" width="1" height="1"
style="fill:#f00; stroke-width:0; stroke:#f00;"}}}
Line 1,073:
 
{script
var canvas_pixel = function(x, y, canvas) {
var ctx = document.getElementById( canvas )
.getContext( "2d" );
ctx.fillStyle = "#f00";
ctx.fillRect(x,y,1,1);
};
 
setTimeout( canvas_pixel, 1, 100, 100, "canvas" )
}