CN115291991A - Meter digital display method, device, equipment and computer readable storage medium - Google Patents
Meter digital display method, device, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN115291991A CN115291991A CN202210968457.6A CN202210968457A CN115291991A CN 115291991 A CN115291991 A CN 115291991A CN 202210968457 A CN202210968457 A CN 202210968457A CN 115291991 A CN115291991 A CN 115291991A
- Authority
- CN
- China
- Prior art keywords
- digit
- offset
- text element
- pixel
- digital display
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Control Of Indicators Other Than Cathode Ray Tubes (AREA)
Abstract
The invention provides a method, a device and equipment for displaying instrument numbers and a computer readable storage medium, and belongs to the technical field of instrument number display. The method of the application displays the required digit by setting the instrument number; sequentially sorting and fixedly configuring five text elements on each digit from large to small according to descending order from top to bottom; calculating the pixel height of each text element and the offset coefficient on each digit; calculating integral offset pixels of the five text elements on the current digit according to the offset coefficient and the pixel height of each text element; the transparency displayed by the text element on the current digit is controlled according to the distance of the whole offset pixel on the current digit, the digital display speed of the instrument is high, and the problems that frequent digital display is realized by adopting a plurality of UI objects, the load of a garbage collector is increased, the running performance of system software is reduced, the timely display of data information on an instrument panel is influenced, and the use experience of a user is seriously influenced can be effectively solved.
Description
Technical Field
The invention relates to the technical field of digital display of instruments, in particular to a digital display method, a digital display device, digital display equipment and a computer readable storage medium.
Background
At present, automobiles, airplanes and digital electric meters are provided with a large number of instrument panels for displaying static or dynamic data parameter information of equipment, such as journey information display on automobiles, oil meter information display, altitude information display on airplanes, power consumption information display on digital electric meters and the like. And according to the display of the data information on the instrument panel, a user can conveniently judge the current state and the use condition of the equipment according to the displayed digital display. The display of the meter numbers on the instrument panel of the existing equipment generally refers to frequently instantiating the data information into a plurality of UI objects, and the scrolling in/out of the UI objects is realized by adopting a transparent mask mode so as to realize the gradual change effect of digital display. Due to the fact that continuous UI objects are rolled in/out, UI drawing performance is reduced, the load of the garbage collector is increased, software running performance of the whole control system is reduced, user use body feeling is affected, or display of data information is delayed, so that users can make wrong judgments or bad results when using the device.
Disclosure of Invention
In view of this, an object of the present invention is to provide a method, an apparatus, a device, and a computer-readable storage medium for displaying meter data, which are used to solve the problems that the existing meter data display requires frequent instances of multiple UI objects, so that the UI drawing performance is reduced, the load of a garbage collector is increased, the running performance of system software is reduced, so that the timely display of data information on a dashboard is affected, prediction and adverse consequences are generated when a user uses the device, and the user experience is seriously affected.
The technical scheme adopted by the invention for solving the technical problems is as follows:
the invention provides a digital display method of an instrument, which is applied to an interface presenting a digital variation trend,
the method comprises the following steps:
setting the digit required by the digital display of the instrument;
five text elements are fixedly arranged on each digit according to descending order of the digits from large to small from top to bottom;
calculating the pixel height of each text element;
calculating an offset coefficient on each digit; wherein the offset coefficient of the current digit is a digit on a digit one digit lower than it;
calculating integral offset pixels of the five text elements on the current digit according to the offset coefficient and the pixel height of each text element;
controlling the displayed transparency of the text element on the current digit according to the distance of the overall offset pixel on the current digit.
In some embodiments, said calculating an overall offset pixel for the current five text elements based on the offset coefficient and the pixel height of each text element comprises:
taking the number on the digit lower than the current digit by one digit as the offset coefficient P of the current digit;
calculating the pixel height H of each text element on the current digit;
calculating the integral offset pixel L of the five text elements of the current digit according to the offset coefficient P and the pixel height H of each text element; i.e. L = P × H.
In some embodiments, said calculating global offset pixels for the current five text elements as a function of the offset coefficient and the pixel height of each text element comprises calculating global offset pixels in units of digits; the method specifically comprises the following steps:
taking the first digit after the digit of the decimal point as the offset coefficient of the digit;
calculating the pixel height of each text element with the digits as the units;
and calculating the overall offset pixels of the five text elements with the current digit being one bit according to the offset coefficient and the pixel height of each text element.
In some embodiments, said controlling the transparency of the display of said text element on the current digit as a function of the distance measure of said overall offset pixel on the current digit comprises:
setting the central line of the text elements arranged in the middle position as a reference line, wherein the reference line corresponds to the reference number 0, and judging the size of the integral offset pixel and the reference number 0;
when the overall offset pixel L is smaller than the reference number 0, controlling the text element on the current digit to be overall upwardly offset;
and when the overall offset pixel L is larger than the reference number 0, controlling the text element on the current digit to be overall offset downwards.
In an embodiment, the method further comprises: when the overall offset pixel L is equal to the reference number 0, it indicates that the five text elements on the current digit are offset by an H pixel distance, and the number of the text element originally displayed is displayed by adding 1 or subtracting 1, and is used as the basis for the next iteration display.
In one embodiment, the controlling the transparency displayed by the text element on the current digit according to the distance size of the overall offset pixel on the current digit comprises:
taking the central line of the middle text element on the current digit as an original central line;
calibrating three sampling points on each text element, wherein the three sampling points respectively correspond to the top, the middle and the bottom of the text element;
calculating the distance between each sampling point of each text element and the original center line;
controlling the transparency of the sampling points according to the distance between each sampling point of each text element and the original center line; the smaller the distance, the greater the opacity of the sample point.
In one embodiment, the setting the number of digits required for the digital display of the meter includes:
the digits required to be set according to the digital display of the instrument comprise digits before decimal point, tens, hundreds, thousands ten thousands digit, the first digit tenth digit, the second digit hundredth digit and the third digit thousands digit after the decimal point.
The second aspect of the present invention also provides a meter digital display device using the steps in the meter digital display method described above, the device including a digit setting unit, a text element arrangement unit, a calculation unit, an offset pixel calculation unit, and a text element transparency control unit connected to each other;
the digital setting unit is used for setting digital required by digital display of the instrument;
the text element configuration unit is used for fixedly configuring five text elements on each digit according to descending order of the digits from large to small and descending order from top to bottom;
the calculation unit is used for calculating the pixel height of each text element and determining the offset coefficient on each digit;
the offset pixel calculation unit is used for calculating the integral offset pixels of the five text elements on the current digit according to the offset coefficient and the pixel height of each text element;
the text element transparency control unit is used for controlling the displayed transparency of the text element on the current digit according to the distance of the integral offset pixel on the current digit, and the larger the distance is, the smaller the displayed transparency of the text element is.
The third aspect of the present invention also provides a meter digital display device, which comprises a memory, a processor and a computer program stored on the memory and operable on the processor, wherein the computer program, when executed by the processor, implements the steps of the meter digital display method described above.
The present application also provides a computer-readable storage medium comprising a processor, a computer-readable storage medium and a computer program stored on the computer-readable storage medium, which computer program, when executed by the processor, performs the steps in the method as described above.
The instrument digital display method, the device, the equipment and the computer readable storage medium provided by the embodiment of the invention have the advantages that the instrument digital display method displays required digits by setting the digits of the instrument; sequentially sorting and fixedly configuring five text elements on each digit from large to small according to descending order from top to bottom; calculating the pixel height of each text element and the offset coefficient on each digit; calculating integral offset pixels of the five text elements on the current digit according to the offset coefficient and the pixel height of each text element; the transparency displayed by the text element on the current digit is controlled according to the distance of the integral offset pixel on the current digit, the digital display speed of the instrument is high, and the method can effectively avoid the problems that the UI drawing performance is reduced, the burden of a garbage collector is increased, the timely display of data information on an instrument panel is influenced due to the reduction of the running performance of system software, the prejudgment and the bad result are generated when a user uses equipment, and the use experience of the user is seriously influenced because a plurality of UI objects are frequently instantiated for the data display of the existing instrument.
Drawings
FIG. 1 is a flow chart of a method of an embodiment of a method for displaying a meter number according to the present invention;
FIG. 2 is a schematic diagram of a digital display process of a digital display method of a meter according to an embodiment of the present invention;
FIG. 3 is a method flow diagram of another embodiment of a method for digital display of a meter in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a variation of the transparency of the digital display of the method for displaying the digital display of the meter according to the embodiment of the present invention;
FIG. 5 is a schematic view of a digital display method for a meter used in an automobile according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a digital instrument display device according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "part", or "unit" used to indicate elements are used only for facilitating the description of the present invention, and have no particular meaning in themselves. Thus, "module", "component" or "unit" may be used mixedly.
The first embodiment is as follows:
the present invention provides a digital display method for a meter, which is applied to an interface presenting a digital variation trend, for example, a display device having a dashboard, such as an automobile, an airplane, and a digital electric meter, and please refer to fig. 1 to 3, and the method includes the following steps:
s101, setting digits required by digital display of the instrument;
specifically, the digital display method includes the steps that the digital display required digits of the instrument are set on equipment on an interface, such as an instrument panel, presenting a digital change trend, of the instrument, wherein the digits include one digit, ten digits, hundred digits, thousand digits, arranged in front of a decimal point, and first digit, ten digits, second digit, and third digit, ten digits and thousands digits after the decimal point, and the number of the digits required to be set specifically can be determined according to actual requirements.
S102, sequentially sorting and fixedly configuring five text elements on each digit in a descending order from top to bottom according to the size of the digits;
specifically, five text elements are fixedly configured on each digit in a descending order from top to bottom according to the numerical value of the number, for example, in table 1 below, 5 text elements are respectively allocated to each digit (one, ten, one hundred.), and the five text elements are respectively set as T1, T2, T3, T4, and T5 and are arranged in sequence from top to bottom, where T3 shows the number X on the current digit, then T1 shows X +2, T2 shows X +1, T4 shows X-1, and T5 shows X-2, so that the numbers displayed on T1 to T5 gradually form a descending sequence arrangement.
Table 1:
t1 (display X + 2) |
T2 (display X + 1) |
T3 (display X) |
T4 (display X-1) |
T5 (display X-2) |
S103, calculating the pixel height of each text element;
specifically, the pixel height of each text element can be measured to be H according to actual conditions.
S104, calculating an offset coefficient on each digit; wherein the offset coefficient of the current digit is a number on a digit one digit lower than it;
specifically, the offset coefficient of each digit is calculated, where the offset coefficient of the current digit is a digit on a digit lower than the current digit, for example, when the current digit is a whole offset pixel on a single digit, the first digit after the digit of the decimal point is taken as the offset coefficient of the single digit; when the overall offset pixel with the digit being ten digits is calculated, the digit with the digit being one digit is used as an offset coefficient of the ten digits, and so on.
Calculating the pixel height of each text element with the digits as the units;
and calculating the overall offset pixels of the five text elements with the current digit being one bit according to the offset coefficient and the pixel height of each text element.
S105, calculating integral offset pixels of five text elements on the current digit according to the offset coefficient and the pixel height of each text element;
specifically, the calculating of the overall offset pixels of the current five text elements according to the offset coefficient and the pixel height of each text element includes:
taking the number on the digit lower than the current digit by one digit as the offset coefficient P of the current digit;
calculating the pixel height H of each text element on the current digit;
calculating the integral offset pixel L of the five text elements of the current digit according to the offset coefficient P and the pixel height H of each text element; i.e. L = P × H.
For example, when calculating the integral offset pixel with the digit being the unit digit, the first digit after the digit of the decimal point is taken as the offset coefficient P of the unit digit, and the pixel height H of each text element with the digit being the unit digit is calculated; and calculating an overall offset pixel L of the five text elements with the current digit being one bit according to the offset coefficient and the pixel height of each text element, namely L = P H.
Similarly, when calculating the overall offset pixel with the digit being ten, the digit in one digit is taken as the offset coefficient P' of ten,
calculating the pixel height H' of each text element with tens digits;
and calculating the overall offset pixel L 'of the five text elements with the current ten digits, namely L' = P '. H', according to the offset coefficient and the pixel height of each text element.
And S106, controlling the transparency displayed by the text element on the current digit according to the distance of the overall offset pixel on the current digit.
Specifically, a center line of the text element arranged in the middle position is set as a reference line, the reference line corresponds to the reference number 0, and the size of the overall offset pixel and the reference number 0 is judged;
when the overall offset pixel L is smaller than the reference number 0, controlling the text element on the current digit to be overall upwardly offset;
and when the overall offset pixel L is larger than the reference number 0, controlling the text element on the current digit to be overall offset downwards.
When the overall offset pixel L is equal to the reference number 0, it indicates that the five text elements on the current digit are offset by an H pixel distance, and the number of the text element originally displayed is displayed by adding 1 or subtracting 1, and is used as the basis for the next iteration display.
After adding 1 or subtracting 1 to the number of the originally displayed text element, T1 to T5 thus form a new number sequence X '+2, X' +1, X '-1, X' -2 (X '= X +1 or X' = X-1). And replacing X with X' in the next iteration and repeating the steps. Thereby achieving the purpose of recycling T1-T5.
In an embodiment, the controlling the transparency displayed by the text element on the current digit according to the distance size of the overall offset pixel on the current digit further comprises:
s1061, taking the central line of the middle text element on the current digit as an original central line;
s1062, calibrating three sampling points on each text element, wherein the three sampling points respectively correspond to the top, the middle and the bottom of the text element;
s1063, calculating the distance between each sampling point of each text element and the original center line;
s1064, controlling the transparency of the sampling points according to the distance between each sampling point of each text element and the original central line; the smaller the distance, the greater the opacity of the sample point.
Specifically, as shown in fig. 4, five text elements T1, T2, T3, T4, and T5 are regarded as a large drawing area, a transverse center line of T3 is used as an original center line, 3 sampling points A, B, C (respectively corresponding to the top, middle, and bottom of the text element) are calibrated for each text element, and the distance between each sampling point of each text element and the original center line is calculated, wherein the smaller the distance, the greater the opacity of the sampling point.
The instrument digital display method is applied to an interface presenting a digital change trend, such as the number of kilometers traveled by an automobile, the flying height of an airplane, the reading of a digital electric meter and the like. As shown at 150 in fig. 5 from 149, the tens digit 5 is displayed by gradually sliding from top to bottom following the ones digit 9; conversely, if 149 is withdrawn from 150, the number 5 in the ten position is gradually drawn upward together with the number 0 in the one position, and the number 4 in the ten position is gradually slid into the display from bottom to top together with the number 9 in the one position. In summary, the correlated display of single, ten, hundred and thousand digits is realized like a household electric meter.
The method for displaying the digital instrument displays the required digital number by setting the digital instrument; sequentially descending, sorting and fixedly configuring five text elements on each digit from large to small according to the number from top to bottom; calculating the pixel height of each text element and the offset coefficient on each digit; calculating integral offset pixels of the five text elements on the current digit according to the offset coefficient and the pixel height of each text element; the transparency displayed by the text element on the current digit is controlled according to the distance of the integral offset pixel on the current digit, the digital display speed of the instrument is high, and the method can effectively avoid the problems that the UI drawing performance is reduced, the burden of a garbage collector is increased, the timely display of data information on an instrument panel is influenced due to the reduction of the running performance of system software, the prejudgment and the bad result are generated when a user uses equipment, and the use experience of the user is seriously influenced because a plurality of UI objects are frequently instantiated for the data display of the existing instrument.
Example two:
referring to fig. 6, the instrument digital display device includes a digital setting unit 201, a text element configuration unit 301, a calculation unit 401, an offset pixel calculation unit 501, and a text element transparency control unit 601, which are connected to each other;
the digit setting unit 201 is used for setting digits required by digital display of the instrument;
specifically, the digit setting unit 201 sets digits required for instrument digital display on a device on an interface, such as an instrument panel, presenting a digital change trend, where the digits include a unit digit, a tens digit, a hundreds digit, a thousands digit, a ten digit, a first tens digit, a second percentile, and a third tens digit, and the number of the digits required to be set can be determined according to an actual demand.
The text element configuration unit 301 is configured to fixedly configure five text elements in each digit according to descending order of the digits from top to bottom;
specifically, five text elements are fixedly configured by the text element configuration unit 301 in a descending order from top to bottom in sequence according to the numeric value of the number on each digit, for example, 5 text elements are respectively allocated to each digit (one, ten, one hundred.), and the five text elements are respectively T1, T2, T3, T4, and T5 and are arranged in sequence from top to bottom, where T3 shows the number X on the current digit, then T1 shows X +2, T2 shows X +1, T4 shows X-1, and T5 shows X-2, so that the numbers displayed on T1 to T5 gradually form a descending sequence arrangement.
The calculating unit 401 is configured to calculate a pixel height of each text element and determine an offset coefficient on each digit;
specifically, the pixel height of each text element can be measured and obtained to be H according to actual conditions; calculating a shift coefficient P on each digit, wherein when the shift coefficient of the current digit is a digit on a digit lower than the current digit, for example, when the current digit is a whole shift pixel on a single digit, the first digit after the digit of the decimal point is taken as the shift coefficient of the single digit; when the overall offset pixel with the digit being ten digits is calculated, the digit with the digit being one digit is taken as the offset coefficient of the ten digits, and so on.
The offset pixel calculation unit 501 is configured to calculate overall offset pixels of five text elements in the current digit according to the offset coefficient and the pixel height of each text element;
specifically, calculating an overall offset pixel L of five text elements of the current digit according to the offset coefficient P and the pixel height H of each text element; i.e. L = P × H.
The text element transparency control unit 601 is configured to control the transparency displayed by the text element on the current digit according to the distance of the whole offset pixel on the current digit, where the larger the distance is, the smaller the transparency displayed by the text element is.
Specifically, the center line of a middle text element on the current digit is used as an original center line, three sampling points are calibrated on each text element, the three sampling points respectively correspond to the top, the middle and the bottom of the text element, and the distance between each sampling point of each text element and the original center line is calculated; controlling the transparency of the sampling points according to the distance between each sampling point of each text element and the original center line; the smaller the distance, the greater the opacity of the sample point.
In addition to the transparency of the displayed text element, the displayed position of the text element may also be moved up or down, where the moving up or down of the text element specifically includes:
setting the central line of the text elements arranged in the middle position as a reference line, wherein the reference line corresponds to the reference number 0, and judging the size of the integral offset pixel and the reference number 0;
when the overall offset pixel L is smaller than the reference number 0, controlling the text element on the current digit to be overall upwardly offset;
and when the overall offset pixel L is larger than the reference number 0, controlling the text element on the current digit to be overall offset downwards.
When the overall offset pixel L is equal to the reference number 0, it indicates that the five text elements on the current digit are offset by an H pixel distance, and the number of the text element originally displayed is displayed by adding 1 or subtracting 1, and is used as the basis for the next iteration display.
After adding 1 or subtracting 1 to the number of the originally displayed text element, T1 to T5 thus form a new number sequence X '+2, X' +1, X '-1, X' -2 (X '= X +1 or X' = X-1). And replacing X with X' in the next iteration and repeating the steps. Thereby achieving the purpose of recycling T1-T5.
The digital display device of the meter according to the embodiment of the present application can be generally disposed on an interface presenting a digital variation trend, such as the number of kilometers traveled by an automobile, the flying height of an airplane, and the reading of a digital electric meter. As figure 5 proceeds from 149 to 150, the tens digit 5 is shown sliding down from top to bottom following the ones digit 9; conversely, if 149 is withdrawn from 150, the number 5 in the ten position is gradually drawn upward together with the number 0 in the one position, and the number 4 in the ten position is gradually slid into the display from bottom to top together with the number 9 in the one position. In summary, the correlated display of single, ten, hundred and thousand digits is realized like a household electric meter.
The digital display device of the meter of the embodiment of the application sets the digital number required by the digital display of the meter by the digital setting unit 201; the text element configuration unit 301 sequentially arranges five text elements in descending order and fixed on each digit according to the descending order of the digits from top to bottom; the calculation unit 401 calculates the pixel height of each text element and the offset coefficient on each digit; calculating, by the offset pixel calculation unit 501, overall offset pixels of five text elements on the current digit from the offset coefficient and the pixel height of each text element; the transparency displayed by the text element on the current digit is controlled by the text element transparency control unit 601 according to the distance of the whole offset pixel on the current digit, so that the rapid display of the instrument digit is realized, the display speed is high, and by adopting the device, the problems that the UI drawing performance is reduced, the burden of a garbage collector is increased due to the fact that a plurality of UI objects are frequently instantiated for the data display of the existing instrument, the timely display of data information on an instrument panel is influenced due to the reduction of the running performance of system software, prejudgment and adverse consequences are caused when a user uses equipment, and the use experience of the user is seriously influenced can be effectively avoided.
Example three:
the present invention also provides a digital meter display device, which includes a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the digital meter display method according to the first embodiment.
Example four:
according to an embodiment of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the meter digital display method according to the first embodiment, where the specific steps are as described in the first embodiment, and are not described herein again.
The memory in the present embodiment may be used to store software programs as well as various data. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile phone, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
According to an example of this embodiment, all or part of the processes in the methods of the embodiments described above may be implemented by a computer program to instruct related hardware, where the program may be stored in a computer-readable storage medium, and in this embodiment of the present invention, the program may be stored in the storage medium of a computer system and executed by at least one processor in the computer system, so as to implement the processes including the embodiments of the methods described above. The storage medium includes, but is not limited to, a magnetic disk, a flash disk, an optical disk, a Read-Only Memory (ROM), and the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (10)
1. A digital display method of a meter is applied to an interface presenting a digital variation trend, and is characterized by comprising the following steps:
setting the digit required by the digital display of the instrument;
five text elements are fixedly arranged on each digit according to descending order of the digits from large to small from top to bottom;
calculating the pixel height of each text element;
calculating an offset coefficient on each digit; wherein the offset coefficient of the current digit is a number on a digit one digit lower than it;
calculating integral offset pixels of the five text elements on the current digit according to the offset coefficient and the pixel height of each text element;
controlling the displayed transparency of the text element on the current digit according to the distance of the overall offset pixel on the current digit.
2. The meter digital display method of claim 1, wherein said calculating an overall offset pixel for the current five text elements based on the offset coefficient and the pixel height of each text element comprises:
taking the number on the digit lower than the current digit by one digit as the offset coefficient P of the current digit;
calculating the pixel height H of each text element on the current digit;
calculating the integral offset pixel L of the five text elements of the current digit according to the offset coefficient P and the pixel height H of each text element; i.e. L = P × H.
3. The meter digital display method according to claim 2, wherein said calculating the global offset pixels of the current five text elements from the offset coefficient and the pixel height of each text element includes calculating the global offset pixels in units of digits; the method specifically comprises the following steps:
taking the first digit after the digit of the decimal point as the offset coefficient of the one digit;
calculating the pixel height of each text element with the digits as the units;
and calculating the overall offset pixel of the five text elements with the current digit being one bit according to the offset coefficient and the pixel height of each text element.
4. The meter digital display method according to claim 2, wherein said controlling the transparency of the text element displayed on the current digit according to the distance size of the overall offset pixel on the current digit comprises:
setting the central line of the text elements arranged in the middle position as a reference line, wherein the reference line corresponds to the reference number 0, and judging the size of the integral offset pixel and the reference number 0;
when the overall offset pixel L is smaller than the reference number 0, controlling the text element on the current digit to be overall upwardly offset;
and when the overall offset pixel L is larger than the reference number 0, controlling the text element on the current digit to be overall offset downwards.
5. The meter digital display method according to claim 4, further comprising: when the overall offset pixel L is equal to the reference number 0, it indicates that the five text elements on the current digit are offset by an H pixel distance, and the number of the text element originally displayed is displayed by adding 1 or subtracting 1, and is used as the basis for the next iteration display.
6. The meter digital display method according to claim 2, wherein said controlling the transparency of the text element displayed on the current digit according to the distance size of the overall offset pixel on the current digit comprises:
taking the central line of the middle text element on the current digit as an original central line;
calibrating three sampling points on each text element, wherein the three sampling points respectively correspond to the top, the middle and the bottom of the text element;
calculating the distance between each sampling point of each text element and the original center line;
controlling the transparency of the sampling points according to the distance between each sampling point of each text element and the original center line; the smaller the distance, the greater the opacity of the sample point.
7. The meter digital display method according to claim 2, wherein said setting a number required for meter digital display includes:
the digits required to be set according to the digital display of the instrument comprise digits before decimal point, tens, hundreds, thousands ten thousands digit, the first digit tenth digit, the second digit hundredth digit and the third digit thousands digit after the decimal point.
8. A meter digital display device, characterized in that the meter digital display device employs the steps in the meter digital display method according to any one of claims 1 to 7, the meter digital display device comprising a digit setting unit, a text element arrangement unit, a calculation unit, an offset pixel calculation unit, and a text element transparency control unit, which are connected to each other;
the digital setting unit is used for setting digital required by digital display of the instrument;
the text element configuration unit is used for fixedly configuring five text elements on each digit according to descending order of the digits from large to small and descending order from top to bottom;
the calculation unit is used for calculating the pixel height of each text element and determining the offset coefficient on each digit;
the offset pixel calculation unit is used for calculating the integral offset pixels of the five text elements on the current digit according to the offset coefficient and the pixel height of each text element;
the text element transparency control unit is used for controlling the displayed transparency of the text element on the current digit according to the distance of the integral offset pixel on the current digit, and the larger the distance is, the smaller the displayed transparency of the text element is.
9. A meter digital display device, characterized in that the device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the meter digital display method according to any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a control program of a meter digital display method is stored on the computer-readable storage medium, which when executed by a processor implements the steps of the meter digital display method according to any one of claims 1 to 7.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210968457.6A CN115291991A (en) | 2022-08-12 | 2022-08-12 | Meter digital display method, device, equipment and computer readable storage medium |
PCT/CN2023/111532 WO2024032564A1 (en) | 2022-08-12 | 2023-08-07 | Instrument digital display method, apparatus and device, and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210968457.6A CN115291991A (en) | 2022-08-12 | 2022-08-12 | Meter digital display method, device, equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115291991A true CN115291991A (en) | 2022-11-04 |
Family
ID=83829875
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210968457.6A Pending CN115291991A (en) | 2022-08-12 | 2022-08-12 | Meter digital display method, device, equipment and computer readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115291991A (en) |
WO (1) | WO2024032564A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024032564A1 (en) * | 2022-08-12 | 2024-02-15 | 亿航智能设备(广州)有限公司 | Instrument digital display method, apparatus and device, and computer-readable storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6034649B2 (en) * | 2012-10-16 | 2016-11-30 | キヤノン株式会社 | Information processing apparatus, information processing apparatus control method, and program |
CN106919320A (en) * | 2015-12-24 | 2017-07-04 | 阿里巴巴集团控股有限公司 | A kind of digit information reminding method and device |
CN111198997A (en) * | 2019-12-30 | 2020-05-26 | 深圳市优必选科技股份有限公司 | Digital display method and device based on webpage |
CN114611031A (en) * | 2022-03-09 | 2022-06-10 | 平安科技(深圳)有限公司 | Digital scrolling display method, device, equipment and medium |
CN115291991A (en) * | 2022-08-12 | 2022-11-04 | 亿航智能设备(广州)有限公司 | Meter digital display method, device, equipment and computer readable storage medium |
-
2022
- 2022-08-12 CN CN202210968457.6A patent/CN115291991A/en active Pending
-
2023
- 2023-08-07 WO PCT/CN2023/111532 patent/WO2024032564A1/en unknown
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024032564A1 (en) * | 2022-08-12 | 2024-02-15 | 亿航智能设备(广州)有限公司 | Instrument digital display method, apparatus and device, and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2024032564A1 (en) | 2024-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Busse et al. | User's guide for the climatological dispersion model | |
CN102982787B (en) | Curve map display device and curve map display methods | |
CN102902408B (en) | A kind of method controlling electronic device touchscreen work and a kind of electronic equipment | |
CN115291991A (en) | Meter digital display method, device, equipment and computer readable storage medium | |
CN107632769B (en) | Map display method and device, electronic equipment and storage medium | |
RU2013108942A (en) | COMPUTER DEVICE WITH IMPROVED CHOICE OF FUNCTIONS AND METHOD | |
CN116414906B (en) | Method, device, medium and equipment for data processing and visualization | |
CN107730097A (en) | A kind of bus load Forecasting Methodology, device and computing device | |
CN113095730A (en) | Instrument priority scheduling evaluation method of Beidou test cloud platform | |
CN108090256A (en) | A kind of lever diagram Automatic Drawing method based on CAD | |
CN112433647B (en) | Method for acquiring channel mapping matrix data of capacitive touch screen | |
CN103137009A (en) | Display method and device for map and vehicle-mounted system | |
CN106535002B (en) | Desktop starter template layout updating method and device | |
CN103063219B (en) | Method for navigation electronic map pretreatment and display | |
CN117473742A (en) | Visualized real-time simulation method for charging load of electric vehicle charging station | |
CN111191162B (en) | Data processing method and device | |
CN104750398B (en) | Based on the graphical interaction system of hydrology drawing and the processing method of hydrographic data | |
CN116503098A (en) | Mining method, mining device, computer equipment and storage medium for shared vehicle station | |
CN115525270A (en) | Method, system, terminal device and storage medium for rendering form page based on dragging | |
CN116185547A (en) | Data rendering method and device based on virtual list | |
CN115473216A (en) | Method and system for improving line loss calculation of power grid | |
CN110633453A (en) | Atmospheric parameter calculation and airspeed conversion program calculation method | |
US20120123747A1 (en) | Method and system for processing and displaying sheet-metal-forming simulation parameters | |
JPH0793403A (en) | Method for personal rating data process assessment utilizing computer | |
CN102346427A (en) | Method for displaying analog clock |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |