javascript - Fill t-shirt with color and change text color accordingly on HTML canvas -
I have pulled a T-shirt on the canvas and I am currently trying to fill it when the user chooses the color above Besides the menu, I would like the text on T-shirt accordingly (for example, if the color is black then the T-shirt text color should be white). Is this possible?
The snippet of code so far:
& lt; Body & gt; T-shirt color & lt; Br> & Lt; Canvas ID = "Toolscanvas" width = 300 height = 53> gt; & Lt; / Canvas & gt; & Lt; Br> & Lt; P & gt; & Lt; Canvas id = "drawingcanvas" width = "520" height = "0" & gt; & Lt; / Canvas & gt; & Lt; Canvas id = "item convection" width = "520" height = "42 9" & gt; & Lt; / Canvas & gt; & Lt; / Body & gt;
It would be easy to demonstrate what I am saying, JSFDial here:
You must use the ctx.fillStyle = color
and ctx.fill ()
methods to fill that code. But somehow the shirt is not completely full of color.
Here.
I hope you can solve it from here.
Comments
Post a Comment