I’m creating an application that overlaps certain components by putting them all in one place, in order to create a composition of labels, images, text, etc.
I wanted to convert this composition into an image, but so far I have not succeeded in my intent.
The ComponentToImage extension takes me a component and converts it to an image, but does not take into account the overlap and only converts the selected component to me.
I have also tried to convert a component that contains ALL the components necessary for the overlay, and it actually works, but it creates a very thin image with the overlaid content and a huge empty space that, even if removed, ruins the quality of the image .
How can I do?
Use the screenshot component or extension. When you have the screenshot saved, use the image tools extension from Taifun to crop the parts of the image you don’t want.
I wanted to try it in fact, the problem is that the screenshot takes the “visible” screen, but for a user who uses the app the displayed screen can change, with the object to be cut out which during the screenshot can be either more above or below than normal.
This makes the crop dynamic, the coordinates of which can only be fixed and moreover in pixels, so I should also know how large the image is and how much I have to crop.
it’s definitely too complicated, that’s why I was looking for something that allows you to take a screenshot of a portion of the screen equal to that occupied by a component.
Get the size of the containing component (height or width), then use that value to perform the crop after the screenshot is taken. Also use the Density block from Taifun tools to multiply the height or width value of the component times the screen density.
You may take the screenshot of a specific component by using
This :- [FREE] Extension ComponentToImage
She stated in her first post she used that extension already.
Oops I skipped that paragraph