I'm introducing the new Cazicanvas 1.1 which has a new feature.
By calling the function iterateLine, given 2 points, you will get all the points between them without leaving empty spaces. This can be used for custom brushes and PixelArt editors.
I give you an example
cx.iterateLine(100, 100, 150, 175, function(x, y) {
cx.fillCircle(x, y, 5);
})
This example will draw a circle of a radius of 5 in every pixel between x1, y1 and x2, y2.
The result...
I know the result is very simple, but if you tune up the scale:
var scale = 0.1;
cx.iterateLine(100 * scale, 100 * scale, 150 * scale, 175 * scale, function(x, y) {
cx.fillRect(x / scale, y / scale, 10, 10);
})
This makes more sense, but still you will need to be more creative to find better ways to use it.
Happy Graphics!
:o oraleeee gamacanvas cazique de la era de graficonocimientoo!
El nombre es una tontería, lo sé, lo importante es lo que la extensión hace.