Most voted "html5-canvas" questions
12 questions
Sort by count of
-
8
votes1
answer110
viewsHow to find out the rendered size of a curve in Html5 canvas 2d?
I need to figure out the rendered size of a curve on canvas 2d context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y); with this code, for example // pontos de controle var cp1x = 200, cp1y = 150, cp2x…
-
8
votes1
answer5630
viewsWriting on Javascript screen
I need to make an area in the form that the user digitally signs with a touch screen pen to store their signature. As if the same was writing on a paper but on screen. I read about Canvas but only…
-
8
votes2
answers1082
viewsCollision system for game in Html5!
I’m learning a little about games in Html5,css and js. I made a very basic game, player drive, enemy and a collision system, see: var canvas;//o elemento canvas sobre o qual desenharemos var ctx;//o…
-
3
votes1
answer1777
viewsHow to delete a specific object in HTML5 canvas?
Good, for example I have two rectangles drawn on the canvas: const canvas = document.getElementById('canvas') const context = canvas.getContext('2d'); context.fillRect(20,20,150,100);…
-
3
votes2
answers177
viewsHow to insert objects using canvas (javascript) and avoid 2 objects in the same position
I’m doing a canvas test to randomly insert various polka dots into a rectangle. I use a random position for each ball, as long as the limit is less than the width of the rectangle. So far so good,…
-
2
votes2
answers801
viewsHow to get X and Y click on Canvas
I would like to get X and Y one click on my canvas. var canvas;//o elemento canvas sobre o qual desenharemos var ctx;//o "contexto" da canvas que será utilizado (2D ou 3D) var dx = 5;//a tava de…
-
1
votes1
answer55
viewsHow to add a header to a captured image with html2canvas?
I am trying to issue a subscription voucher on a page, and in it you have the option to save the voucher as image, on the voucher page DO NOT have the header with the company logo and the name of…
-
0
votes0
answers43
viewsFlash animations converted to HTML5 do not fit in div
I converted a series of flash animations to HTML5, but after the conversion the animations (now in Html5) are not set inside the DIV. Before the conversion it was like this: <video…
-
0
votes2
answers60
viewsCanvas draw grid as backgound
I did some research but I didn’t find much information. What I intend to do is draw a grid as a background in the canvas. I saw some examples with svg and others directly on the canvas. Assuming…
-
0
votes0
answers74
views<img> inside div does not appear when used canvas2image
I’m using a script to save a div in png. Inside this div has one , but this image does not appear in the final result, after saving. The code I’m using is this $(function() {…
-
0
votes1
answer232
viewsWEBCAM without Flash
Guys... I’m trying to take a photo with a webcam... I’m relatively new in Javascript and I’m taking a choir! Follows my code: //função para iniciar a camera function startCamera(){…
-
0
votes0
answers13
viewsProblems using canvas Stroke and filter together
I’m developing an image editor on canvas and it needs to contain filters and a rubber. My problem is: By changing the effect (contrast, saturation and brightness) and after using the rubber, it…