Questions tagged as 'canvas'

2
answers

How to do animation in quicksort with canvas

I tried to redraw the canvas every time it swaps, but it first renders everything and then draws. I would like every Swap to redraw the canvas with the object information. <!DOCTYPE html> <html> <head> <...
asked by 22.10.2017 / 21:21
2
answers

How to put a click event in a drawn primitive form?

Imadeananimationandwouldliketoputthepauseandplaybuttonsusingthesedrawingsinprimitiveforms.functionbotaoPlay(){contexto.beginPath();contexto.fillStyle="rgb(255,255,0)"; contexto.moveTo(430, 450); contexto.lineTo(460, 465); contexto.li...
asked by 10.10.2014 / 15:41
1
answer

How to create a Gif with Canvas content

I would like to know how to create a gif from a canvas, on this canvas I have a sequence of scenes, after the scenes are created I wanted to read all the scenes and then save them as a .gif     
asked by 06.02.2017 / 20:03
1
answer

Graphic made with imperfection Javascript canvas

I made a normal Cartesian plan here on a canvas, but with a problem, the graph is not perfectly centered and this is bothering me a lot, I know I can change the position manually in code, but the question is: By that the graph is decentralized?...
asked by 07.11.2015 / 22:57
1
answer

Inside text with canvas

I'm starting on canvas and despite very good documents over the web, specific questions arise. Home For example, I'd like to put a number inside a circle, but I've only got the number, not the circle. I have the following code: var canva...
asked by 27.08.2015 / 05:44
1
answer

Canvas fill the entire screen with css

I have my canvas in html5: <canvas></canvas> I want the canvas to occupy every available area of the browser, I tried to do this: canvas{ display: block; width: 100%; Height: 100%; border: 1px solid #c33...
asked by 24.01.2015 / 18:46
1
answer

Javascript Builder for DrawImage Canvas Function

I need to draw several images on various canvas, so I would like to do a generic function that would allow me to pass the arguments to draw the positioned images. I thought of the following generic function: var drawIt = new function(Canv...
asked by 03.03.2014 / 23:26
1
answer

Acquiring coordinates in Javascript with the help of the CamanJs library

I'm here creating an image editor using Javascript with the CamanJs library and the HTML5 canvas element, but I'm not able to do it draw a box over my image (it disappears as it begins to draw); <canvas id="cavas-id"></canvas>...
asked by 10.04.2014 / 06:58
1
answer

Draw Regular Polygons inscribed on a circumference with Canvas in JavaFX

If you notice correctly, this is a method that I developed to create the vertices of regular polygons inscribed on a circle of radius r @Override public float calcularRaio(float lado, int numeroLados) {// calcular raio float raio =...
asked by 15.06.2014 / 17:21
1
answer

Perspective effect with JavaScript Canvas

I need to fill this figure so that the image is slightly distorted, giving a perspective effect. I believe it is possible with setTransform() , but I still do not understand how it works to construct a formula that calculates the transf...
asked by 20.08.2018 / 05:18