CN112395025B - Spiral pointer drawing method, device, equipment and storage medium - Google Patents
Spiral pointer drawing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112395025B CN112395025B CN202011457979.7A CN202011457979A CN112395025B CN 112395025 B CN112395025 B CN 112395025B CN 202011457979 A CN202011457979 A CN 202011457979A CN 112395025 B CN112395025 B CN 112395025B
- Authority
- CN
- China
- Prior art keywords
- curves
- spiral
- curve
- pointer
- background
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 230000006870 function Effects 0.000 claims description 46
- 239000003086 colorant Substances 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 6
- 230000003247 decreasing effect Effects 0.000 claims description 2
- 238000009877 rendering Methods 0.000 claims 1
- 239000004973 liquid crystal related substance Substances 0.000 abstract description 9
- 230000007547 defect Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 16
- 238000004422 calculation algorithm Methods 0.000 description 10
- 230000000694 effects Effects 0.000 description 8
- 230000003287 optical effect Effects 0.000 description 8
- 238000012545 processing Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 239000013307 optical fiber Substances 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 238000013519 translation Methods 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 230000006399 behavior Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000012937 correction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000001105 regulatory effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000005452 bending Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 238000004804 winding Methods 0.000 description 1
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/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/001—Texturing; Colouring; Generation of texture or colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/203—Drawing of straight lines or curves
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Image Generation (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The invention discloses a spiral pointer drawing method, a spiral pointer drawing device, spiral pointer drawing equipment and a storage medium. The method comprises the following steps: receiving a spiral pointer drawing instruction; calling a spiral pointer dynamic function according to the spiral pointer drawing instruction; acquiring display interface parameters; according to the display interface parameters and the spiral pointer dynamic function, two item standard curves and two background curves are adjusted, and the defects that the pointer is single in expression form, too small and unobtrusive and the like of the traditional full-liquid crystal instrument are overcome.
Description
Technical Field
The embodiment of the invention relates to the technical field of automobile full liquid crystal instruments, in particular to a spiral pointer drawing method, a device, equipment and a storage medium.
Background
At present, many full liquid crystal meters still simulate speedometers, tachometers and the like of traditional mechanical meters, and a mode of adding a pointer to a disc is still adopted. This approach requires first designing the dial and pointer (2D picture or 3D model), and when applied, rotating the 2D pointer picture (or 3D model) around the center point of the dial by a certain angle, thereby simulating the operation of a conventional mechanical watch. The dial is lack of innovation, the pointer cannot change the style once being manufactured, and only has the properties of zooming, rotation, translation and the like, so that the flexible and various characteristics of the full liquid crystal instrument are not exerted, and the potential of the GPU is not exerted.
Disclosure of Invention
The embodiment of the invention provides a spiral pointer drawing method, a device, equipment and a storage medium, which can solve the defects that the traditional full liquid crystal instrument pointer is single in expression form, too small and unobtrusive, and the like.
In a first aspect, an embodiment of the present invention provides a spiral pointer drawing method, including:
receiving a spiral pointer drawing instruction;
calling a spiral pointer dynamic function according to the spiral pointer drawing instruction;
acquiring display interface parameters;
and adjusting the two item standard curves and the two background curves according to the display interface parameters and the spiral pointer dynamic function.
In a second aspect, an embodiment of the present invention further provides a spiral pointer drawing apparatus, including:
the receiving module is used for receiving the spiral pointer drawing instruction;
the calling module is used for calling a spiral pointer dynamic function according to the spiral pointer drawing instruction;
the acquisition module is used for acquiring display interface parameters;
and the adjusting module is used for adjusting the two item standard curves and the two background curves according to the display interface parameters and the spiral pointer dynamic function.
In a third aspect, embodiments of the present invention further provide a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing a method according to any of the embodiments of the present invention when executing the program.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, implements a method according to any of the embodiments of the present invention.
The embodiment of the invention receives the spiral pointer drawing instruction; calling a spiral pointer dynamic function according to the spiral pointer drawing instruction; acquiring display interface parameters; and adjusting the two item standard curves and the two background curves according to the display interface parameters and the spiral pointer dynamic function so as to realize that the defects that the pointer is small and unobtrusive and the like due to single expression form and insufficient technological sense of the traditional full liquid crystal instrument are overcome.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a spiral pointer drawing method in a first embodiment of the present invention;
FIG. 1a is a schematic diagram of a first drawing of a curve in accordance with a first embodiment of the present invention;
FIG. 1b is a second schematic drawing of a graph according to a first embodiment of the present invention;
FIG. 1c is a third schematic drawing of a graph according to a first embodiment of the present invention;
FIG. 1d is a fourth schematic drawing of a graph according to a first embodiment of the present invention;
FIG. 1e is a fifth schematic drawing of a graph according to a first embodiment of the present invention;
FIG. 1f is a sixth schematic drawing of a graph according to the first embodiment of the present invention;
FIG. 1g is a seventh plotted curve of the first embodiment of the present invention;
FIG. 1h is a schematic diagram of an eighth plot according to the first embodiment of the present invention;
FIG. 1i is a schematic diagram of a spiral pointer in a first embodiment of the present invention;
FIG. 1j is a schematic diagram of a curve before adjustment in a first embodiment of the present invention;
FIG. 1k is a schematic diagram of an adjusted curve in accordance with a first embodiment of the present invention;
FIG. 1l is a schematic diagram showing excessive width in a first embodiment of the present invention;
FIG. 1m is a schematic diagram of an algorithm in accordance with a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of a spiral pointer drawing device in a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device in a third embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
Example 1
Fig. 1 is a flowchart of a spiral pointer drawing method according to an embodiment of the present invention, where the method may be implemented by a spiral pointer drawing device according to an embodiment of the present invention, and the device may be implemented in software and/or hardware, as shown in fig. 1, and the method specifically includes the following steps:
s110, receiving a spiral pointer drawing instruction.
S120, calling a spiral pointer dynamic function according to the spiral pointer drawing instruction.
S130, acquiring display interface parameters.
And S140, adjusting the two item standard curves and the two background curves according to the display interface parameters and the spiral pointer dynamic function.
Optionally, before receiving the spiral pointer drawing instruction, the method further includes:
drawing two background curves and two standard curves;
lightening the colors of the two background curves;
darkening the colors of the two standard curves;
and the distance between the two background curves is increased, and the distance between the two standard curves is reduced.
Optionally, drawing two background curves and two standard curves includes:
obtaining a vehicle speed and/or a rotating speed, wherein the vehicle speed is in direct proportion to a drawing area of a curve, and the rotating speed is in direct proportion to the drawing area of the curve;
determining a drawing area of a curve according to the vehicle speed and/or the rotating speed;
and drawing two background curves and two target curves according to the drawing area.
Optionally, the adjusting the two item standard curves and the two background curves according to the display interface parameter and the spiral pointer dynamic function includes:
determining initial positions of the two target curves and initial positions of the two background curves according to the display interface parameters;
and adjusting the two item standard curves according to the initial positions of the two item standard curves, the initial positions of the two background curves and the spiral pointer dynamic function.
Optionally, the adjusting the two item standard curves and the two background curves according to the display interface parameter and the spiral pointer dynamic function includes:
the color parameters of each standard curve and the color parameters of each background curve are obtained through calculation according to the following formula:
y=(sin(angle)×amplitude+offset)×Color(x)×a x ;
angle=speed×frequency+d;
wherein speed is the curve twisting speed, frequency is the frequency of occurrence of the peak value of the curve twisting speed, d is the distance between the point on the curve and the y axis, amplitude is the curve swing amplitude, offset is the position of the curve from the central axis, a x The width of the curve, x is the pixel abscissa;
and adjusting the target curve according to the color parameters of each target curve, and adjusting the background curve according to the color parameters of each background curve.
The aim of the embodiment of the invention is that: aiming at the problems of poor display effect and inaccurate information acquisition caused by the fact that a dial plate still adopts a mode of adding a pointer to a disc in the prior art, the spiral pointer implementation method based on a function algorithm is provided.
In a specific example, the technical scheme adopted by the embodiment of the invention for solving the technical problems is as follows: the spiral pointer implementation method based on the function algorithm comprises the following steps:
step one: drawing a curve;
step two: drawing a curve and changing parameters of the curve;
step three: repeating the second step to obtain four curves with different parameters;
step four: randomly selecting two curves as a background, and using the other two curves as target curves, wherein the target curves are used for simulating a spiral;
step five: the color parameters are adjusted to lighten the colors of the two curves serving as the background, darken the colors of the two curves serving as the simulated spiral, and then the distance between the two curves serving as the background is increased by adjusting the distance parameters, so that the distance between the two curves serving as the simulated spiral is reduced;
step six: the four curves are positioned on the same interface, and an image formed by the four curves is used as a spiral pointer;
the drawing is realized based on a CPU, a GPU and a flash module in the automobile instrument, wherein the GPU comprises a controller and a plurality of shader modules, and a spiral pointer dynamic function is stored in the flash module.
The drawing method comprises the following steps:
the CPU of the automobile instrument is used for receiving the drawing instruction, calling the spiral pointer dynamic function from the flash module according to the received drawing instruction, taking the size of the display interface as a parameter, sending the parameter to the spiral pointer dynamic function through the GPU, and regulating the position of the curve according to the spiral pointer dynamic function by the GPU.
The color parameters of each standard curve and the color parameters of each background curve are obtained through calculation according to the following formula:
y=(sin(angle)×amplitude+offset)×Color(x)×a x ;
angle=speed×frequency+d;
wherein speed is the curve twisting speed, frequency is the frequency of occurrence of the peak value of the curve twisting speed, d is the distance between the point on the curve and the y axis, amplitude is the curve swing amplitude, offset is the position of the curve from the central axis, a x The width of the curve, x is the pixel abscissa;
and adjusting the target curve according to the color parameters of each target curve, and adjusting the background curve according to the color parameters of each background curve.
Further, the parameters include amplitude, phase, frequency and width.
Further, the curve height is changed by adjusting parameters before the step six.
The beneficial effects of the invention are as follows: the dynamic spiral pointer provided by the embodiment of the invention has more glaring and beautiful expression effect than the traditional pointer, and improves the automobile science and technology sense. Compared with the prior art, the area of the traditional pointer pattern is smaller, and the reminding degree is not high. And the spiral pattern adopts the numerical values such as how much of filling content represents the speed of a vehicle, and along with the increase of the numerical values, the pixel image area becomes larger, more striking, the prompting effect is enhanced, and the problem of pointer smear is solved, the display effect is good, and the acquired information is accurate.
The drawing is realized based on a CPU, a GPU and a flash module in the automobile instrument, wherein the GPU comprises a controller and a plurality of shader modules, and a spiral pointer dynamic function is stored in the flash module;
the drawing method comprises the following steps:
the CPU of the automobile instrument is used for receiving the drawing instruction, calling the spiral pointer dynamic function from the flash module according to the received drawing instruction, taking the size of the display interface as a parameter, sending the parameter to the spiral pointer dynamic function through the GPU, and regulating the position of the curve according to the spiral pointer dynamic function by the GPU.
The embodiment of the invention relates to a spiral pointer expression technology based on a function algorithm. The speed meter, the tachometer and the like are not in a pointer type, but are changed into more striking spiral shapes, the numerical value is represented by the height of the spiral, and the defects that the traditional full liquid crystal instrument pointer is single in expression form, insufficient in technological sense, too small in pointer, unobtrusive and the like are overcome.
1. Drawing two sine or cosine lines to make them closer together as shown in fig. 1 a;
2. increasing the width of each line as shown in fig. 1b and 1 c;
3. drawing spiral backgrounds, which are slightly far away from each other as shown in fig. 1d, and then increasing the width, wherein the process is shown in fig. 1e, 1f and 1 g;
4. mixing the background and the middle helix as shown in fig. 1 h; the final effect is shown in FIG. 1i
The principle is as follows:
drawing 4 forward selection or cosine curves with different amplitudes, phases, frequencies and widths, wherein the two curves are closer to each other and are used for simulating a spiral; the other two are far away and serve as background.
According to the invention, the spiral curve (pointer) is drawn in real time by the GPU through OpenGL, and the sizes of the drawn areas are different, so that the heights of the spiral curve (pointer) are different. The larger the CPU input value is, the larger the drawing area is, the higher the spiral curve (pointer) is, otherwise, the lower the spiral curve (pointer) is, and the speed of the vehicle is represented by the speed of the vehicle and the rotation speed of the vehicle.
Not limited to the "needle" style, but has an effect of winding and waving a red flag or a color ribbon, and has a start point and an end point, has directionality as if the spiral is always rotating.
Single curve algorithm:
the effect is that the method is formed by fitting 4 curves, and each curve has similar algorithm, so that the algorithm is explained by taking one curve as an example.
The color parameters of each standard curve and the color parameters of each background curve are obtained through calculation according to the following formula:
y=(sin(angle)×amplitude+offset)×Color(x)×a x ;
angle=speed×frequency+d;
wherein speed is the curve twisting speed, frequency is the frequency of occurrence of the peak value of the curve twisting speed, d is the distance between the point on the curve and the y axis, amplitude is the curve swing amplitude, offset is the position of the curve from the central axis, a x The width of the curve, x is the pixel abscissa;
and adjusting the target curve according to the color parameters of each target curve, and adjusting the background curve according to the color parameters of each background curve.
The bending condition can be changed according to the dial plate:
the amplitude is the curve wobble amplitude and offset is the curve distance from the central axis. When the dial is curved, the center line of the spiral pattern is also curved by the adjustment of offset, thereby producing a better visual effect.
y=sin(angle)×amplitude+offset;
Has special color:
next we change the color of the curve by y1=y×color (x) as a color function.
Different width of attenuation algorithm:
the curve as shown in the figure appears through calculation of the formula.
It then needs to be widened. As shown in fig. 1j, if the width is merely changed in a normal manner, the effect is as shown in fig. 1k, and it can be seen that the red and black critical portions are abrupt and lack transitions.
How the algorithm causes a transition in its width is described as shown in fig. 1 l.
The final algorithm can be expressed as: y= (sin (angle) ×amplitude+offset) ×color (x) ×a x As shown in fig. 1 m.
It should be noted that the detailed description is merely for explaining and describing the technical solution of the present invention, and the scope of protection of the claims should not be limited thereto. All changes which come within the meaning and range of equivalency of the claims and the specification are to be embraced within their scope.
According to the technical scheme of the embodiment, a spiral pointer drawing instruction is received; calling a spiral pointer dynamic function according to the spiral pointer drawing instruction; acquiring display interface parameters; and adjusting the two item standard curves and the two background curves according to the display interface parameters and the spiral pointer dynamic function so as to realize that the defects that the pointer is small and unobtrusive and the like due to single expression form and insufficient technological sense of the traditional full liquid crystal instrument are overcome.
Example two
Fig. 2 is a schematic structural diagram of a spiral pointer drawing device according to a second embodiment of the present invention. The embodiment may be applied to the case of spiral pointer drawing, and the apparatus may be implemented in software and/or hardware, and the apparatus may be integrated in any device that provides a spiral pointer drawing function, as shown in fig. 2, where the spiral pointer drawing apparatus specifically includes: the system comprises a receiving module 210, a calling module 220, an obtaining module 230 and an adjusting module 240.
The receiving module is used for receiving the spiral pointer drawing instruction;
the calling module is used for calling a spiral pointer dynamic function according to the spiral pointer drawing instruction;
the acquisition module is used for acquiring display interface parameters;
and the adjusting module is used for adjusting the two item standard curves and the two background curves according to the display interface parameters and the spiral pointer dynamic function.
Optionally, the method further comprises:
the drawing module is used for drawing two background curves and two standard curves before receiving the spiral pointer drawing instruction;
the first color changing module is used for lightening the colors of the two background curves;
the second color changing module is used for darkening the colors of the two label curves;
and the distance changing module is used for increasing the distance between the two background curves and decreasing the distance between the two item standard curves.
Optionally, the drawing module is specifically configured to:
obtaining a vehicle speed and/or a rotating speed, wherein the vehicle speed is in direct proportion to a drawing area of a curve, and the rotating speed is in direct proportion to the drawing area of the curve;
determining a drawing area of a curve according to the vehicle speed and/or the rotating speed;
and drawing two background curves and two target curves according to the drawing area.
The product can execute the method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
According to the technical scheme of the embodiment, a spiral pointer drawing instruction is received; calling a spiral pointer dynamic function according to the spiral pointer drawing instruction; acquiring display interface parameters; and adjusting the two item standard curves and the two background curves according to the display interface parameters and the spiral pointer dynamic function so as to realize that the defects that the pointer is small and unobtrusive and the like due to single expression form and insufficient technological sense of the traditional full liquid crystal instrument are overcome.
Example III
Fig. 3 is a schematic structural diagram of a computer device according to a third embodiment of the present invention. FIG. 3 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in fig. 3 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in FIG. 3, computer device 12 is in the form of a general purpose computing device. Components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include industry standard architecture (Industry Standard Architecture, ISA) bus, micro channel architecture (Micro Channel Architecture, MCA) bus, enhanced ISA bus, video electronics standards association (Video Electronics Standards Association, VESA) local bus, and peripheral component interconnect (Peripheral Component Interconnect, PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory, RAM) 30 and/or cache memory 32. The computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, commonly referred to as a "hard disk drive"). Although not shown in fig. 3, a disk drive for reading from and writing to a removable nonvolatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable nonvolatile optical disk (Compact Disc-Read Only Memory, CD-ROM), digital versatile disk (Digital Video Disc-Read Only Memory, DVD-ROM), or other optical media, may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. In addition, in the computer device 12 of the present embodiment, the display 24 is not present as a separate body but is embedded in the mirror surface, and the display surface of the display 24 and the mirror surface are visually integrated when the display surface of the display 24 is not displayed. Moreover, the computer device 12 may also communicate with one or more networks such as a local area network (Local Area Network, LAN), a wide area network Wide Area Network, a WAN) and/or a public network such as the internet via the network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with computer device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk array (Redundant Arrays of Independent Disks, RAID) systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running a program stored in the system memory 28, for example, implementing a spiral pointer drawing method provided by an embodiment of the present invention:
receiving a spiral pointer drawing instruction;
calling a spiral pointer dynamic function according to the spiral pointer drawing instruction;
acquiring display interface parameters;
and adjusting the two item standard curves and the two background curves according to the display interface parameters and the spiral pointer dynamic function.
Example IV
A fourth embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a spiral pointer drawing method as provided in all the embodiments of the present invention:
receiving a spiral pointer drawing instruction;
calling a spiral pointer dynamic function according to the spiral pointer drawing instruction;
acquiring display interface parameters;
and adjusting the two item standard curves and the two background curves according to the display interface parameters and the spiral pointer dynamic function.
Any combination of one or more computer readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a source text input by a user, and translating the source text into a target text corresponding to a target language; acquiring the historical correction behavior of the user; correcting the target text according to the history correction behavior to obtain a translation result, and pushing the translation result to a client where the user is located.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.
Claims (8)
1. A spiral pointer drawing method, characterized by comprising:
receiving a spiral pointer drawing instruction;
calling a spiral pointer dynamic function according to the spiral pointer drawing instruction;
acquiring display interface parameters;
and adjusting the two item standard curves and the two background curves according to the display interface parameters and the spiral pointer dynamic function, wherein the method comprises the following steps: determining initial positions of the two target curves and initial positions of the two background curves according to the display interface parameters;
adjusting the two target curves according to the initial positions and the color parameters of the two target curves, the initial positions and the color parameters of the two background curves and the spiral pointer dynamic function;
the images formed by the two target curves and the two background curves are used as spiral pointers, and the spiral pointers are curves which have a starting point and an ending point and rotate all the time;
the color parameter of each standard curve and the color parameter of each background curve are obtained through calculation according to the following formula:
y=(sin(angle)×amplitude+offset)×Color(x)×a x ;
angle=speed×frequency+d;
wherein speed is the curve twisting speed, frequency is the frequency of occurrence of the peak value of the curve twisting speed, d is the distance between the point on the curve and the y axis, amplitude is the curve swing amplitude, offset is the position of the curve from the central axis, a x Is the width of the curve, x is the pixel abscissa.
2. The method of claim 1, further comprising, prior to receiving the spiral pointer drawing instruction:
drawing two background curves and two standard curves;
lightening the colors of the two background curves;
darkening the colors of the two standard curves;
and the distance between the two background curves is increased, and the distance between the two standard curves is reduced.
3. The method of claim 2, wherein drawing two background curves and two target curves comprises:
obtaining a vehicle speed and/or a rotating speed, wherein the vehicle speed is in direct proportion to a drawing area of a curve, and the rotating speed is in direct proportion to the drawing area of the curve;
determining a drawing area of a curve according to the vehicle speed and/or the rotating speed;
and drawing two background curves and two target curves according to the drawing area.
4. A spiral pointer drawing apparatus characterized by comprising:
the receiving module is used for receiving the spiral pointer drawing instruction;
the calling module is used for calling a spiral pointer dynamic function according to the spiral pointer drawing instruction;
the acquisition module is used for acquiring display interface parameters;
the adjusting module is used for adjusting the two item standard curves and the two background curves according to the display interface parameters and the spiral pointer dynamic function;
the adjusting module is specifically configured to determine initial positions of the two target curves and initial positions of the two background curves according to the display interface parameters;
adjusting the two target curves according to the initial positions and the color parameters of the two target curves, the initial positions and the color parameters of the two background curves and the spiral pointer dynamic function;
the images formed by the two target curves and the two background curves are used as spiral pointers, and the spiral pointers are curves which have a starting point and an ending point and rotate all the time;
the color parameter of each standard curve and the color parameter of each background curve are obtained through calculation according to the following formula:
y=(sin(angle)×amplitude+offset)×Color(x)×a x ;
angle=speed×frequency+d;
wherein speed is the curve twisting speed, frequency is the frequency of occurrence of the peak value of the curve twisting speed, d is the distance between the point on the curve and the y axis, amplitude is the curve swing amplitude, offset is the position of the curve from the central axis, a x Is the width of the curve, x is the pixel abscissa.
5. The apparatus as recited in claim 4, further comprising:
the drawing module is used for drawing two background curves and two standard curves before receiving the spiral pointer drawing instruction;
the first color changing module is used for lightening the colors of the two background curves;
the second color changing module is used for darkening the colors of the two label curves;
and the distance changing module is used for increasing the distance between the two background curves and decreasing the distance between the two item standard curves.
6. The apparatus of claim 5, wherein the rendering module is specifically configured to:
obtaining a vehicle speed and/or a rotating speed, wherein the vehicle speed is in direct proportion to a drawing area of a curve, and the rotating speed is in direct proportion to the drawing area of the curve;
determining a drawing area of a curve according to the vehicle speed and/or the rotating speed;
and drawing two background curves and two target curves according to the drawing area.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-3 when the program is executed by the processor.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011457979.7A CN112395025B (en) | 2020-12-10 | 2020-12-10 | Spiral pointer drawing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011457979.7A CN112395025B (en) | 2020-12-10 | 2020-12-10 | Spiral pointer drawing method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112395025A CN112395025A (en) | 2021-02-23 |
CN112395025B true CN112395025B (en) | 2024-04-09 |
Family
ID=74625426
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011457979.7A Active CN112395025B (en) | 2020-12-10 | 2020-12-10 | Spiral pointer drawing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112395025B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10109905A1 (en) * | 2001-02-20 | 2002-08-22 | Marius Tegethoff | Display instrument represents first value by pointer position relative to scale and further value of same parameter or another parameter by curvature of pointer |
EP1761409A1 (en) * | 2004-06-07 | 2007-03-14 | Sharp Kabushiki Kaisha | Display device, vehicle, method for displaying, program for displaying and recording medium of same |
KR20110094692A (en) * | 2010-02-17 | 2011-08-24 | 삼성전자주식회사 | Apparatus and method for providing user interface |
CN107945253A (en) * | 2017-11-21 | 2018-04-20 | 腾讯数码(天津)有限公司 | A kind of animation effect implementation method, device and storage device |
EP3316223A1 (en) * | 2016-10-31 | 2018-05-02 | Bitplane AG | Visualization system and method for 3d scenes |
CN109130855A (en) * | 2018-08-03 | 2019-01-04 | 浙江中科领航汽车电子有限公司 | A kind of householder method, system and the device of liquid crystal instrument display elements fade effect |
JP2019027806A (en) * | 2017-07-25 | 2019-02-21 | 株式会社デンソー | Display control device |
CN109410292A (en) * | 2018-09-30 | 2019-03-01 | 深圳市创维软件有限公司 | Realize method, apparatus, equipment and the storage medium of the dynamic effect of water ripples |
CN109849668A (en) * | 2019-02-20 | 2019-06-07 | 上海伟世通汽车电子***有限公司 | A kind of speed display methods of liquid crystal instrument for automobile |
CN109934897A (en) * | 2019-03-06 | 2019-06-25 | 珠海金山网络游戏科技有限公司 | A kind of swing effect simulation system, calculates equipment and storage medium at method |
CN110908560A (en) * | 2019-11-25 | 2020-03-24 | 航天科技控股集团股份有限公司 | GPU-based virtual pointer style drawing method for all-liquid crystal instrument |
CN111105477A (en) * | 2019-11-25 | 2020-05-05 | 航天科技控股集团股份有限公司 | Method for drawing 2D virtual pointer of full liquid crystal instrument |
CN111985468A (en) * | 2020-08-27 | 2020-11-24 | 江苏提米智能科技有限公司 | Code table pointer value detection method and device, electronic equipment and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8730241B2 (en) * | 2008-09-08 | 2014-05-20 | Fair Isaac Corporation | Techniques for drawing curved edges in graphs |
TWI428566B (en) * | 2010-10-12 | 2014-03-01 | Inventec Corp | Progress indicating system and method thereof |
US20170344217A1 (en) * | 2016-05-31 | 2017-11-30 | International Business Machines Corporation | Pointer-based gui for mobile devices |
-
2020
- 2020-12-10 CN CN202011457979.7A patent/CN112395025B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10109905A1 (en) * | 2001-02-20 | 2002-08-22 | Marius Tegethoff | Display instrument represents first value by pointer position relative to scale and further value of same parameter or another parameter by curvature of pointer |
EP1761409A1 (en) * | 2004-06-07 | 2007-03-14 | Sharp Kabushiki Kaisha | Display device, vehicle, method for displaying, program for displaying and recording medium of same |
KR20110094692A (en) * | 2010-02-17 | 2011-08-24 | 삼성전자주식회사 | Apparatus and method for providing user interface |
EP3316223A1 (en) * | 2016-10-31 | 2018-05-02 | Bitplane AG | Visualization system and method for 3d scenes |
JP2019027806A (en) * | 2017-07-25 | 2019-02-21 | 株式会社デンソー | Display control device |
CN107945253A (en) * | 2017-11-21 | 2018-04-20 | 腾讯数码(天津)有限公司 | A kind of animation effect implementation method, device and storage device |
CN109130855A (en) * | 2018-08-03 | 2019-01-04 | 浙江中科领航汽车电子有限公司 | A kind of householder method, system and the device of liquid crystal instrument display elements fade effect |
CN109410292A (en) * | 2018-09-30 | 2019-03-01 | 深圳市创维软件有限公司 | Realize method, apparatus, equipment and the storage medium of the dynamic effect of water ripples |
CN109849668A (en) * | 2019-02-20 | 2019-06-07 | 上海伟世通汽车电子***有限公司 | A kind of speed display methods of liquid crystal instrument for automobile |
CN109934897A (en) * | 2019-03-06 | 2019-06-25 | 珠海金山网络游戏科技有限公司 | A kind of swing effect simulation system, calculates equipment and storage medium at method |
CN110908560A (en) * | 2019-11-25 | 2020-03-24 | 航天科技控股集团股份有限公司 | GPU-based virtual pointer style drawing method for all-liquid crystal instrument |
CN111105477A (en) * | 2019-11-25 | 2020-05-05 | 航天科技控股集团股份有限公司 | Method for drawing 2D virtual pointer of full liquid crystal instrument |
CN111985468A (en) * | 2020-08-27 | 2020-11-24 | 江苏提米智能科技有限公司 | Code table pointer value detection method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112395025A (en) | 2021-02-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4162934B2 (en) | Computer-readable medium and computer system for representing and displaying digital ink | |
TWI622957B (en) | Method and virtual reality device for improving image quality | |
TWI619092B (en) | Method and device for improving image quality by using multi-resolution | |
US6232987B1 (en) | Progressively renderable outline font and methods of generating, transmitting and rendering the same | |
CN108022285B (en) | Map rendering method and device | |
US20220277481A1 (en) | Panoramic video processing method and apparatus, and storage medium | |
US20150332481A1 (en) | Indexed uniform styles for stroke rendering | |
CN108280864B (en) | Method for optimizing dynamic display process of handwritten electronic signature | |
EP3186786B1 (en) | System and method for remote shadow rendering in a 3d virtual environment | |
CN115359226A (en) | Texture compression-based VR display method for Hongmong system, electronic device and medium | |
CN112395025B (en) | Spiral pointer drawing method, device, equipment and storage medium | |
US20200364926A1 (en) | Methods and apparatus for adaptive object space shading | |
US20190072407A1 (en) | Interactive Geo-Contextual Navigation Tool | |
CN110539639A (en) | Instrument-based gradual change circular ring display method, medium, instrument and device | |
CN111598813B (en) | Face image processing method and device, electronic equipment and computer readable medium | |
CN107452046B (en) | Texture processing method, device and equipment of three-dimensional city model and readable medium | |
CN114040129B (en) | Video generation method, device, equipment and storage medium | |
CN115988255A (en) | Special effect generation method and device, electronic equipment and storage medium | |
US20210110611A1 (en) | Methods and apparatus for multiple lens distortion correction | |
CN114332224A (en) | Method, device and equipment for generating 3D target detection sample and storage medium | |
CN116109744A (en) | Fluff rendering method, device, equipment and medium | |
Tate et al. | Contouring for power systems using graphical processing units | |
US7598954B2 (en) | Adapting and rendering graphic effects | |
US20220292731A1 (en) | Method and apparatus for text effect processing | |
US11875452B2 (en) | Billboard layers in object-space rendering |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |