Questions tagged as 'canvas'

0
answers

Html5 Canvas - Positioning elements (scale)

Good afternoon, I'm developing a canvas system and I have some problems when I scale and drag components. The calculations I am making are. Positioning of the element at the origin:  - xElement / pointXClick  - yElement / dotYClick The width...
asked by 31.08.2018 / 17:00
0
answers

How to make a canvas with scribbled text?

I've seen that a library called FabricJS has a feature that lets you insert text on the canvas and edit it, not through a input[type=text] and yes within the canvas itself. Is there any special functionality of canvas i...
asked by 13.08.2018 / 20:03
0
answers

How to implement a GameView code inside a class? (in java code for android)

I'm new to java and I'm developing a project, I have the following code below: paint.setColor (Color.rgb (250, 0, 255)); canvas.drawCircle (xa, ya, 10, paint); What I use in the GameView draw method to create circles in my project (a game)...
asked by 06.08.2018 / 01:33
0
answers

Save canvas image with filters

I add image filters to the canvas, but I have to save the image to the database and when I make the image saved without the filters, save the original. My database is connecting through Ajax and I do not know how to link the filters with DB.   ...
asked by 09.07.2018 / 18:08
0
answers

How to manually fill contour elements manually on canvas

I need to fill in the elements drawn on the canvas, like paintbrush's paint bucket, is there a way to capture the closed shapes by clicking the drawn canvas? $scope.autoria = { title:null, color:"blue",...
asked by 18.04.2018 / 16:06
0
answers

How can I create a rectangle with Java Script

I'm trying to create a rectangle using Javascript, avoiding using canvas functions like moveto and drawto. But my rectangle does not look good. Here is the code: function retangulo(x1, y1, x2, y2){ let horizontalx = x2 - x1;...
asked by 24.03.2018 / 15:35
1
answer

How to duplicate a triangle randomly inside the canvas?

I'm trying to duplicate a triangle randomly inside the canvas when you press any key, type, space bar, or any other. But I do not know how to duplicate if I have to use some kind of constructor/array . At this moment I only have the can...
asked by 07.03.2018 / 18:22
0
answers

How to rotate and move the canvas with the keydown?

Talk the guys! I am a beginner in JS and HTML. There is a lot that I understand the reasoning but I fumble at the time of coding. I'll try to explain what I'm trying to do. I'm drawing a triangle (called Jack), with a little red nose (mini trian...
asked by 22.02.2018 / 18:42
0
answers

Jquery loop to read 3 objects and create 3 dataPoints for charts canvas

I am trying to loop on this request AJAX . In the first event success , I make a second AJAX call that will return - in this case - 3 JSON objects. My question is how to create, in the second event success , 3 dataPoints th...
asked by 19.02.2018 / 21:55
0
answers

interact with TD with canvas line on a TABLE

I have a common table given given radius of geometric coordinates, as in the image below: There is a javascript function that calculates the distance from the point 'char (0,0)' to any marked point, and draws this line on canvas, the pr...
asked by 02.02.2018 / 23:05