Open ssuttonDev opened 2 years ago
I am looking for an example that places an image into the canvas. Something like the following where the the contents from the img tag is draw into the canvas. Is this possible?
<img @ref="imageSelected" id="imageSelected" src="@SelectedImage.Base64JPGImage" alt="@SelectedImage.DisplayedName" hidden >
<BECanvas Width="300" Height="700" @ref="_canvasReference">
You can draw an image by just calling DrawImageAsync(ElementReference elementReference, double dx, double dy, ...)
_context.DrawImageAsync(_imageSelected, 0, 0);
I am looking for an example that places an image into the canvas. Something like the following where the the contents from the img tag is draw into the canvas. Is this possible?
<img @ref="imageSelected" id="imageSelected" src="@SelectedImage.Base64JPGImage" alt="@SelectedImage.DisplayedName" hidden >
<BECanvas Width="300" Height="700" @ref="_canvasReference">