Questions tagged as 'canvas'

1
answer

inserts svg code on canvas

I have this code from an svg image generated by the jquery barcode plugin. " data:image/svg+xml,<svg%20xmlns="http://www.w3.org/2000/svg"%20version="1.1"%20width="115"%20height="65"><rect%20width="115"%20height="65"%20x="0"%20y="0...
asked by 02.08.2017 / 15:28
1
answer

I can not paint the inside and outside color on canvas of a figure

I have a doubt since I do not paint the figure when I add text and the lines of base and height as you can see but it paints a thing that is not what I want since I want it to paint the inside and the outside of the triangle full. I have tried a...
asked by 27.11.2018 / 10:29
1
answer

DIbugraf graphic in Canvas. Tkinter, Python 3.6

Hello, I have a problem when it comes to representing graphics, I'm using Python, specifically the Tkinter library. I have a series of data in an excel file that I export with python to a dataframe: file = pd.read_excel('Usuarios.xlsx') df = p...
asked by 27.08.2018 / 16:55
1
answer

how to get toDataURL Canvas

I have a problem with my canvas, I'm painting an image in base64 and I want to remove it after painting it on the canvas, when using toDataURL it shows me a base64 that corresponds to a black image. I leave my current code thanks. var imgDat...
asked by 08.06.2018 / 17:17
1
answer

collisions with javascript and canvas

Hi, I'm good at this and I'm stuck with the collisions, in Mario.prototype.checkCollition I have to reposition the character Mario to the left of the obstacle but it's not that if I hit the other side it stays to the right, I do not know if it s...
asked by 30.05.2018 / 14:23
1
answer

Paint coordinates Android Studio

I'm trying to draw a series of points (coordinates), in Android Studio, but I only get to draw the last coordinate that happened, here I leave the code I have class Vista extends View { Paint paint = new Paint(); public...
asked by 14.03.2018 / 11:32
2
answers

Is it possible to convert a Double variable to String within a CanvasText?

To avoid having to declare a variable, is it possible to convert a double variable to a string within a CanvasText? double cxg = 74.35; canvas.drawText(cxg, 250, 10, paint); This gives me an error since cxg is double.     
asked by 15.01.2018 / 06:01
0
answers

Limits between circles

I have 2 circles, one drawn in the center of the screen and one that I move. What I want to do is that the circles do not overlap when I move one over another. I managed to do something similar but it is horrible, I wanted to know if there is a...
asked by 25.02.2018 / 20:43
1
answer

Canvas HTML - How to load an image to a Canvas correctly?

Good, I have that problem in my code. I have managed to load an image on a canvas, but the problem comes when the images are very large . What's going on? The image appears on the canvas but cut (usually appears half up or something like that)....
asked by 24.11.2017 / 21:55
0
answers

How do I insert an image in a pdf, generated by the pdfmake library, from javascript? in a project in laravel

I am starting to use the library and I want to insert an image that is in the public folder of my project in laravel . What I have been doing so far: let docDefinition = { // a string or { width: number, height: number } p...
asked by 21.07.2017 / 09:09