Method, device, vehicle and storage medium for displaying and hiding user interface icons
By establishing a UV map in the user interface and gradually changing the display threshold, the problem of a single icon display method is solved, and the gradual display and hiding of icons is realized, which improves the user experience and simplifies the icon replacement process.
Patent Information
- Application Number
- CN202310064083.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-16
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2043-01-16
AI Technical Summary
The icon display method in existing car systems is single and cannot effectively utilize the limited screen space, resulting in poor user interface display effects.
By establishing a UV map, setting the UV values at each position to be different, and using the UV map as the transparent channel of the icon, gradually changing the display threshold to achieve gradual display or hiding of the icon, and combining with the noise map to increase the random particle effect at the junction.
It realizes the gradual display and hiding effect of icons, improves the user experience, adds a sense of technology, simplifies the icon replacement process, and has high scalability.
Smart Images

Figure CN116126444B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of icon display, and in particular relates to a method, device, vehicle and storage medium for displaying and hiding user interface icons. Background Art
[0002] As car computer systems become increasingly versatile, the number of UI (User Interface) icons involved in their interactions is also increasing. However, screen size is limited, making it impossible to display all icons on a single screen. Therefore, icons are divided by function, displaying different icons on different function screens. When switching between function screens, the icons on the previous function screen are hidden, and the icons on the current function screen are displayed. Currently, on smart devices like mobile phones and car computers, icon display methods generally involve sliding in from the outside, displaying with a gradient of overall transparency, or directly displaying the icons, resulting in a relatively simple display effect. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a method, device, vehicle, and storage medium for displaying and hiding user interface icons to achieve a simpler and more technologically advanced icon display method.
[0004] A first aspect of an embodiment of the present invention provides a method for displaying and hiding a user interface icon, comprising:
[0005] Create the UV map of the icon. The UV values at each position in the UV map are not exactly the same.
[0006] Determine the relationship between the UV value of each position and the display threshold. If the UV value of a position is greater than the display threshold, the position will be displayed in black, otherwise the position will be displayed in white.
[0007] Use the UV map as the transparent channel of the icon;
[0008] Gradually change the display threshold so that icons appear or disappear gradually.
[0009] In conjunction with the first aspect, in a possible implementation of the first aspect, gradually changing the display threshold so that the icon is gradually displayed includes:
[0010] Gradually increase the display threshold so that the icon gradually changes from being completely hidden to being fully displayed;
[0011] The initial value of the display threshold is smaller than the minimum UV value of each position in the UV map, and the final value of the display threshold is larger than the maximum UV value of each position in the UV map;
[0012] In conjunction with the first aspect, in a possible implementation of the first aspect, gradually changing the display threshold to gradually hide the icon includes:
[0013] Gradually reduce the display threshold so that the icon gradually changes from being fully displayed to being completely hidden;
[0014] The initial value of the display threshold is greater than the maximum UV value of each position in the UV map, and the final value of the display threshold is less than the minimum UV value of each position in the UV map.
[0015] In conjunction with the first aspect, in a possible implementation of the first aspect, UV values at various positions in the UV map are not completely the same, including:
[0016] The UV values in the UV map gradually increase along the first direction;
[0017] The first direction is any direction on the plane where the UV map is located.
[0018] Furthermore, in the process of gradually changing the display threshold, the following steps are further included:
[0019] Add a noise map within the preset range on both sides of the black and white boundary in the UV map.
[0020] Furthermore, in the process of gradually changing the display threshold, the following steps are further included:
[0021] Taking the first straight line as the boundary, the pixels of the icon within the preset range on both sides of the black and white boundary line in the UV map are equally divided into two parts, and the first straight line is parallel to the first direction;
[0022] Calculate the distance between each pixel and a second straight line, where the second straight line is perpendicular to the first direction and passes through a position where the minimum UV value in the UV map is located;
[0023] The moving distance of each pixel is determined according to the distance between each pixel and the second straight line, and the pixels on both sides of the first straight line are moved in a direction away from the first straight line according to the moving distance.
[0024] Furthermore, determining the movement distance of each pixel according to the distance between each pixel and the second straight line includes:
[0025] According to y i =a*(x i -c) determining the movement distance of each pixel;
[0026] Among them, y i is the moving distance of the i-th pixel, x i is the distance between the i-th pixel and the second straight line, a is a preset coefficient, and c is the minimum value of the distances between each pixel and the second straight line.
[0027] A second aspect of an embodiment of the present invention provides a device for displaying and hiding user interface icons, comprising:
[0028] The creation module is used to create the UV map of the icon. The UV values of each position in the UV map are not exactly the same;
[0029] The judgment module is used to judge the relationship between the UV value of each position and the display threshold. If the UV value of a position is greater than the display threshold, the position is displayed in black, otherwise the position is displayed in white;
[0030] A processing module is used for using the UV map as a transparent channel of the icon and gradually changing the display threshold so as to gradually display or hide the icon.
[0031] A third aspect of an embodiment of the present invention provides a vehicle, including an electronic device, the electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method for displaying and hiding user interface icons in the first aspect and any possible implementation of the first aspect are implemented.
[0032] The fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method for displaying and hiding user interface icons in the above-mentioned first aspect and any possible implementation method of the first aspect.
[0033] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0034] The embodiment of the present invention establishes a UV map for the icon and sets the UV values of various positions in the UV map to be different. If the UV value of a certain position is greater than the display threshold, the position is black and transparent, otherwise the position is displayed in white. Thus, the UV map is used as a transparent channel for the icon. When displaying or hiding the icon, it is only necessary to gradually change the size of the display threshold to achieve the effect of gradually displaying the icon or gradually hiding the icon, making the icon display more technological and improving the user experience. Moreover, compared with traditional methods, this embodiment does not require the production of a large number of special effects, making icon replacement more convenient; by modifying the UV values of various positions in the UV map, different forms of gradients can be achieved, and the scalability is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 is a flow chart of a method for displaying and hiding user interface icons provided by an embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram of the UV map provided by the embodiment of the present invention. Figure 1 ;
[0038] Figure 3 This is a schematic diagram of the UV map provided by the embodiment of the present invention. Figure 2 ;
[0039] Figure 4 This is a schematic diagram of the icon display effect provided by an embodiment of the present invention;
[0040] Figure 5 is a schematic diagram of a device for displaying and hiding user interface icons provided by an embodiment of the present invention;
[0041] Figure 6 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration, not limitation, to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
[0043] In order to illustrate the technical solution of the present invention, specific embodiments are provided below.
[0044] Figure 1 This is a schematic diagram of the implementation flow of the method for displaying and hiding user interface icons provided in this embodiment. Figure 1 As shown, the method includes:
[0045] Step S101 : Create a UV map of the icon, where the UV values at various positions in the UV map are not completely the same.
[0046] In this embodiment, a 3D real-time engine tool can be used to draw the icon. "UV" refers to the abbreviation for u,v texture mapping coordinates, which defines the position of each point in the image. These points are interconnected with the 3D model to determine the position of the surface texture map. UV is to accurately map each point in the image to the surface of the model object. The gaps between points are smoothed by the image interpolation processing of the software. This is the so-called UV mapping.
[0047] For texture mapping, the UV value range of a map is 0 to 1, with a value of 0 representing black, a value of 1 representing white, and gray between 0 and 1. In this embodiment, the UV values of each position in the UV map can be pre-set according to the desired display effect, such as gradually decreasing from bottom to top, gradually increasing from bottom to top, gradually decreasing from left to right, gradually increasing from left to right, gradually decreasing from the center to the periphery, gradually increasing from the center to the periphery, etc. This embodiment is not limited to this.
[0048] Step S102 , determining the relationship between the UV value of each position and the display threshold, if the UV value of a position is greater than the display threshold, then display the position in black, otherwise, display the position in white.
[0049] In this embodiment, the UV value of each position is compared with the display threshold value. If the UV value is greater than the value, it is taken as 0, and if the UV value is less than the value, it is taken as 1. A pure black, pure white, or black and white image can be obtained.
[0050] Step S103: Using the UV map as a transparent channel of the icon, gradually changing the display threshold value so that the icon is gradually displayed or hidden.
[0051] In this embodiment, the transparent channel is also called the Alpha channel, which represents the transparency information of the pixel points in the digital image. White Alpha pixels are used to define opaque color pixels, while black Alpha defines transparent pixels. The grayscale between black and white is the semi-transparent part of the color image. The pure black, pure white, or black and white image in the previous step is used as the transparent channel of the icon, black is transparent, and white is displayed. Since the UV values of each position are not exactly the same, by gradually changing the display threshold, the positions of the transparent channel can be changed from black to white or from white to black in turn, thereby realizing the gradual display or hiding of the icon.
[0052] Generally, the UV value in the UV map is between 0 and 1. By changing the value from 0 to 1, when the value is 0, all UV values are greater than the value, the Alpha channel is pure black, and the icon is completely transparent.
[0053] As value increases, some UV values become smaller than value, the Alpha channel becomes black and white, and the icon gradually appears. When value is 1, all UV values are smaller than value, the Alpha channel becomes pure white, and the icon is fully visible. Hiding the icon is similar; change value from 1 to 0 to achieve this.
[0054] It can be seen that the embodiment of the present invention establishes a UV map for the icon and sets the UV values of various positions in the UV map to be different. If the UV value of a certain position is greater than the display threshold, the position is black and transparent, otherwise the position is displayed in white, thereby using the UV map as a transparent channel for the icon. When displaying or hiding the icon, it is only necessary to gradually change the size of the display threshold to achieve the effect of gradually displaying the icon or gradually hiding the icon, making the icon display more technological and improving the user experience. Moreover, compared with the traditional method, this embodiment does not require the production of a large number of special effects, and icon replacement is more convenient; by modifying the UV values of various positions in the UV map, different forms of gradients can be achieved, and the scalability is high.
[0055] As a possible implementation, in step S103, gradually changing the display threshold to gradually display the icon can be described as follows:
[0056] Gradually increase the display threshold so that the icon gradually changes from being completely hidden to being fully displayed;
[0057] The initial value of the display threshold is smaller than the minimum UV value of each position in the UV map, and the final value of the display threshold is larger than the maximum UV value of each position in the UV map;
[0058] In this embodiment, the initial value of the display threshold is less than the minimum UV value of each position in the UV map, and the final value of the display threshold is greater than the maximum UV value of each position in the UV map, that is, the transparent channel is pure black at the beginning and pure white at the end. By gradually increasing the display threshold, the transition of the transparent channel from black to white can be achieved, thereby realizing the gradual transition of the icon from completely hidden to fully displayed.
[0059] For example, the UV value in the UV map is between 0 and 1, and the value changes from 0 to 1.
[0060] As a possible implementation, in step S103, gradually changing the display threshold to gradually hide the icon can be described in detail as follows:
[0061] Gradually reduce the display threshold so that the icon gradually changes from being fully displayed to being completely hidden;
[0062] The initial value of the display threshold is greater than the maximum UV value of each position in the UV map, and the final value of the display threshold is less than the minimum UV value of each position in the UV map.
[0063] In this embodiment, the initial value of the display threshold is greater than the maximum UV value of each position in the UV map, and the final value of the display threshold is less than the minimum UV value of each position in the UV map, that is, the transparent channel is pure white at the beginning and pure black at the end. By gradually reducing the display threshold, the transition of the transparent channel from white to black can be achieved, thereby realizing the gradual change of the icon from fully displayed to completely hidden.
[0064] For example, the UV value in the UV map is between 0 and 1, and the value changes from 1 to 0.
[0065] As a possible implementation, the UV values at each position in the UV map are not exactly the same, including:
[0066] The UV values in the UV map gradually increase along the first direction;
[0067] The first direction is any direction on the plane where the UV map is located.
[0068] In this embodiment, a method for displaying and hiding icons is designed, whereby the UV value in the UV map gradually increases along a first direction. When the value changes from 0 to 1, the icon gradually appears along the first direction; when the value changes from 1 to 0, the icon gradually hides in the direction opposite to the first direction. The first direction can be any direction, such as from bottom to top, from left to right, from the lower left corner to the upper right corner, and so on.
[0069] Figure 2 This embodiment provides a method for displaying icons from bottom to top. The UV values in the UV map gradually increase from bottom to top, and the transparent channel gradually turns white from bottom to top when displaying the icon. Similarly, when hiding the icon, the transparent channel gradually turns black from top to bottom, realizing the top-down hiding of the icon.
[0070] Furthermore, in the process of gradually changing the display threshold, the following steps are further included:
[0071] Add a noise map within the preset range on both sides of the black and white boundary in the UV map.
[0072] In this embodiment, since the UV value in the UV map gradually increases along the first direction, there must be a boundary line between black and white, for example Figure 2 By adding a noise map noiseTex (a picture of mixed black and white particles) near the black and white boundary, you can achieve a random particle display effect at the junction of the icon being displayed and hidden, achieving a broken icon effect, such as Figure 3 shown.
[0073] Furthermore, in the process of gradually changing the display threshold, the following steps are further included:
[0074] Taking the first straight line as the boundary, the pixels of the icon within the preset range on both sides of the black and white boundary line in the UV map are equally divided into two parts, and the first straight line is parallel to the first direction;
[0075] Calculate the distance between each pixel and a second straight line, where the second straight line is perpendicular to the first direction and passes through a position where the minimum UV value in the UV map is located;
[0076] The moving distance of each pixel is determined according to the distance between each pixel and the second straight line, and the pixels on both sides of the first straight line are moved in a direction away from the first straight line according to the moving distance.
[0077] In this embodiment, Figure 2 、 Figure 3 For example, the UV map with UV values increasing from bottom to top is shown in Figure 4 As shown, the first straight line is vertically parallel to the first direction and divides the pixels within a range L near the black-white boundary into two equal parts, shifting the pixels in the left half to the left and the pixels in the right half to the right. The offset value can gradually increase from bottom to top, that is, the closer to the second straight line, the smaller the offset value, and vice versa. This causes the icon to spread out to both sides at the top of the display part, achieving the effect of broken particles converging from all angles above. Similarly, when the icon is hidden, the effect is that the broken particles of the icon gradually disperse, thereby improving the display effect of the icon being shown and hidden.
[0078] Furthermore, the moving distance of each pixel is determined according to the distance between each pixel and the second straight line, which can be described in detail as follows:
[0079] According to y i =a*(x i -c) determining the movement distance of each pixel;
[0080] Among them, y i is the moving distance of the i-th pixel, x i is the distance between the i-th pixel and the second straight line, a is a preset coefficient, and c is the minimum value of the distances between each pixel and the second straight line.
[0081] In general, the icon display and hiding method of this embodiment has the following advantages:
[0082] (1) The display effect is more technological and the user experience is better;
[0083] (2) It is more scalable. By modifying parameters, the icon can be displayed from bottom to top, from left to right, from right to left, etc. It is not limited to a single direction. For example, it can also be displayed from the center to the outer edge.
[0084] (3) There is no need to produce a large number of special effects, and icon replacement is simpler and more applicable.
[0085] (4) This method can also be combined with icon movement, transparency changes, etc. to create new effects.
[0086] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0087] Figure 5 This is a schematic diagram of the structure of the device for displaying and hiding user interface icons provided by an embodiment of the present invention, see Figure 5 As shown, the device includes:
[0088] The establishing module 51 is used to establish the UV map of the icon, and the UV values of various positions in the UV map are not completely the same.
[0089] The judgment module 52 is used to judge the relationship between the UV value of each position and the display threshold. If the UV value of a position is greater than the display threshold, the position is displayed in black, otherwise the position is displayed in white.
[0090] The processing module 53 is configured to use the UV map as a transparent channel of the icon and gradually change the display threshold so that the icon is gradually displayed or hidden.
[0091] As a possible implementation manner, the processing module 53 is specifically configured to:
[0092] Gradually increase the display threshold so that the icon gradually changes from being completely hidden to being fully displayed;
[0093] The initial value of the display threshold is smaller than the minimum UV value of each position in the UV map, and the final value of the display threshold is larger than the maximum UV value of each position in the UV map;
[0094] As a possible implementation manner, the processing module 53 is specifically configured to:
[0095] Gradually reduce the display threshold so that the icon gradually changes from being fully displayed to being completely hidden;
[0096] The initial value of the display threshold is greater than the maximum UV value of each position in the UV map, and the final value of the display threshold is less than the minimum UV value of each position in the UV map.
[0097] As a possible implementation, the UV values at each position in the UV map are not exactly the same, including:
[0098] The UV values in the UV map gradually increase along the first direction;
[0099] The first direction is any direction on the plane where the UV map is located.
[0100] Furthermore, in the process of gradually changing the display threshold, the processing module 53 is further configured to:
[0101] Add a noise map within the preset range on both sides of the black and white boundary in the UV map.
[0102] Furthermore, in the process of gradually changing the display threshold, the processing module 53 is further configured to:
[0103] Taking the first straight line as the boundary, the pixels of the icon within the preset range on both sides of the black and white boundary line in the UV map are equally divided into two parts, and the first straight line is parallel to the first direction;
[0104] Calculate the distance between each pixel and a second straight line, where the second straight line is perpendicular to the first direction and passes through a position where the minimum UV value in the UV map is located;
[0105] The moving distance of each pixel is determined according to the distance between each pixel and the second straight line, and the pixels on both sides of the first straight line are moved in a direction away from the first straight line according to the moving distance.
[0106] Furthermore, determining the movement distance of each pixel according to the distance between each pixel and the second straight line includes:
[0107] According to y i =a*(x i -c) determining the movement distance of each pixel;
[0108] Among them, y i is the moving distance of the i-th pixel, x i is the distance between the i-th pixel and the second straight line, a is a preset coefficient, and c is the minimum value of the distances between each pixel and the second straight line.
[0109] An embodiment of the present invention provides a vehicle, which includes an electronic device, the electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the method for displaying and hiding user interface icons as described above are implemented.
[0110] Figure 6 FIG is a schematic diagram of an electronic device 60 provided by an embodiment of the present invention. Figure 6As shown, the electronic device 60 of this embodiment includes: a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61, such as a program for displaying and hiding user interface icons. When the processor 61 executes the computer program 63, the steps in the above-mentioned method embodiments for displaying and hiding user interface icons are implemented, such as Figure 1 Alternatively, when the processor 61 executes the computer program 63, the functions of the modules in the above-mentioned device embodiments are realized, for example, Figure 5 The functions of modules 51 to 53 are shown.
[0111] Exemplarily, the computer program 63 may be divided into one or more modules / units, which are stored in the memory 62 and executed by the processor 61 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 63 in the electronic device 60.
[0112] The electronic device 60 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will appreciate that Figure 6 This is merely an example of the electronic device 60 and does not constitute a limitation of the electronic device 60 . The electronic device 60 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 60 may also include input and output devices, network access devices, buses, etc.
[0113] The processor 61 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0114] The memory 62 may be an internal storage unit of the electronic device 60, such as a hard disk or memory of the electronic device 60. The memory 62 may also be an external storage device of the electronic device 60, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 60. Furthermore, the memory 62 may include both an internal storage unit of the electronic device 60 and an external storage device. The memory 62 is used to store the computer program and other programs and data required by the electronic device 60. The memory 62 may also be used to temporarily store data that has been output or is about to be output.
[0115] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0116] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0117] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0118] In the embodiments provided by the present invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0119] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0120] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0121] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0122] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.
Claims
1. A method for displaying and hiding user interface icons, characterized in that: include: Creating a UV map of the icon, wherein UV values at various positions in the UV map are not completely the same; Determine the relationship between the UV value of each position and the display threshold. If the UV value of a position is greater than the display threshold, the position will be displayed in black, otherwise the position will be displayed in white. Using the UV map as the transparent channel of the icon; gradually changing the display threshold so that the icon is gradually displayed or gradually hidden; The UV values at each position in the UV map are not exactly the same, including: The UV values in the UV map gradually increase along the first direction; Wherein, the first direction is any direction on the plane where the UV map is located; The process of gradually changing the display threshold further includes: Add a noise map within a preset range on both sides of the black and white boundary line in the UV map; The noise map is a mixed image of black and white particles.
2. The method for displaying and hiding user interface icons according to claim 1, wherein: Gradually changing the display threshold so that the icon is gradually displayed includes: gradually increasing the display threshold so that the icon changes from being completely hidden to being fully displayed; The initial value of the display threshold is smaller than the minimum UV value of each position in the UV map, and the final value of the display threshold is larger than the maximum UV value of each position in the UV map.
3. The method for displaying and hiding user interface icons according to claim 1, wherein: Gradually changing the display threshold to gradually hide the icon comprises: Gradually reducing the display threshold so that the icon gradually changes from being fully displayed to being completely hidden; The initial value of the display threshold is greater than the maximum UV value of each position in the UV map, and the final value of the display threshold is less than the minimum UV value of each position in the UV map.
4. The method for displaying and hiding user interface icons according to claim 1, wherein: The process of gradually changing the display threshold further includes: Divide the pixels of the icon within a preset range on both sides of the black and white boundary line in the UV map into two equal parts using a first straight line as a boundary, wherein the first straight line is parallel to the first direction; Calculating the distance between each pixel and a second straight line, where the second straight line is perpendicular to the first direction and passes through a position where a minimum UV value in the UV map is located; The moving distance of each pixel is determined according to the distance between each pixel and the second straight line, and the pixels on both sides of the first straight line are moved in a direction away from the first straight line according to the moving distance.
5. The method for displaying and hiding user interface icons according to claim 4, wherein: Determining a movement distance of each pixel according to a distance between each pixel and the second straight line includes: according to y i =a* ( x i -c ) Determine the movement distance of each pixel; in, y i is the moving distance of the i-th pixel, x i is the distance between the i-th pixel and the second straight line, a is the preset coefficient, c is the minimum value of the distance between each pixel and the second straight line.
6. A device for displaying and hiding user interface icons, characterized in that: include: A creation module, used for creating a UV map of an icon, wherein UV values at various positions in the UV map are not completely the same; The judgment module is used to judge the relationship between the UV value of each position and the display threshold. If the UV value of a position is greater than the display threshold, the position is displayed in black, otherwise the position is displayed in white; a processing module, configured to use the UV map as a transparent channel of the icon and gradually change the display threshold so as to gradually display or hide the icon; The UV values at each position in the UV map are not exactly the same, including: The UV values in the UV map gradually increase along the first direction; Wherein, the first direction is any direction on the plane where the UV map is located; The process of gradually changing the display threshold further includes: Add a noise map within a preset range on both sides of the black and white boundary line in the UV map; The noise map is a mixed image of black and white particles.
7. A vehicle comprising an electronic device, the electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.