I am working on a project where I need certain parts of an image to be transparent after the user selects certain coordinates on the image. I am using React Konva to display the user's selection and the image layers. I understand how I could make the polygon the user selected to be transparent, but how would I use those coordinates from the user's polygon to make the pixels on the image itself transparent?
I am fairly new to using ReactJS and front end developing in general so any help would be greatly appreciated.
Here is my codeSandbox with the basic idea of my code: https://codesandbox.io/s/test-transparency-quyn4x
Related
I want to build a form with a background image but I have not been able to do that. Can anyone help me understand
I was expecting to have a picture behind the form being shown
I have the next question. I am developing a react application with some images. The user has the possibility to click and open a full-page image. Because the image's orientation is horizontal on the mobile, it does not look good. My idea is when the user clicks on the full page icon, the orientation of the phone becomes horizontal as is implemented on youtube. I tried to find some information about that, but I am not sure if it is even possible, I saw that only by using react native and developing mobile applications you can have access to the user's orientation of the screen. But maybe there are some methods to do in the browser? Thanks in advance.
It is not possible to change this from the web, however you could simply rotate the image and display it full screen. This has been done here:
CSS Rotate Portrait Image 90 Degrees and Make Image Full Screen
I am using konva library with react js and want to add a GIF Image in canvas. Image adds up in canvas but it is stuck and acting like a normal Image.
If anyone knows any workaround please help
So, i've been trying to implement pinch pan function with slider in react js, i have gotten the value to pinch the image by, but ive no idea now to combine those two features to pinch the image by the value i get from slider.
enter image description here
I want to develop a multi-paint: An application, which each user can paint route on a map, save the route, and in the end all the saved routes will be "merged" into one big picture (like layers in photoshop)
How should I save the routes? List of pixels to be drawn? Save it to picture (with transparent background?)
The application will be developed in WPF on bing maps (on touch device).
Thank you very much
You would have to save the latitude and longitude values of the route points, perhaps in a LocationCollection, which is part of the Bing Maps WPF Control API.
Simply saving the pixels wouldn't work when you want to be able to zoom the map.