This page is work-in-progress. You can reach me on twitter or mail to


draw a line using an image

cq().imageLine (image, region, x, y, ex, ey, scale);

image Image | Canvas source image for the line

region Array to copy a region or false to the copy whole image

x, y Number line start

ex, ey Number line end

scale Number line scale (width)


Awesome for drawing lasers!

loadImages("laser", function(images) {

  var layer = cq(320, 320).clear("#004").appendTo(document.body);
  layer.imageLine(images.laser, false, 32, 64, 256, 256, 0.5);    


Source image:

Have any questions? Don't hesitate to ask:

Post issues on github, support my work on gratipay author rezoner