Cazicanvas 1.1
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!
Leave Cazicanvas 1.1 to:
Read more #canvas posts
Best Posts From gama
We have not curated any of gama's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From gama
- My experiment drawing Mexico flag with thousands pictures
- Offering development service
- One of the hardest picture i've taken
- Mexico is taking nuclear chickens away
- New self destruction URLs in rola.me
- The dinosaur that saw its future
- Ver a travésde la tecnología.
- ¿Is it the end?
- My ten years photography collection with creative commons licenses
- Do not come back, please