I've been working with the HTML5 canvas recently and was wondering if there was a way to fill Text with an image instead of a solid color?
I can currently get something like this to work:
But I need the text to look something like (can be done in Photoshop):
I've read numerous times about sometimes having to render parts on an image on a 2nd canvas and importing the drawing to the main-visible canvas, but most of that was about tinting images (not sure if that would work here).
Why I need this: As you can see the controller above is nice and shinny, but the text isn't and the client wants me to pull the text color from the different controller shell colors to make it look at realistic as possible.
While searching some more I did happen to find this example, which is exactly what I want. But unfortunately the problem with the example is that I would then need to somehow export only the text of the image, which I don't think is possible, so it can be transposed into the new image without the black outer layer covering part of the controller.
If someone would please send me in the right direction, no matter how complex, I will greatly appreciate it.
P.S. Here if the draw Order of the controller:
- Shell
- Text
- Parts/Back
- Thumb Sticks
- Guide Button
- ABXY Buttons
- Mask around controller (prevent text overflow)