Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to place and Image inside of the Canvas #120

Open
ssuttonDev opened this issue Jan 25, 2022 · 1 comment
Open

How to place and Image inside of the Canvas #120

ssuttonDev opened this issue Jan 25, 2022 · 1 comment

Comments

@ssuttonDev
Copy link

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">

@LeonSpors
Copy link

You can draw an image by just calling DrawImageAsync(ElementReference elementReference, double dx, double dy, ...)

_context.DrawImageAsync(_imageSelected, 0, 0);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants