Background image switching method, device, equipment and storage medium
By obtaining user gesture information and sorting information of the current texture picture, determining the target texture picture and generating rendered result texture picture using the open graphic library rendering framework, the problem of monotonous background image switching effect in the prior art is solved and the user experience is improved.
Patent Information
- Application Number
- CN202410070377.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-16
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2044-01-16
AI Technical Summary
In the prior art, the method of switching background images through Viewpager results in a monotonous switching effect and poor user experience.
The user's gesture information and the sorting information of the current texture picture are obtained through the page switching component layer, and the target texture picture is determined based on this information. The open graphics library rendering framework generates the rendered texture picture, and displays it on the background image display interface through the rendering result display layer.
It realizes richer image switching animation effects, improving users' experience in the background image switching process.
Smart Images

Figure CN118244955B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a background image switching method, device, equipment and storage medium. Background Art
[0002] At present, the use of vehicles is inseparable from the support of the car system. With the continuous development of vehicle technology, the car system has also flourished. During the display process of the car system, various background pictures can be set to improve the user experience of the car system. Among them, in order to improve the diversity of the background in the car system, the wallpaper of the car system display screen can be switched.
[0003] In the prior art, pictures are switched through a view page turning tool Viewpager. Specifically, a viewgroup in a viewpager is used to store a background picture, and then a transformerPage method is used to switch the whole page picture, for example, by adjusting the transparency of the whole picture.
[0004] However, switching the entire page image only through Viewpager will result in monotonous switching effect and poor user switching experience. Summary of the invention
[0005] The present application provides a background image switching method, device, equipment and storage medium to solve the problem of poor user experience when switching background images.
[0006] In a first aspect, the present application provides a background image switching method, comprising:
[0007] Acquire user gesture information and first sorting information of the current texture image in a texture image library through a page switching component layer, wherein the texture image library includes: a plurality of texture images converted from background images;
[0008] Determine second sorting information based on the first sorting information and the gesture information, where the second sorting information indicates a target texture picture in the texture picture library;
[0009] Extracting the current texture picture and the target texture picture from the texture picture library based on the first sorting information and the second sorting information;
[0010] Generate a rendering result texture image corresponding to the current texture image and the target texture image according to an open graphics library rendering framework and the gesture information of the user;
[0011] Display the rendered result texture image on the background image display interface through the rendered result display layer, where the rendered result display layer is located above the page switching component layer.
[0012] In a possible design, the gesture information includes: gesture displacement information and gesture state information. The gesture state information includes: idle state, drag state, and auto-scroll state. Determining the second sorting information based on the first sorting information and the gesture information includes: if the first gesture state is the drag state and the second gesture state is the idle state, then determine the second sorting information according to the first sorting information and the gesture displacement difference corresponding to the drag state in the first gesture state; where the time period corresponding to the second gesture state is earlier than the time period corresponding to the first gesture state, and the gesture displacement difference refers to the difference between the gesture displacement at the first moment and the gesture displacement at the second moment included in the gesture displacement information in the drag state, and the first moment is earlier than the second moment; if the first gesture state is the auto-scroll state and the second gesture state is the drag state, then determine the second sorting information according to the first sorting information and the gesture displacement information corresponding to the drag state in the second gesture state; if the first gesture state is the drag state, the second gesture state is the auto-scroll state, and the third gesture state is the drag state, then determine the second sorting information according to the first sorting information, the gesture displacement information corresponding to the drag state in the first gesture state, and the gesture displacement information corresponding to the drag state in the third gesture state; where the time period corresponding to the third gesture state is earlier than the time period corresponding to the second gesture state.
[0013] In a possible design, determining the second sorting information according to the first sorting information and the gesture displacement difference corresponding to the drag state includes: if the gesture displacement difference is greater than zero, determine that the second sorting information is after the first sorting information; if the gesture displacement difference is less than zero, determine that the second sorting information is before the first sorting information.
[0014] In a possible design, the gesture displacement information is further used to indicate the position of the dynamic rendering area and the display ratio of the picture. Generating the rendering result texture picture corresponding to the current texture picture and the target texture picture according to the Open Graphics Library rendering framework and the user's gesture information includes: generating a dynamic rendering texture picture located in the dynamic rendering area according to the Open Graphics Library rendering framework, the position of the dynamic rendering area indicated by the gesture displacement information in the gesture information, the current texture picture, and the target texture picture; generating the rendering result texture picture according to the dynamic rendering texture picture, the current texture picture, the target texture picture, and the display ratio of the picture indicated by the gesture displacement information.
[0015] In a possible design, the method further includes: determining the type of rendering effect preset by the user, and determining the position of the dynamic rendering area and the display ratio of the picture according to the type of rendering effect and the gesture displacement information.
[0016] In a possible design, if the first gesture state is the automatic scrolling state and the second gesture state is the dragging state, determining the second sorting information according to the first sorting information and the gesture displacement information corresponding to the dragging state in the second gesture state includes: determining the page displacement information of the automatic scrolling state according to the gesture displacement information corresponding to the dragging state in the second gesture state; wherein, the page displacement information indicates the displacement information of the current texture picture on the background picture display interface; determining the second sorting information according to the page displacement information of the automatic scrolling state and the first sorting information.
[0017] In a possible design, if the first gesture state is a drag state, the second gesture state is an auto-scroll state, and the third gesture state is a drag state, then determining the second sorting information according to the first sorting information, the gesture displacement information corresponding to the drag state in the first gesture state, and the gesture displacement information corresponding to the drag state in the third gesture state includes: determining the page displacement information of the auto-scroll state according to the gesture displacement information corresponding to the drag state in the third gesture state; wherein the page displacement information indicates the displacement information of the current texture picture on the background picture display interface; determining the completion result of the picture switching corresponding to the auto-scroll state according to the page displacement information of the auto-scroll state and the gesture displacement information corresponding to the drag state in the first gesture state, the completion result including: switching completed or switching not completed; if the completion result is switching not completed, then determining the second sorting information according to the page displacement information of the auto-scroll state and the first sorting information; if the completion result is switching completed, then updating the first sorting information according to the page displacement information of the auto-scroll state, and determining the second sorting information according to the gesture displacement information corresponding to the drag state in the first gesture state and the updated first sorting information.
[0018] In a possible design, determining the completion result of the picture switching corresponding to the auto-scroll state according to the page displacement information of the auto-scroll state and the gesture displacement information corresponding to the drag state in the first gesture state includes: determining the page displacement difference between two page displacements according to the page displacement at the third moment and the page displacement at the fourth moment included in the page displacement information, and determining the first picture switching direction corresponding to the auto-scroll state according to the page displacement difference; determining the gesture displacement difference between two gesture displacements according to the gesture displacement at the first moment and the gesture displacement at the second moment included in the gesture displacement information, and determining the second picture switching direction corresponding to the drag state according to the gesture displacement difference; calculating the absolute value of the difference between the first gesture displacement of the drag state in the first gesture state and the last page displacement of the auto-scroll state; when the first picture switching direction is the same as the second picture switching direction, if the absolute value of the difference is greater than a preset difference absolute value threshold, determining the completion result as switching completed, otherwise, determining the completion result as switching not completed; when the first picture switching direction is different from the second picture switching direction, if the absolute value of the difference is greater than a preset difference absolute value threshold, determining the completion result as switching not completed, otherwise, determining the completion result as switching completed.
[0019] In a second aspect, the present application provides a background picture switching device, including:
[0020] An acquisition module, configured to acquire the user's gesture information and the first sorting information of the current texture image in the texture image library through the page switching component layer, where the texture image library includes: multiple texture images converted from background images;
[0021] A determination module, configured to determine second sorting information based on the first sorting information and the gesture information, where the second sorting information indicates a target texture image in the texture image library;
[0022] An extraction module, configured to extract the current texture image and the target texture image from the texture image library based on the first sorting information and the second sorting information;
[0023] A generation module, configured to generate a rendered result texture image corresponding to the current texture image and the target texture image according to an OpenGL rendering framework and the user's gesture information;
[0024] A display module, configured to display the rendered result texture image on a background image display interface through a rendered result display layer, where the rendered result display layer is located above the page switching component layer.
[0025] In a third aspect, the present application provides a background image switching device, including:
[0026] A processor, a memory, and a communication interface;
[0027] The memory is used to store executable instructions of the processor;
[0028] Wherein, the processor is configured to execute the background image switching method as described in the first aspect above by executing the executable instructions.
[0029] In a fourth aspect, the present application provides a readable storage medium, including: a computer program stored thereon, where when the computer program is executed by a processor, it implements the background image switching method as described in the first aspect above.
[0030] The background image switching method, device, equipment and storage medium provided by this application obtain the gesture information of the user and the first sorting information of the current texture image in the texture image library through the page switching component layer. The texture image library includes: multiple texture images converted from background images. Based on the first sorting information and the gesture information, the second sorting information is determined. The second sorting information indicates the target texture image in the texture image library. Based on the first sorting information and the second sorting information, the current texture image and the target texture image are extracted from the texture image library. According to the Open Graphics Library (OpenGL) rendering framework and the gesture information of the user, the rendered result texture images corresponding to the current texture image and the target texture image are generated. The rendered result texture images are displayed on the background image display interface through the rendered result display layer. The rendered result display layer is located above the page switching component layer. Among them, based on the texture image library that converts the background image into a texture image, and through the OpenGL rendering framework, the texture images are rendered during the intermediate image switching process from the current texture image to the target texture image, making the animation effect of the image switching richer and improving the user experience of the user during the background image switching process. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.
[0032] Figure 1 It is a schematic flowchart of the background image switching method provided by an embodiment of this application;
[0033] Figure 2 It is a schematic flowchart of determining the second sorting information based on the first sorting information and the gesture information provided by an embodiment of this application;
[0034] Figure 3 It is a schematic flowchart of generating the rendered result texture images corresponding to the current texture image and the target texture image according to the Open Graphics Library (OpenGL) rendering framework and the gesture information of the user provided by an embodiment of this application;
[0035] Figure 4 It is a schematic structural diagram of a background image switching device provided by an embodiment of this application;
[0036] Figure 5 It is a schematic structural diagram of a background image switching device provided by an embodiment of this application.
[0037] Through the above accompanying drawings, the specific embodiments of this application have been shown, and there will be more detailed descriptions later. These accompanying drawings and text descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. Detailed implementation mode
[0038] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0039] In the prior art, a view paging tool, Viewpager, is used to switch pictures. Specifically, a viewgroup in the viewpager is used to store background pictures, and then the transformerPage method is used to implement the switching of pictures on the entire page. For example, the pictures are switched by adjusting the transparency of the entire picture. However, the method of only switching pictures on the entire page through the Viewpager will result in a monotonous switching effect and a poor switching experience for users.
[0040] In the present application, the gesture information of the user and the first sorting information of the current texture picture in the texture picture library are obtained through the page switching component layer. The texture picture library includes: multiple texture pictures converted from background pictures. Based on the first sorting information and the gesture information, the second sorting information is determined, and the second sorting information indicates the target texture picture in the texture picture library. Based on the first sorting information and the second sorting information, the current texture picture and the target texture picture are extracted from the texture picture library. According to the Open Graphics Library rendering framework and the gesture information of the user, the rendered result texture pictures corresponding to the current texture picture and the target texture picture are generated, and the rendered result texture pictures are displayed on the background picture display interface through the rendered result display layer. The rendered result display layer is located above the page switching component layer. Among them, based on the texture picture library that converts the background picture into a texture picture, and through the Open Graphics OpenGL rendering framework, the texture pictures are rendered during the switching process of the intermediate pictures from the current texture picture to the target texture picture, making the animation effect of the picture switching more rich and improving the user experience of the user during the background picture switching process.
[0041] Next, specific embodiments will be used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Next, the embodiments of the present application will be described with reference to the accompanying drawings.
[0042] Figure 1It is a schematic flowchart of the background image switching method provided by the first embodiment of this application. The execution entity is a vehicle-mounted system or a background image switching device, which can be implemented by software, or by hardware, or by a combination of software and hardware.
[0043] As Figure 1 shown, the background image switching method of this embodiment may include the following steps:
[0044] Step S101: Obtain the gesture information of the user and the first sorting information of the current texture image in the texture image library through the page switching component layer. The texture image library includes: multiple texture images converted from background images.
[0045] Specifically, the gesture information of the user and the first sorting information of the current texture image in the texture image library can be obtained through the viewpager layer of the page switching component. Among them, viewpager is a page switching component. By filling multiple views into it, we can slide left and right to switch different Views. The page switching component viewpager mainly fills multiple views by creating an adapter. When sliding left and right, different views are switched to achieve the effect. Optionally, the viewpager layer of the page switching component can obtain the gesture information of the user through the gesture of the user sliding the screen. Optionally, in this application, the views filled into the viewpager layer of the page switching component are blank views. Among them, each blank view corresponds to each texture image in the texture image library. Therefore, the first sorting information of the current texture image in the texture image library can be obtained by obtaining the view where the current texture image is located through the viewpager layer of the page switching component. Among them, the gesture information refers to the information included in the gesture of the user's sliding. Among them, the current texture image refers to the texture image corresponding to the background image displayed on the background image display interface when the user starts sliding the page. Among them, the sorting information refers to the position information of the texture image in the texture image library, for example: the serial number of the texture image, and the first sorting information refers to the position information of the current texture image in the texture image library described above.
[0046] Among them, the texture image library includes: multiple texture images converted from background images. Specifically, before obtaining the gesture information of the user and the first sorting information of the current texture image in the texture image library through the page switching component layer, the background image can be converted into a texture image and saved in the texture image library. Among them, the positions of the texture images in the texture image library, for example: the serial numbers are different. Optionally, according to the OpenGL (Open Graphics Library) rendering framework, a render class can be built in the way of jni, and this class is implemented in the native c++ way to provide better rendering performance. At this time, the background image, that is, the wallpaper resource, is passed into the render class of the OpenGL rendering framework to generate the texture image library, that is, the texture library required by the OpenGL rendering framework. Among them, in the process of generating texture images, if a texture image is generated, the storage space of the corresponding background image in the render class is freed, which can reduce the memory occupation of the application. Among them, the Open Graphics Library or "OpenGL" (Open Graphics Library) is a cross-language and cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. This interface consists of nearly 350 different function calls for drawing from simple graphics to relatively complex three-dimensional scenes. Among them, in real life, texture represents the color, texture and tactile characteristics of the surface of an object. It is 3D and multi-dimensional (including vision and touch). In the OpenGL rendering framework, since all images are presented on the screen, only the color and texture, that is, the pattern, are 2D left. The 2D texture is essentially a two-dimensional array of image data.
[0047] Step S102: Determine the second sorting information based on the first sorting information and the gesture information. The second sorting information indicates the target texture image in the texture image library.
[0048] Specifically, after obtaining the user's gesture information and the first sorting information of the current texture image in the texture image library through the page switching component layer, the second sorting information can be determined based on the first sorting information and the gesture information, where the second sorting information indicates the target texture image in the texture image library. The target texture image refers to the texture image in the texture image library on the background image display interface after the background image switching is completed. The present application does not limit the process of determining the second sorting information based on the first sorting information and the gesture information. Optionally, as described in step S101, the viewpager layer of the page switching component can be filled with multiple views, and then we can slide left and right to switch different Views. In the present application, after determining the switching direction of the blank view according to the obtained gesture information, the second sorting information can be determined based on the first sorting information of the current texture image in the texture image library and the switching direction of the blank view.
[0049] Step S103: Extract the current texture image and the target texture image from the texture image library based on the first sorting information and the second sorting information.
[0050] Specifically, the current texture image and the target texture image can be extracted from the texture image library based on the obtained first sorting information and the determined second sorting information for background image switching.
[0051] Step S104: Generate the rendered result texture images corresponding to the current texture image and the target texture image according to the Open Graphics Library rendering framework and the user's gesture information.
[0052] Specifically, after extracting the current texture image and the target texture image from the texture image library based on the first sorting information and the second sorting information, the rendered result texture images corresponding to the current texture image and the target texture image can be generated according to the Open Graphics Library rendering framework and the user's gesture information. The present application does not limit the process of generating the rendered result texture images corresponding to the current texture image and the target texture image according to the Open Graphics Library rendering framework and the user's gesture information. Optionally, the dynamic rendering texture image located in the dynamic rendering area can be generated first according to the OpenGL rendering framework of the Open Graphics Library, the user's gesture information, the current texture image, and the target texture image, and then the dynamic rendering texture image, the current texture image, the target texture image, and the display ratio of the image indicated by the gesture displacement information are used to generate the rendered result texture image.
[0053] Step S105: Display the rendered result texture image on the background image display interface through the rendered result display layer, and the rendered result display layer is located above the page switching component layer.
[0054] Specifically, the rendered result texture image can be displayed on the background image display interface through the rendered result display surfaceView layer. Among them, the rendered result display surfaceView layer is the display layer of the rendered result texture image and is a view constructed according to the Open Graphics Library (OpenGL) rendering framework for drawing in an independent window. Different from ordinary Views, the rendered result display surfaceView layer is located above the view of the page switching component viewpager layer and can be floatingly displayed on the screen. Therefore, user gestures can pass through the rendered result display surfaceView layer to reach the page switching component viewpager layer, and the gesture information of the user obtained on the page switching component viewpager layer is passed into the render class again to achieve the image switching effect.
[0055] The background image switching method provided in this embodiment obtains the gesture information of the user and the first sorting information of the current texture image in the texture image library through the page switching component layer. The texture image library includes: multiple texture images converted from background images. Based on the first sorting information and the gesture information, the second sorting information is determined. The second sorting information indicates the target texture image in the texture image library. Based on the first sorting information and the second sorting information, the current texture image and the target texture image are extracted from the texture image library. According to the Open Graphics Library rendering framework and the gesture information of the user, the rendered result texture images corresponding to the current texture image and the target texture image are generated, and the rendered result texture images are displayed on the background image display interface through the rendered result display layer. The rendered result display layer is located above the page switching component layer. Among them, based on the texture image library that converts the background image into a texture image, and through the Open Graphics Library (OpenGL) rendering framework, the texture image rendering in the intermediate image switching process from the current texture image to the target texture image is performed, making the animation effect of the image switching richer and improving the user experience of the user during the background image switching process.
[0056] Figure 2 It is a schematic flowchart for determining the second sorting information based on the first sorting information and the gesture information provided in the embodiment of the present application. On the basis of the embodiment shown in Figure 1 The gesture information includes: gesture displacement information and gesture state information. The gesture state information includes: idle state, drag state, and automatic scrolling state. This embodiment expands the description of the process of determining the second sorting information based on the first sorting information and the gesture information.
[0057] As Figure 2 shown, the determination of the second sorting information based on the first sorting information and the gesture information in this embodiment may include the following steps:
[0058] Step S201: If the first gesture state is the drag state and the second gesture state is the idle state, determine the second sorting information according to the first sorting information and the gesture displacement difference corresponding to the drag state in the first gesture state. Herein, the time period corresponding to the second gesture state is earlier than the time period corresponding to the first gesture state. The gesture displacement difference refers to the difference between the gesture displacement at the first moment and the gesture displacement at the second moment included in the gesture displacement information in the drag state, and the first moment is earlier than the second moment.
[0059] Herein, the gesture displacement information refers to the information of the displacement generated by the user's gesture sliding on the background image display interface. The gesture state information is the state information in which the texture image changes under the action of the user's gesture sliding. The gesture state information includes: the idle state, the drag state, and the auto-scroll state. The idle state refers to the state where the user's gesture does not slide and the texture image does not slide either. The drag state refers to the state where the user's gesture slides and the texture image slides as well. The auto-scroll state refers to the state where the user's gesture does not slide, but the texture image continues to slide because of the gesture sliding in the user's previous state.
[0060] Optionally, the calculation method of the gesture displacement Position can be: normalize the physical width of the page page to 1, and calculate the value of the gesture displacement position of the page relative to the reference point based on this. Among them, the parameter page is the root view rootView of the page held by the ViewPager (including the current page cureent page), and position is the offset of the page relative to the reference point. During the sliding of the user's gesture, it can identify the offset degree of the page, and the total length is 1.0. According to the description of the normalization of the reference point and the page width, when not sliding, the position of the current page current page is 0, the position of the previous page is -1.0, and the position of the next page is 1.0, and so on. When sliding, the position changes accordingly with the sliding trend of the ViewaPger: when sliding to the left, the page shifts to the left relative to the reference point, and the position decreases; when sliding to the right, the page shifts to the right relative to the reference point, and the position increases. The absolute value of the position reflects the distance between the page and the reference point. Among them, according to the definitions of the above two descriptions, it is obvious that the distance between adjacent pages is 1. Based on the calculation method of the gesture displacement position that can be output by the viewpager clarified above, this application converts the position to a positive number for easy understanding. When sliding to the left, the value of the gesture displacement position is increased by 1.0, that is, when sliding to the left, the gesture displacement position can change from 1.0 to 0.0, and when sliding to the right, the value remains unchanged, and the gesture displacement position can change from 0.0 to 1.0.
[0061] Specifically, if the first gesture state is the dragging state and the second gesture state is the idle state, the second sorting information is determined according to the first sorting information and the gesture displacement difference corresponding to the dragging state in the first gesture state. Among them, the time period corresponding to the second gesture state is earlier than the time period corresponding to the first gesture state, and the first gesture state is the current state. The gesture displacement difference refers to the difference between the gesture displacement at the first moment and the gesture displacement at the second moment included in the gesture displacement information in the dragging state, where the first moment is earlier than the second moment. Optionally, if the gesture displacement difference is greater than zero, it is determined that the second sorting information is after the first sorting information; among them, the position sorting of the second sorting information in the texture picture library is after the position sorting of the first sorting information in the texture picture library. For example: the serial number of the second sorting information in the texture picture library is greater than the serial number of the first sorting information in the texture picture library. Specifically, if the obtained displacement difference is greater than zero, according to the description of the gesture displacement above, the sliding direction of the user's gesture is a left slide, and the corresponding current texture picture also slides to the left. Therefore, the position of the target texture picture in the texture picture library is after the position of the current texture picture. For example: if the position of the current texture picture in the texture picture library is the first one, the position of the target texture picture in the texture picture library is the second one. Optionally, if the gesture displacement difference is less than zero, it is determined that the second sorting information is before the first sorting information. Among them, the position sorting of the second sorting information in the texture picture library is before the position sorting of the first sorting information in the texture picture library. For example: the serial number of the second sorting information in the texture picture library is less than the serial number of the first sorting information in the texture picture library. Specifically, if the obtained displacement difference is less than zero, according to the description of the gesture displacement above, the sliding direction of the user's gesture is a right slide, and the corresponding current texture picture also slides to the right. Therefore, the position of the target texture picture in the texture picture library is before the position of the current texture picture. For example: if the position of the current texture picture in the texture picture library is the second one, the position of the target texture picture in the texture picture library is the first one.
[0062] Step S202: If the first gesture state is the automatic scrolling state and the second gesture state is the dragging state, the second sorting information is determined according to the first sorting information and the gesture displacement information corresponding to the dragging state in the second gesture state.
[0063] Specifically, if the first gesture state is the automatic scrolling state and the second gesture state is the dragging state, the second sorting information is determined according to the first sorting information and the gesture displacement information corresponding to the dragging state in the second gesture state. Among them, as described in step S201, the automatic scrolling state means that the user's gesture does not slide, but the texture image continues to slide because of the gesture slide in the user's previous state. Therefore, when the first gesture state is the automatic scrolling state and the second gesture state is the dragging state, in the current state, the texture image will continue to slide because of the gesture slide in the dragging state of the second gesture state, that is, the slide of the texture image is related to the gesture displacement information corresponding to the dragging state in the second gesture state.
[0064] Optionally, the page displacement information of the automatic scrolling state can be determined first according to the gesture displacement information corresponding to the dragging state in the second gesture state; among them, the page displacement information indicates the displacement information of the current texture image on the background image display interface; among them, the process of determining the page displacement information of the automatic scrolling state according to the gesture displacement information corresponding to the dragging state in the second gesture state is not limited in this application. Optionally, the page displacement information of the automatic scrolling state is related to information such as the direction of the gesture displacement, the magnitude of the gesture displacement, and the displacement magnitude per unit time indicated by the gesture displacement information corresponding to the dragging state in the second gesture state. After determining the page displacement information of the automatic scrolling state according to the gesture displacement information corresponding to the dragging state in the second gesture state, the second sorting information can be determined according to the page displacement information of the automatic scrolling state and the first sorting information. Among them, in the process of determining the second sorting information according to the page displacement information of the automatic scrolling state and the first sorting information, the displacement difference between the page displacement at the first moment and the page displacement at the second moment can be determined first. The first moment is earlier than the second moment. Then, referring to the process of determining the second sorting information according to the first sorting information and the gesture displacement difference corresponding to the dragging state in the first gesture state described in step S201, the second sorting information is determined according to the page displacement difference corresponding to the automatic scrolling state and the first sorting information, that is, if the page displacement difference is greater than zero, it is determined that the second sorting information is after the first sorting information; among them, the position sorting of the second sorting information in the texture image library is after the position sorting of the first sorting information in the texture image library. For example: the serial number of the second sorting information in the texture image library is greater than the serial number of the first sorting information in the texture image library. Optionally, if the page displacement difference is less than zero, it is determined that the second sorting information is before the first sorting information. Among them, the position sorting of the second sorting information in the texture image library is before the position sorting of the first sorting information in the texture image library. For example: the serial number of the second sorting information in the texture image library is less than the serial number of the first sorting information in the texture image library.
[0065] Optionally, the gesture displacement at the first moment can be determined according to the gesture information, and the position of the target texture picture in the texture picture library can be determined according to the relationship between the gesture displacement at the first moment and the gesture displacement threshold. The gesture displacement threshold is the threshold for determining the sliding direction of the current texture picture. For example, it can be set to 0.5. Specifically, if the gesture displacement at the first moment is greater than the gesture displacement threshold, for example, the gesture threshold at the first moment is 1, which is greater than 0.5, the current texture picture slides to the left, and the position of the target texture picture in the texture picture library is after the position of the current texture picture, that is, it is determined that the second sorting information is after the first sorting information. If the gesture displacement at the first moment is less than the gesture displacement threshold, for example, the gesture threshold at the first moment is 0, which is less than 0.5, the current texture picture slides to the right, and the position of the target texture picture in the texture picture library is before the position of the current texture picture, that is, it is determined that the second sorting information is before the first sorting information.
[0066] Step S203: If the first gesture state is the dragging state, the second gesture state is the automatic scrolling state, and the third gesture state is the dragging state, then determine the second sorting information according to the first sorting information, the gesture displacement information corresponding to the dragging state in the first gesture state, and the gesture displacement information corresponding to the dragging state in the third gesture state. The time period corresponding to the third gesture state is earlier than the time period corresponding to the second gesture state.
[0067] Specifically, if the first gesture state is the dragging state, the second gesture state is the automatic scrolling state, and the third gesture state is the dragging state, then determine the second sorting information according to the first sorting information, the gesture displacement information corresponding to the dragging state in the first gesture state, and the gesture displacement information corresponding to the dragging state in the third gesture state. The time period corresponding to the third gesture state is earlier than the time period corresponding to the second gesture state.
[0068] Optionally, first, the page displacement information in the automatic scrolling state can be determined according to the gesture displacement information corresponding to the dragging state in the third gesture state. The page displacement information indicates the displacement information of the current texture picture on the background picture display interface. If the second gesture state is the automatic scrolling state and the third gesture state is the dragging state, the page switching process is similar to the page switching process described in step S202 when the first gesture state is the automatic scrolling state and the second gesture state is the dragging state. Therefore, the process of determining the page displacement information in the automatic scrolling state according to the gesture displacement information corresponding to the dragging state in the third gesture state can refer to the process of determining the page displacement information in the automatic scrolling state according to the gesture displacement information corresponding to the dragging state in the second gesture state described in step S202, and this step will not be elaborated here.
[0069] Among them, since after the automatic scrolling state in the second gesture state, there is also a dragging state in the first gesture state, it is impossible to directly determine the second sorting information based on the page displacement information in the automatic scrolling state and the first sorting information. Therefore, optionally, secondly, the completion result of the picture switching corresponding to the automatic scrolling state can be determined according to the page displacement information in the automatic scrolling state and the gesture displacement information corresponding to the dragging state in the first gesture state. The completion result includes: the switching is completed or the switching is not completed. Specifically, first, the page displacement difference between the page displacement at the third moment and the page displacement at the fourth moment included in the page displacement information can be determined, and the first picture switching direction corresponding to the automatic scrolling state can be determined according to the page displacement difference. Among them, the process of determining the first picture switching direction corresponding to the automatic scrolling state according to the page displacement difference includes: determining the pre-second sorting information according to the page displacement difference and the first sorting information, and then determining the first picture switching direction corresponding to the automatic scrolling state according to the first sorting information and the pre-second sorting information. The pre-second sorting information refers to the sorting information of the texture picture switched to after the current texture picture. The texture picture switched to after the current texture picture may be the texture picture in the background picture switching process or the target texture picture. The process of determining the pre-second sorting information according to the page displacement difference and the first sorting information can refer to the process of determining the second sorting information according to the page displacement difference corresponding to the automatic scrolling state and the first sorting information in step S202, which will not be elaborated in this embodiment. Among them, if it is determined that the second sorting information is after the first sorting information, the first picture switching direction corresponding to the automatic scrolling state is to switch to the left, that is, the texture picture slides to the left. If it is determined that the second sorting information is before the first sorting information, the first picture switching direction corresponding to the automatic scrolling state is to switch to the right, that is, the texture picture slides to the right. Specifically, the gesture displacement difference between the gesture displacement at the first moment and the gesture displacement at the second moment included in the gesture displacement information can be determined, and the second picture switching direction corresponding to the dragging state can be determined according to the gesture displacement difference. Among them, if the gesture displacement difference is greater than zero, the first picture switching direction corresponding to the scrolling state is to switch to the left, that is, the texture picture slides to the left. If the gesture displacement difference is less than zero, the first picture switching direction corresponding to the automatic scrolling state is to switch to the right, that is, the texture picture slides to the right.Specifically, after determining the first picture switching direction and the second picture switching direction, the absolute value of the difference between the first gesture displacement in the dragging state of the first gesture state and the last page displacement in the auto-scroll state can be calculated; wherein, when the first picture switching direction is the same as the second picture switching direction, if the absolute value of the difference is greater than a preset difference absolute value threshold, it is determined that the completion result is that the switching is completed, otherwise, it is determined that the completion result is that the switching is not completed; wherein, when the first picture switching direction is different from the second picture switching direction, if the absolute value of the difference is greater than a preset difference absolute value threshold, it is determined that the completion result is that the switching is not completed, otherwise, it is determined that the completion result is that the switching is completed. The value of the difference absolute value threshold can be preset according to user requirements, for example: set to 0.7.
[0070] Optionally, finally, if the completion result is that the switching is completed, the first sorting information is updated according to the page displacement information in the auto-scroll state, and the second sorting information is determined according to the gesture displacement information corresponding to the dragging state in the first gesture state and the updated first sorting information. That is, the updated first sorting information is used as the sorting information of the current texture picture, and the second sorting information is determined according to the sorting information of the current texture picture and the gesture displacement information corresponding to the dragging state in the first gesture state. The process of updating the first sorting information according to the page displacement information in the auto-scroll state includes: determining the page displacement difference between the page displacement at the third moment and the page displacement at the fourth moment included in the page displacement information, determining the preliminary second sorting information according to the page displacement difference and the first sorting information, and using the preliminary second sorting information as the updated first sorting information. Optionally, finally, if the completion result is that the switching is not completed, the second sorting information is determined according to the page displacement information in the auto-scroll state and the first sorting information; that is, the page switching corresponding to the auto-scroll state is continued to be completed according to the determined first sorting information and the second sorting information, and then the page switching corresponding to the dragging state in the first gesture state is executed, that is, the texture picture after the page switching corresponding to the auto-scroll state is re-used as the current texture picture, the new first sorting information is obtained, and the new second sorting information is determined according to the new first sorting information and the gesture displacement information corresponding to the dragging state in the first gesture state.
[0071] In the process of determining the second sorting information based on the first sorting information and the gesture information provided in this embodiment, if the first gesture state is the dragging state and the second gesture state is the idle state, the second sorting information is determined according to the first sorting information and the gesture displacement difference corresponding to the dragging state in the first gesture state. Among them, the time period corresponding to the second gesture state is earlier than the time period corresponding to the first gesture state. The gesture displacement difference refers to the difference between the gesture displacement at the first moment and the gesture displacement at the second moment included in the gesture displacement information in the dragging state, and the first moment is earlier than the second moment. If the first gesture state is the automatic scrolling state and the second gesture state is the dragging state, the second sorting information is determined according to the first sorting information and the gesture displacement information corresponding to the dragging state in the second gesture state. If the first gesture state is the dragging state, the second gesture state is the automatic scrolling state, and the third gesture state is the dragging state, the second sorting information is determined according to the first sorting information, the gesture displacement information corresponding to the dragging state in the first gesture state, and the gesture displacement information corresponding to the dragging state in the third gesture state. Among them, the time period corresponding to the third gesture state is earlier than the time period corresponding to the second gesture state. Among them, on the basis of the gesture displacement, it is proposed that the gesture information further includes gesture state information, and the position information of the target texture picture in the texture picture library is determined by combining the gesture displacement and the gesture state, which can improve the accuracy of confirming the position information of the target texture picture in the texture picture library, further improve the accuracy of the background picture switching, and further improve the user experience of the user during the background picture switching process.
[0072] Figure 3 FIG. is a schematic flowchart of generating a rendering result texture picture corresponding to a current texture picture and a target texture picture according to an open graphics library rendering framework and user gesture information provided in the third embodiment of the present application. On the basis of the embodiment shown in Figure 2 the gesture displacement information is further used to indicate the position of the dynamic rendering area and the display ratio of the picture. In this embodiment, the process of generating a rendering result texture picture corresponding to a current texture picture and a target texture picture according to an open graphics library rendering framework and user gesture information is described in detail.
[0073] As Figure 3 shown, generating a rendering result texture picture corresponding to a current texture picture and a target texture picture according to an open graphics library rendering framework and user gesture information in this embodiment may include the following steps:
[0074] Step S301: Determine the type of rendering effect preset by the user, and determine the position of the dynamic rendering area and the display ratio of the picture according to the type of rendering effect and the gesture displacement information.
[0075] Specifically, the type of rendering effect preset by the user can be determined, and based on the type of rendering effect and the gesture displacement information, the position of the dynamic rendering area and the display ratio of the picture can be determined. Optionally, the type of rendering effect preset by the user can be determined through a GLSL script written by the user. Among them, the types of rendering effects include, but are not limited to, switching boundary blur effect, kaleidoscope switching effect, cube switching effect, and other effect types. Among them, the dynamic rendering area refers to an area of a set size pointed to by the gesture displacement information and / or the page displacement information, which is used to present the dynamic rendering texture picture. For example, if the type of rendering effect preset by the user is the switching boundary blur effect, the dynamic rendering area is a long strip area with a set width pointed to by the gesture displacement information and / or the page displacement information. Among them, around the dynamic rendering area, for example, on both sides, a certain proportion of the current texture picture and the target texture picture are presented respectively. The display ratio of the picture refers to the proportion of the dynamic rendering texture picture located in the dynamic rendering area, as well as the current texture picture and the target texture picture located around the dynamic rendering area, each occupying the page. The display ratio of the picture is associated with the type of rendering effect and the change in the gesture displacement indicated by the gesture displacement information. For example, if the dynamic rendering area is a long strip area with a set width pointed to by the gesture displacement information and / or the page displacement information, the display ratio of the picture is the ratio of the width corresponding to the long strip area to the width corresponding to the areas on both sides of the long strip area, and the ratio changes with the change in the gesture displacement.
[0076] Step S302: Generate a dynamic rendering texture picture located in the dynamic rendering area according to the Open Graphics Library rendering framework, the position of the dynamic rendering area indicated by the gesture displacement information in the gesture information, the current texture picture, and the target texture picture.
[0077] Specifically, after determining the position of the dynamic rendering area and the display ratio of the picture according to the type of rendering effect and the gesture displacement information, a dynamic rendering texture picture located in the dynamic rendering area can be generated according to the Open Graphics Library rendering framework, the position of the dynamic rendering area indicated by the gesture displacement information in the gesture information, the current texture picture, and the target texture picture. Among them, the dynamic rendering texture picture refers to a dynamic rendering texture picture based on the Open Graphics Library rendering framework, rendered and generated from the current texture picture and the target texture picture, and located at the position of the dynamic rendering area indicated by the gesture displacement information in the gesture information. Among them, the dynamic rendering texture picture changes with the change in the gesture displacement in the gesture displacement information.
[0078] Step S303: Generate a rendered result texture picture according to the dynamic rendering texture picture, the current texture picture, the target texture picture, and the display ratio of the picture indicated by the gesture displacement information.
[0079] Specifically, the dynamic rendering texture image, the current texture image, and the target texture image generated in step S302 can be rendered to generate a rendered result texture image according to the display ratio of the image indicated by the gesture displacement information. The rendered result texture image is a result texture image that changes according to the position of the dynamic rendering area and the dynamic display ratio. The initial texture image of the rendered result texture image is the current texture image, and the final texture image of the rendered result texture image is the target texture image.
[0080] In the process of generating the rendered result texture image corresponding to the current texture image and the target texture image according to the OpenGL rendering framework and the user's gesture information provided in this embodiment, by determining the type of rendering effect preset by the user, and determining the position of the dynamic rendering area and the display ratio of the image according to the type of rendering effect and the gesture displacement information, generating a dynamic rendering texture image located in the dynamic rendering area according to the OpenGL rendering framework, the position of the dynamic rendering area indicated by the gesture displacement information in the gesture information, the current texture image, and the target texture image, and generating a rendered result texture image according to the dynamic rendering texture image, the current texture image, the target texture image, and the display ratio of the image indicated by the gesture displacement information, where the gesture displacement information is also used to indicate the position of the dynamic rendering area and the display ratio of the image, and rendering and generating the rendered result texture image corresponding to the current texture image and the target texture image according to the OpenGL rendering framework of the open graphics library can make the animation effect of image switching more rich and improve the user experience of the user during the background image switching process.
[0081] In Figure 1 or Figure 2 or Figure 3 Based on the embodiments shown, the embodiments of the present application further propose that the sorting information is represented by the index number of the texture image in the texture image library, where the index number of the texture image in the texture image library corresponds to the index number of the blank view view described in step S101. Optionally, in the process of determining the second sorting information according to the first sorting information and the gesture displacement difference corresponding to the dragging state, if the displacement difference is greater than zero, the index number of the target texture image corresponding to the second sorting information is incremented by one based on the index number of the current texture image corresponding to the first sorting information. If the displacement difference is less than zero, the index number of the target texture image corresponding to the second sorting information is decremented by one based on the index number of the current texture image corresponding to the first sorting information.
[0082] Figure 4 It is a schematic structural diagram of a background image switching device provided in the fourth embodiment of the present application.
[0083] As Figure 4As shown in the figure, the background image switching device 40 of this embodiment includes an acquisition module 41, a determination module 42, an extraction module 43, a generation module 44, and a display module 45.
[0084] The acquisition module 41 is configured to obtain the gesture information of the user and the first sorting information of the current texture image in the texture image library through the page switching component layer. The texture image library includes: multiple texture images converted from background images;
[0085] The determination module 42 is configured to determine the second sorting information based on the first sorting information and the gesture information. The second sorting information indicates the target texture image in the texture image library;
[0086] The extraction module 43 is configured to extract the current texture image and the target texture image from the texture image library based on the first sorting information and the second sorting information;
[0087] The generation module 44 is configured to generate the rendered result texture images corresponding to the current texture image and the target texture image according to the Open Graphics Library rendering framework and the gesture information of the user;
[0088] The display module 45 is configured to display the rendered result texture images on the background image display interface through the rendered result display layer, and the rendered result display layer is located above the page switching component layer.
[0089] The device provided in this embodiment can be used to execute the technical solutions of the above method embodiments Figures 1 to 3 The implementation principles and technical effects are similar, and will not be elaborated here in this embodiment.
[0090] Figure 5 It is a schematic structural diagram of a background image switching device provided in the fifth embodiment of the present application.
[0091] As Figure 5 shown, the background image switching device 50 of this embodiment includes: a processor 51, a memory 52, and a communication interface 53.
[0092] The memory 52 is used to store the executable instructions of the processor;
[0093] Wherein, the processor 51 is configured to execute the background image switching method of any one of the above method embodiments Figures 1 to 3 by executing the executable instructions.
[0094] In the above Figure 5In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the invention may be directly implemented by the execution of a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0095] The memory may include a high-speed random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk memory.
[0096] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.
[0097] The embodiment of the present application also provides a readable storage medium, on which a computer program is stored, where when the computer program is executed by a processor, it implements the background image switching method according to any one of the above method embodiments. Figures 1 to 3 Any of the background image switching methods.
[0098] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties. And the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or refuse.
[0099] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include the common general knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and examples are only regarded as exemplary, and the true scope and spirit of the present application are pointed out by the following claims.
[0100] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.
Claims
1. A background image switching method, characterized in that: include: Acquire user gesture information and first sorting information of the current texture image in a texture image library through a page switching component layer, wherein the texture image library includes: a plurality of texture images converted from background images; Based on the first sorting information and the gesture information, second sorting information is determined, where the second sorting information indicates a target texture image in the texture image library; the gesture information includes: gesture displacement information and gesture state information; the gesture displacement information is used to indicate a position of a dynamic rendering area and a display ratio of an image; Extracting the current texture picture and the target texture picture from the texture picture library based on the first sorting information and the second sorting information; Determine the rendering effect type preset by the user, and determine the position of the dynamic rendering area and the display ratio of the picture according to the rendering effect type and the gesture displacement information; the dynamic rendering area refers to an area of a set size pointed to by the gesture displacement information and used to present the dynamic rendering texture picture; the display ratio of the picture is associated with the rendering effect type and the change of the gesture displacement indicated by the gesture displacement information; the display ratio of the picture refers to the ratio of the dynamic rendering texture picture located in the dynamic rendering area, the current texture picture located around the dynamic rendering area, and the target texture picture each occupying the page; Generate a dynamic rendering texture picture located in the dynamic rendering area according to the open graphics library rendering framework, the position of the dynamic rendering area indicated by the gesture displacement information, the current texture picture and the target texture picture; the dynamic rendering texture picture changes with the change of the gesture displacement in the gesture displacement information; Generate a rendering result texture picture according to the dynamically rendered texture picture, the current texture picture, the target texture picture, and the display ratio of the picture indicated by the gesture displacement information; The rendering result texture image is displayed on the background image display interface through a rendering result display layer, and the rendering result display layer is located above the page switching component layer.
2. The method according to claim 1, characterized in that The gesture state information includes: an idle state, a dragging state, and an automatic scrolling state. The determining of the second sorting information based on the first sorting information and the gesture information includes: If the first gesture state is the dragging state and the second gesture state is the idle state, the second sorting information is determined according to the first sorting information and the gesture displacement difference corresponding to the dragging state in the first gesture state; wherein the time period corresponding to the second gesture state is earlier than the time period corresponding to the first gesture state, and the gesture displacement difference refers to the difference between the gesture displacement at a first moment and the gesture displacement at a second moment included in the gesture displacement information in the dragging state, and the first moment is earlier than the second moment; If the first gesture state is an automatic scrolling state and the second gesture state is a dragging state, determining the second sorting information according to the first sorting information and gesture displacement information corresponding to the dragging state in the second gesture state; If the first gesture state is a dragging state, the second gesture state is an automatic scrolling state, and the third gesture state is a dragging state, then the second sorting information is determined based on the first sorting information, the gesture displacement information corresponding to the dragging state under the first gesture state, and the gesture displacement information corresponding to the dragging state under the third gesture state; wherein the time period corresponding to the third gesture state is earlier than the time period corresponding to the second gesture state.
3. The method according to claim 2, characterized in that The determining the second sorting information according to the first sorting information and the gesture displacement difference corresponding to the dragging state includes: If the gesture displacement difference is greater than zero, determining that the second sorting information is after the first sorting information; If the gesture displacement difference is less than zero, it is determined that the second sorting information is before the first sorting information.
4. The method according to claim 2, characterized in that: If the first gesture state is an automatic scrolling state and the second gesture state is a dragging state, determining the second sorting information according to the first sorting information and gesture displacement information corresponding to the dragging state in the second gesture state includes: Determining the page displacement information of the automatic scrolling state according to the gesture displacement information corresponding to the dragging state in the second gesture state; wherein the page displacement information indicates the displacement information of the current texture image on the background image display interface; The second sorting information is determined according to the page displacement information in the automatic scrolling state and the first sorting information.
5. The method according to claim 2, characterized in that: If the first gesture state is a drag state, the second gesture state is an automatic scroll state, and the third gesture state is a drag state, determining the second sorting information according to the first sorting information, the gesture displacement information corresponding to the drag state in the first gesture state, and the gesture displacement information corresponding to the drag state in the third gesture state, includes: Determining the page displacement information of the automatic scrolling state according to the gesture displacement information corresponding to the dragging state in the third gesture state; wherein the page displacement information indicates the displacement information of the current texture image on the background image display interface; Determine, according to the page displacement information of the automatic scrolling state and the gesture displacement information corresponding to the dragging state in the first gesture state, a completion result of the picture switching corresponding to the automatic scrolling state, wherein the completion result includes: the switching is completed or the switching is not completed; If the completion result is that the switching is not completed, determining the second sorting information according to the page displacement information of the automatic scrolling state and the first sorting information; If the completion result is that the switching is completed, the first sorting information is updated according to the page displacement information of the automatic scrolling state, and the second sorting information is determined according to the gesture displacement information corresponding to the dragging state of the first gesture state and the updated first sorting information.
6. The method according to claim 5, characterized in that The determining, according to the page displacement information of the automatic scrolling state and the gesture displacement information corresponding to the dragging state in the first gesture state, the completion result of the picture switching corresponding to the automatic scrolling state includes: Determine a page displacement difference between the two page displacements according to the page displacement at the third moment and the page displacement at the fourth moment included in the page displacement information, and determine a first picture switching direction corresponding to the automatic scrolling state according to the page displacement difference; determine a gesture displacement difference between the two gesture displacements according to the gesture displacement at the first moment and the gesture displacement at the second moment included in the gesture displacement information, and determine a second picture switching direction corresponding to the dragging state according to the gesture displacement difference; Calculating an absolute value of a difference between a first gesture displacement in a dragging state in the first gesture state and a last page displacement in the automatic scrolling state; In the case where the switching direction of the first picture is the same as the switching direction of the second picture, if the absolute value of the difference is greater than a preset difference absolute value threshold, determining that the completion result is that the switching is completed; otherwise, determining that the completion result is that the switching is not completed; When the switching direction of the first picture is different from the switching direction of the second picture, if the absolute value of the difference is greater than the preset difference absolute value threshold, the completion result is determined to be incomplete switching, otherwise, the completion result is determined to be completed switching.
7. A background image switching device, characterized in that: include: An acquisition module, used to acquire user gesture information and first sorting information of a current texture image in a texture image library through a page switching component layer, wherein the texture image library includes: a plurality of texture images converted from background images; A determination module, configured to determine second sorting information based on the first sorting information and the gesture information, wherein the second sorting information indicates a target texture image in the texture image library; the gesture information includes gesture displacement information and gesture state information; the gesture displacement information is used to indicate a position of a dynamic rendering area and a display ratio of an image; An extraction module, configured to extract the current texture image and the target texture image from the texture image library based on the first sorting information and the second sorting information; A generation module, used to determine the rendering effect type preset by the user, and determine the position of the dynamic rendering area and the display ratio of the picture according to the rendering effect type and the gesture displacement information; the dynamic rendering area refers to the area of the set size pointed to by the gesture displacement information and used to present the dynamic rendering texture picture; the display ratio of the picture is associated with the rendering effect type and the change of the gesture displacement indicated by the gesture displacement information; the display ratio of the picture refers to the proportion of the dynamic rendering texture picture located in the dynamic rendering area, the current texture picture located around the dynamic rendering area, and the target texture picture respectively occupying the page; according to the open graphics library rendering framework, the position of the dynamic rendering area indicated by the gesture displacement information, the current texture picture and the target texture picture, a dynamic rendering texture picture located in the dynamic rendering area is generated; the dynamic rendering texture picture changes with the change of the gesture displacement in the gesture displacement information; according to the dynamic rendering texture picture, the current texture picture, the target texture picture, and the display ratio of the picture indicated by the gesture displacement information, a rendering result texture picture is generated; The display module is used to display the rendering result texture image on the background image display interface through the rendering result display layer, and the rendering result display layer is located above the page switching component layer.
8. A background image switching device, characterized in that: include: Processor, memory, communication interface; The memory is used to store executable instructions of the processor; Wherein, the processor is configured to execute the background image switching method described in any one of claims 1 to 6 by executing the executable instructions.
Citation Information
Patent Citations
Picture display method, picture display device and mobile terminal
CN110647285A
Channel switching method and device, equipment, channel switching system and storage medium
CN113709556A
Page information display method and device, computer equipment and storage medium
CN116088733A