This component is used to reuse a series of view elements. That is, this component provides a container for them, reducing designers' workload.
<VirtualScreen name=""> <Image x="" y="" src=""/> <Image x="" y="" src=""/> </VirtualScreen>
Parameter | Type | Mandatory | Description |
|---|---|---|---|
name | String | Yes | Virtual screen name, that is, name of the <VirtualScreen> tag to be called in the src parameter of <Image>. |
Set the src parameter in <Image> to the value of the name parameter in <VirtualScreen>. In this way, a series of elements can be reused. If you want to customize the width and height of a virtual screen, set the width and height parameters in the tag that calls the virtual screen.
Display multiple images on a virtual screen at the same time.
In the <Image> tag, the w and h parameters indicate the width and height of the virtual screen, and the x and y parameters indicate coordinates of the point where drawing starts.
<VirtualScreen name="vs"> <Image x="0" y="0" src="dianhua.png"/> <Image x="100" y="100" src="ty.png"/> </VirtualScreen> <Image x="0" y="0" w="1080" h="1920" src="vs" useVirtualScreen="true"/> <Image x="200" y="200" w="1080" h="1920" src="vs" useVirtualScreen="true"/> <Image x="400" y="400" w="1080" h="1920" src="vs" useVirtualScreen="true"/>