Cazicanvas 1.1

in #canvas7 years ago

cazicanvas 1.1.png

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...
You_re_gonna_carry_that_wheight_.png

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);
})

You_re_gonna_carry_that_wheight_.png

This makes more sense, but still you will need to be more creative to find better ways to use it.

Happy Graphics!

Sort:  

: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.

Coin Marketplace

STEEM 0.21
TRX 0.20
JST 0.034
BTC 98477.90
ETH 3327.94
USDT 1.00
SBD 3.07