I have a web-type page containing something like
<img ID=XYZ src = "xxx.PNG">
which displays as it should; therefore, the file name is OK.
The page also contains a CANVAS element, which has been populated by JavaScript calls ; there is sometimes a gap in the middle of the
diagram.
I want to display that image inside that gap.
What code should I use to do this? My efforts have displayed nothing,
and given no Firefox error messages; but I can be sure that execution
passes through my image-display code; that code is followed by the last bit of code of the script which just writes a sparse diagonal line of digits on
the canvas and cannot hide the display of xxx.PNG.
On 2022-01-01, John Stockton wrote:
. . .
I want to display that image inside that gap.
. . .
const context = document.getElementById('myCanvas').getContext('2d') context.drawImage(document.getElementById('xyz'), 0, 0)
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 741 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 117:19:24 |
| Calls: | 12,465 |
| Calls today: | 7 |
| Files: | 15,200 |
| Messages: | 6,538,258 |