CN113610943B - Icon rounded angle processing method and device - Google Patents

Icon rounded angle processing method and device Download PDF

Info

Publication number
CN113610943B
CN113610943B CN202110773976.2A CN202110773976A CN113610943B CN 113610943 B CN113610943 B CN 113610943B CN 202110773976 A CN202110773976 A CN 202110773976A CN 113610943 B CN113610943 B CN 113610943B
Authority
CN
China
Prior art keywords
icon
vertex
curve
rounding
coordinate value
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
Application number
CN202110773976.2A
Other languages
Chinese (zh)
Other versions
CN113610943A (en
Inventor
孙黎
杜鸿雁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110773976.2A priority Critical patent/CN113610943B/en
Priority to CN202211004546.5A priority patent/CN115619894A/en
Publication of CN113610943A publication Critical patent/CN113610943A/en
Application granted granted Critical
Publication of CN113610943B publication Critical patent/CN113610943B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Abstract

The application provides a processing method and device for icon rounding, which can acquire a rounding curve stored in advance from a storage unit, and display the icon after rounding processing according to the rounding curve, thereby reducing the number of the rounding curves needing to be drawn in real time when the rounding processing is performed on the icon, further achieving the purposes of reducing the calculation amount when the page is drawn, improving the efficiency of the page drawing, and finally improving the viewing experience of a user.

Description

Icon rounded angle processing method and device
Technical Field
The application relates to the technical field of terminals, in particular to a processing method and device for icon rounded angles.
Background
With the continuous development of electronic technology and terminal technology, the content displayed to users by electronic equipment such as mobile phones and tablet computers is more and more, when the electronic equipment is used for displaying icons, four vertexes of rectangular icons can be rounded, the straight right-angle turning vertexes are cut into smooth rounded corners, and then the rounded icons are displayed, so that the purpose of improving the display effect is achieved.
In the prior art, the electronic device may cut the vertex of the icon by using a G2 curve L2, so as to perform round-cornered processing on the vertex of the icon, wherein the G2 curve may be obtained by calculating a multi-segment bezier curve. Before the electronic device displays the icon on the display page, two Bezier curves are drawn for each vertex of the icon to obtain a G2 curve corresponding to the vertex, and the drawn G2 curves are used for performing round angle processing on four vertices of the icon, namely the upper left corner, the lower left corner, the upper right corner and the lower right corner.
By adopting the prior art, when the number of icons needing to be displayed on the display page of the electronic device is large, the number of G2 curves for performing round-angle processing on the icons can be increased, the calculation amount of the electronic device in page drawing is greatly increased, the page drawing efficiency is reduced, and then the electronic device has visual effects such as page blockage and the like, and the watching experience of a user of the electronic device is influenced.
Disclosure of Invention
The application provides a processing method and device for icon rounding to reduce the number of rounding curves needing to be drawn when electronic equipment performs rounding processing on icons, so that the purposes of reducing the calculation amount of the electronic equipment when the electronic equipment draws a page and improving the efficiency of drawing the page are achieved, and finally the viewing experience of a user of the electronic equipment is improved.
The application provides a processing method for icon rounding in a first aspect, which comprises the following steps: detecting touch operation on the first icon; wherein the first icon corresponds to a first application; determining an icon drawing parameter of a first application program according to touch operation; acquiring a filleting curve corresponding to the icon drawing parameter from a storage unit; the storage unit stores a plurality of icon drawing parameters and at least one filleting curve corresponding to each icon drawing parameter; drawing a second icon according to the icon drawing parameter; the second icon corresponds to the first application program, and the first icon and the second icon are different in size; performing round angle processing on the second icon through a round angle curve; and displaying the second icon after the rounding treatment.
In an embodiment of the first aspect of the present application, the storage unit specifically stores a plurality of drawing parameters, and rounded curves of the icon corresponding to each drawing parameter at four vertices.
In an embodiment of the first aspect of the present application, the storage unit specifically stores a plurality of drawing parameters, and a rounding curve of an icon corresponding to each drawing parameter at the first vertex.
In an embodiment of the first aspect of the present application, the rounding the second icon by the rounding curve includes: performing filleting treatment on the first vertex of the second icon through the filleting curve of the first vertex; according to the icon drawing parameters, carrying out coordinate change on the filleting curves to obtain filleting curves of the second icon at a second vertex, a third vertex and a fourth vertex; and respectively carrying out rounding treatment on the second vertex, the third vertex and the fourth vertex of the second icon through the rounding curves of the second vertex, the third vertex and the fourth vertex.
In an embodiment of the first aspect of the present application, the icon drawing parameters include: pixel resolution of the second icon in the long side and wide side directions; the method comprises the steps of establishing a coordinate system by taking pixel resolution as a unit in the directions of a long edge and a wide edge of a display page, and drawing an initial coordinate value of a rounding curve stored in a storage unit by taking an origin of the coordinate system as a reference.
In an embodiment of the first aspect of the present application, before performing a round-robin process on a first vertex of a second icon through a round-robin curve of the first vertex, the method further includes: determining a first coordinate value of a first vertex of the second icon in the coordinate system; and adding the initial coordinate value of the radiusing curve of the first vertex in the coordinate system and the first coordinate value to obtain the radiusing curve of the first vertex of the second icon.
In an embodiment of the first aspect of the present application, the performing coordinate change on the rounded curve according to the icon drawing parameter includes: keeping the initial coordinate value of the filleting curve of the first vertex of the second icon in the coordinate system unchanged in the width direction, turning the initial coordinate value in the long edge direction, and adding the initial coordinate value to the pixel resolution of the second icon in the long edge direction to obtain the filleting curve of the second icon in the second vertex; keeping the initial coordinate value of the radiusing curve of the first vertex of the second icon in the coordinate system unchanged in the long-edge direction, turning over the radiusing curve in the wide-edge direction, and adding the initial coordinate value of the radiusing curve of the first vertex of the second icon with the pixel resolution of the second icon in the wide-edge direction to obtain a radiusing curve of the second icon at a third vertex; and turning the initial coordinate value of the rounding curve of the first vertex of the second icon in the coordinate system in the long edge direction, adding the initial coordinate value of the rounding curve of the first vertex of the second icon with the pixel resolution of the second icon in the long edge direction to obtain the rounding curve of the second vertex, turning the rounding curve of the second vertex in the wide edge direction, adding the rounding curve of the second icon with the pixel resolution of the second icon in the wide edge direction to obtain the rounding curve of the second icon in the fourth vertex.
In an embodiment of the first aspect of the present application, determining an icon drawing parameter of a first application according to a touch operation includes: and according to the touch operation, determining that the used icon drawing parameters are updated every time when the icon of the first application program is updated and refreshed according to the preset frequency within the preset time period.
In an embodiment of the first aspect of the present application, the obtaining a rounding curve corresponding to an icon drawing parameter from a storage unit includes: and in a preset time period, according to a preset frequency, respectively obtaining the rounding curves corresponding to the icon drawing parameters used when the icon of the first application program is updated.
In an embodiment of the first aspect of the present application, the obtaining a rounding curve corresponding to an icon drawing parameter from a storage unit includes: and acquiring a filleting curve corresponding to each icon drawing parameter when the icon of the first application program is updated according to a preset frequency in a preset time period from the storage unit.
In an embodiment of the first aspect of the present application, the drawing a second icon on a second display page according to the icon drawing parameter includes; and in a preset time period, according to a preset frequency, drawing the icon of the first application program according to the icon drawing parameter, and sequentially taking the drawn icon as a second icon.
A second aspect of the present application provides an icon rounding processing apparatus, which is used to execute the icon rounding processing method according to the first aspect of the present application, and the apparatus includes: the detection module is used for detecting touch operation on the first icon; wherein the first icon corresponds to a first application; the determining module is used for determining icon drawing parameters of the first application program according to the touch operation; the obtaining module is used for obtaining the filleting curves corresponding to the icon drawing parameters from the storage unit; the storage unit stores a plurality of icon drawing parameters and at least one filleting curve corresponding to each icon drawing parameter; the drawing module is used for drawing the second icon according to the icon drawing parameter; the second icon corresponds to the first application program, and the first icon and the second icon are different in size; the processing module is used for carrying out round angle processing on the second icon through the round angle curve; and the display module is used for displaying the second icon after the rounding processing.
In an embodiment of the second aspect of the present application, the storage unit specifically stores a plurality of drawing parameters, and rounded curves of the icon corresponding to each drawing parameter at four vertices.
In an embodiment of the second aspect of the present application, the storage unit specifically stores a plurality of drawing parameters, and a rounded curve of an icon corresponding to each drawing parameter at the first vertex.
In an embodiment of the second aspect of the present application, the processing module is specifically configured to perform a round-cornered processing on the first vertex of the second icon through a round-cornered curve of the first vertex; according to the icon drawing parameters, carrying out coordinate change on the filleting curves to obtain the filleting curves of the second icon at a second vertex, a third vertex and a fourth vertex; and respectively carrying out rounding treatment on the second vertex, the third vertex and the fourth vertex of the second icon through the rounding curves of the second vertex, the third vertex and the fourth vertex.
In an embodiment of the second aspect of the present application, the icon drawing parameters include: pixel resolution of the second icon in the long side and wide side directions; the method comprises the steps of establishing a coordinate system by taking pixel resolution as a unit in the directions of a long edge and a wide edge of a display page, and drawing an initial coordinate value of a rounding curve stored in a storage unit by taking an origin of the coordinate system as a reference.
In an embodiment of the second aspect of the present application, the processing module is further configured to determine a first coordinate value of the first vertex of the second icon in the coordinate system; and adding the initial coordinate value of the rounding curve of the first vertex in the coordinate system and the first coordinate value to obtain the rounding curve of the first vertex of the second icon.
In an embodiment of the second aspect of the present application, the processing module is specifically configured to keep an initial coordinate value of a rounding curve of a first vertex of the second icon in a coordinate system unchanged in a width direction, turn over the second icon in a long-side direction, and add the turning value and a pixel resolution of the second icon in the long-side direction to obtain a rounding curve of the second icon at the second vertex; keeping the initial coordinate value of the filleting curve of the first vertex of the second icon in the coordinate system unchanged in the long edge direction, turning in the broadside direction, and adding the initial coordinate value with the pixel resolution of the second icon in the broadside direction to obtain a filleting curve of the second icon at the third vertex; and turning the initial coordinate value of the rounding curve of the first vertex of the second icon in the coordinate system in the long edge direction, adding the initial coordinate value of the rounding curve of the first vertex of the second icon with the pixel resolution of the second icon in the long edge direction to obtain the rounding curve of the second vertex, turning the rounding curve of the second vertex in the wide edge direction, adding the rounding curve of the second icon with the pixel resolution of the second icon in the wide edge direction to obtain the rounding curve of the second icon in the fourth vertex.
In an embodiment of the second aspect of the present application, the determining module is specifically configured to determine, according to the touch operation, that the icon drawing parameter used is updated each time when the icon of the first application is updated and refreshed according to the preset frequency within the preset time period.
In an embodiment of the second aspect of the present application, the obtaining module is specifically configured to, in a preset time period and according to a preset frequency, obtain, from the storage unit, a rounding curve corresponding to an icon drawing parameter used when the icon of the first application is updated this time.
In an embodiment of the second aspect of the present application, in a preset time period, when the icon of the first application is updated according to a preset frequency, a rounding curve corresponding to each icon drawing parameter is obtained from the storage unit.
In an embodiment of the second aspect of the present application, the drawing module is specifically configured to draw an icon of the first application program according to the icon drawing parameter in a preset time period and according to a preset frequency, and sequentially use the drawn icon as the second icon.
A third aspect of the present application provides a terminal device, comprising: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes the icon chamfering processing method according to any one of the first aspect of the present application.
A fourth aspect of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the icon rounded corner processing method according to any one of the first aspect of the present application is implemented.
A fifth aspect of the present application provides a computer program product comprising a computer program which, when executed by a processor, implements a method of icon rounding as in any one of the first aspects of the present application.
In summary, the processing method and device for icon rounding provided by the application can acquire the rounding curve stored in advance from the storage unit, and display the icon after rounding according to the rounding curve, thereby reducing the number of rounding curves which need to be drawn in real time when rounding the icon, further achieving the purposes of reducing the amount of calculation when drawing the page, improving the efficiency of drawing the page, and finally improving the viewing experience of the user.
Drawings
Fig. 1 shows a schematic structural diagram of an electronic device 100;
FIG. 2 is a schematic diagram of a scenario in which the present application is applied;
FIG. 3 is a schematic diagram illustrating a process flow of icon rounding when an electronic device draws an icon;
fig. 4 is a schematic flowchart of a processing method for icon rounded corner according to the present application;
fig. 5 is a schematic diagram illustrating a state in which a processing unit of the electronic device performs a rounding process on an icon vertex;
fig. 6 is a schematic flowchart of another icon rounding processing method provided in the present application;
FIG. 7 is a schematic diagram of a G2 curve stored in a memory cell provided herein;
FIG. 8 is a schematic diagram illustrating an embodiment of a display state of an electronic device;
FIG. 9 is a schematic diagram of a display process of an electronic device;
FIG. 10 is a schematic diagram illustrating a change in a display state of an electronic device according to another embodiment of the disclosure;
FIG. 11 is a schematic diagram illustrating a variation of another embodiment of a display state of an electronic device according to the present application;
fig. 12 is a schematic flowchart illustrating an embodiment of a icon rounding processing method according to the present application;
fig. 13 is a schematic flowchart illustrating an embodiment of a icon rounding processing method according to the present application;
fig. 14 is a flowchart illustrating an embodiment of a processing method for icon rounded corner according to the present application;
fig. 15 is a flowchart illustrating an embodiment of a icon rounding processing method according to the present application.
Detailed Description
Fig. 1 shows a schematic structural diagram of an electronic device 100.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bidirectional synchronous serial bus including a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus, enabling communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through the I2S interface, so as to implement a function of receiving a call through a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit the audio signal to the wireless communication module 160 through the PCM interface, so as to implement the function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the method can also be used for connecting a headset and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative, and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in the external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a hands-free call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or sending voice information, the user can input a voice signal to the microphone 170C by uttering a voice signal close to the microphone 170C through the mouth of the user. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and perform directional recording.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association) standard interface of the USA.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. Pressure sensor 180A
Such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, the electronic device 100 may utilize the distance sensor 180F to range to achieve fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from a nearby object using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G can also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided via the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be attached to and detached from the electronic device 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
Fig. 2 is a schematic view of a scene to which the present application is applied, where the electronic device shown in fig. 1 may be applied in the scene shown in fig. 2, and the electronic device may be any device having a display screen and capable of displaying icons, such as a mobile phone, a tablet computer, a smart appliance, and the like.
In the example shown in fig. 2, the page displayed by the electronic device through its display screen is a system main page, and the page includes a plurality of icons, each icon may correspond to an application program, for example, the page includes: the icons of the application programs such as the camera, the address list, the telephone, the information and the like can be executed by the electronic equipment after the electronic equipment detects the clicking operation on a certain icon control area on the page.
More specifically, a processing unit disposed in the electronic device may be used to render a page displayed by the electronic device. The processing unit may be a processor such as a CPU in the electronic device, and the processing unit may specifically implement the drawing of the page through an application program running in the processing unit. In a specific implementation, the processing unit may send the drawn page to a display unit of the electronic device after completing the drawing of the page, and the display unit displays the page on a display screen.
In some embodiments, when the electronic device displays an icon on a page, the four vertexes of the rectangular icon are rounded first, the stiff right-angle turning vertexes are cut into smooth rounded corners, and then the rounded icon is displayed, so that the purpose of improving the display effect is achieved.
Illustratively, assume that, in the processing unit of the electronic device shown in fig. 2, an application for drawing a page determines that a system home page, in which a plurality of icons each having a rectangular shape are included, needs to be displayed at time T0. Subsequently, the application program in the processing unit needs to perform round-cornered processing on the vertex of each icon, and then displays the processed page, wherein at this time, four vertices of all the icons of the application program on the page are round corners. Taking an icon of a "browser" application on a page as an example, four edges of the icon are denoted as a, B, C and D, four vertexes are denoted as a, B, C and D, and each vertex is processed by a rectangular right angle into a smooth rounded corner.
In some embodiments, when the processing unit performs the rounding processing on the vertex of the icon, the processing unit may perform tangential clipping processing on the corners of the icon by using a perfect circular curve as a standard, so as to obtain a rounded corner at each corner. For example, taking the lower left corner D of the icon of the "browser" application in fig. 2 as an example, when the processing unit draws a page, the processing unit may use the upper left corner O of the display page as an origin (x 0, y 0) and establish a coordinate system according to the pixel resolution of the display page, and when the icon of the "browser" is drawn, according to the coordinates (x 1, y 2) of the lower left corner D, use the circular curve L1 with the center of circle being the point P to be tangent to the left side D and the lower side c of the icon on both sides of the lower left corner D, at this time, the circular curve L1 may form an arc-shaped connection line between the left side D and the lower side c, and replace the original connection line between the left side D and the lower side c through the point D to implement the rounding processing of the vertex D.
However, in the above embodiment, when the vertex of the icon is clipped by using the circular curve L1, since the variation trend difference between the circular curve L1 and the straight line side of the icon is large, the point where the circular curve L1 is tangent to the straight line side has an inflection point, so that when the icon is clipped by using the circular curve L1, the obtained round angle is not smooth enough, and the display effect of the icon is affected.
In other embodiments, as shown in fig. 2, the processing unit in the electronic device may further cut the vertex of the icon by using a G2 curve L2, so as to implement rounding processing on the vertex of the icon. For example, also taking the lower left corner D of the icon as an example, when the processing unit draws the page, the processing unit may draw the G2 curve L2 according to the coordinates (x 1, y 2) of the lower left corner D, and may simultaneously make contact with the left side D and the lower side c of the icon on both sides of the lower left corner D through the G2 curve L2, at this time, the G2 curve L2 may form an arc-shaped connecting line between the left side D and the lower side c, and the connecting line replaces the original connecting line between the left side D and the lower side c through the D point, so as to implement the rounding processing on the vertex D, and it can be understood that, in the same manner, other vertices of the icon may sequentially undergo rounding processing on the G2 curve.
More specifically, in an implementation manner of one implementation, the processing unit may obtain the G2 curve through a multi-segment bezier curve calculation, where, taking the 2-segment bezier curve as an example, the G2 curve (Bx (t), by (t)) may be obtained through the 2-segment bezier curve calculation through the following first and second formulas: b is x (t)=(1-t) 3 *c 1 +3t*(1-t) 2 *c 2 +3t 2 *(1-t)*c 3 +t 3 *c 4 Formula one y (t)=(1-t) 3 *v 1 +3t*(1-t) 2 *v 2 +3t 2 *(1-t)*v 3 +t 3 *v 4 Formula two
Wherein the parameter c and the parameter v are adjustable parameters required for calculating the Bezier curve, and t is more than 0 and less than or equal to 1. Exemplarily, when the bezier curve is a rounded curve connecting 3 points, and the parameter c and the parameter v are 3 control points for drawing the bezier curve, when the bezier drawing function path. Cubicto is called, (c 2, v 2) may be taken as a control point, (c 3, v 3) may be taken as a control point, (c 4, v 4) may be taken as an end point, and is introduced as an input parameter into the path. Cubicto (c 2, v2, c3, v3, c4, v 4).
At this time, when drawing the icon, the processing unit needs to perform the process of rounding at least four vertices of the icon by the following steps shown in fig. 3, where fig. 3 is a schematic flow chart of the process of rounding the icon when the electronic device draws the icon:
s1, drawing two Bezier curves, and performing rounding processing on a point A of the upper left corner (left top corner) of the icon.
The following program codes can be specifically used for realizing the following steps:
//left top corner
……
path.cubicTo(c2,v2,c3,v3,c4,v4);
path.cubicTo(v3,c3,v2,c2,v1,c1);
and S2, drawing two Bezier curves, and performing round angle processing on a point B at the upper right corner (right top corner) of the icon.
The following program codes can be specifically used for realizing the following steps:
//right top corner
……
path.cubicTo(width-v2,c2,width-v3,c3,width-v4,c4);
path.cubicTo(width-c3,v3,width-c2,v2,width-c1,v1);
and S3, drawing two Bezier curves, and performing corner rounding processing on a right bottom corner (C point) of the icon.
The following program codes can be specifically used for realizing the following steps:
//right bottom corner
……
path.cubicTo(width-c2,height-v2,width-c3,height-v3,width-c4,height-v4);
path.cubicTo(width-v3,height-c3,width-v2,height-c2,width-v1,height-c1);
and S4, drawing two Bezier curves, and performing rounding processing on a D point at the lower left corner (left corner) of the icon.
The following program codes can be specifically used for realizing the following steps:
//left bottom corner
……
path.cubicTo(v2,height-c2,v3,height-c3,v4,height-c4);
path.cubicTo(c3,height-v3,c2,height-v2,c1,height-v1);
finally, through the four steps S1 to S4, the processing unit may complete the rounding processing for the four vertices of one icon. It can be understood that, in the electronic device shown in fig. 1, after the processing unit determines the icons in the system home page to be displayed at T0, the processing unit may process all the icons on the system home page in the same manner through the above four steps, and finally complete the rounding processing on all the icons at time T1, and the electronic device may display the system home page at time T1, at which time, all the icons in the displayed system home page are rounded.
Although the processing unit of the electronic device in the above embodiment implements the rounding processing on the icons, when each icon is processed, four different G2 curves need to be drawn for the four vertex angles of the icon, so that the rounding processing on the four vertex angles can be implemented. Even if 2-segment Bezier curves with the minimum segment number are adopted to obtain a G2 curve, when the number of icons on a display page is large, the number of the G2 curves which need to be calculated by the processing unit when the page is drawn is increased, the calculation amount of the processing unit when the page is drawn is greatly increased, and the efficiency of drawing the page is seriously influenced, so that in the scene shown in FIG. 2, after the processing unit obtains the page at the time of T0, the round-cornered processing of all the icons in the whole page can be completed at the time of T1 after a long time, and then the page is drawn and displayed, and under the condition that the time between T0 and T1 is long, the finally displayed page of the electronic equipment has visual effects of page blockage and the like, and the viewing experience of a user of the electronic equipment is seriously influenced.
Therefore, in an embodiment of the present application, there is also provided a method for rounding an icon by using a rounding curve when the processing unit in the electronic device draws the icon, where the rounding curve may be a G2 curve and may be applied in a scene as shown in fig. 2 and executed by an application program in the processing unit in the electronic device. Fig. 4 is a schematic flowchart of a processing method for icon rounded angle provided in the present application, where the method includes:
s101: and determining a G2 curve corresponding to one vertex of the icon to be processed. Referring to fig. 5, fig. 5 is a schematic diagram illustrating a state in which a processing unit of the electronic device performs rounding processing on vertices of an icon, and in S101, when the processing unit serving as an execution main body performs rounding processing on the icon, the processing unit may first select any one of four vertices of the icon and calculate a G2 curve of the vertex through a bezier curve. In the example shown in fig. 5, taking the first vertex a at the upper left corner of the icon as an example, in S101, the processing unit may calculate the G2 curve corresponding to the first vertex a at the upper left corner, which is denoted as a, by the following formula G2 (x1,y1):
//left top corner
……
path.cubicTo(c2,v2,c3,v3,c4,v4);
path.cubicTo(v3,c3,v2,c2,v1,c1);
After calculating the G2 curve corresponding to the vertex a, the processing unit may further calculate the G2 curve a according to the calculated G2 curve a G2 (x 1, y 1), the first vertex a is rounded to obtain the rounded vertex of the icon a in the state S10 as shown in fig. 5.
S102: and determining G2 curves corresponding to other three vertexes of the icon in a coordinate change mode.
Specifically, in this embodiment, the processing unit does not need to obtain the G2 curve corresponding to each vertex through a formula calculation, but obtains the G2 curves of the other three vertices in the icon through a relatively simple coordinate change method according to the G2 curve after obtaining the G2 curve of one vertex through calculation in S101 on the basis that the whole pixel size of the display screen and the icon drawing parameters are known, and then performs the rounding processing on the corresponding vertices through the G2 curves. The processing unit can determine in advance that the pixel resolution corresponding to the long side in the x direction of the icon in fig. 2 is recorded as width, and the pixel resolution corresponding to the wide side in the y direction is recorded as height.
Exemplarily, in the process of rounding the icon shown in fig. 5, after a G2 curve corresponding to the first vertex a is obtained through S101 and the rounding process is performed on the first vertex a according to the G2 curve, a state S10 shown in fig. 5 is obtained. The processing unit can change the coordinate according to the calculated G2 curve A corresponding to the first vertex A G2 (x 1, y 1) to obtain a G2 curve B corresponding to a second vertex B at the upper right corner of the icon G2 (x 2, y 2) corresponding to the method of turning over the curve G2 of the first vertex A and translating the curve according to the specific value of the pixel coordinate by turning over the curve G2 of the first vertex A in the long side direction x and adding the pixel resolution width in the long side direction while keeping the width direction y unchanged in the x-y coordinate system shown in FIG. 1 G2 (x 1, y 1) and curve B G2 The variation formula between (x 2, y 2) is the following formula three:
x2=-x1+width
y2= y1 equation three
Accordingly, the processing unit may obtain, in S102, a G2 curve C corresponding to the third vertex C at the lower right corner of the icon in a coordinate changing manner G2 (x 3, y 3) is equivalent to that in an x-y coordinate system as shown in fig. 1, the rounding curve of the first vertex is inverted in the broadside direction y and added with the pixel resolution height in the broadside direction, and then inverted in the long-side direction x and added with the pixel resolution width in the long-side direction, so that the calculated G2 curve of the first vertex A is inverted and translated according to the specific value of the pixel coordinate, wherein the curve A is G2 (x 1, y 1) and curve C G2 The variation formula between (x 3, y 3) is the following formula four:
Figure BDA0003153592110000211
the processing unit can also obtain a G2 curve D corresponding to a fourth vertex D at the lower left corner of the icon in a coordinate changing mode G2 (x 4, y 4) corresponding to that, in the x-y coordinate system shown in fig. 1, the rounding curve of the first vertex a is turned and translated according to the specific value of the pixel coordinate after the rounding curve of the first vertex a is turned in the broadside direction y and added with the pixel resolution heigh in the broadside direction while keeping the long-side direction x unchanged, and the turning is performed in the broadside direction y, wherein the curve a is G2 (x 1, y 1) and Curve D G2 The formula of the change between (x 4, y 4) is the following formula five:
Figure BDA0003153592110000212
s103: and according to the G2 curves of the four vertexes of the icon obtained in the S101-S102, rounding processing is respectively carried out on the four vertexes of the icon.
Wherein the processing unit is obtaining the G2 curve B G2 After (x 2, y 2) corresponds to curve A for G2 G2 (x 1, y 1) is flipped and moved in the x direction, the processing unit may perform a rounding process on the second vertex B according to the G2 curve, resulting in the rounded second vertex B as illustrated in state S20 shown in fig. 5.
Accordingly, the processing unit is obtaining the G2 curve C G2 After (x 3, y 3), corresponding to curve A for G2 G2 (x 1, y 1) are turned and moved in the x direction and the y direction, respectively, and the third vertex C may be rounded according to the G2 curve in S103, resulting in the rounded third vertex C as shown in the state S30 of fig. 5.
Accordingly, the processing unit is obtaining the G2 curve D G2 After (x 4, y 4), corresponding to curve A for G2 G2 (x 1, y 1) is turned and moved in the y direction, and the rounding of the fourth vertex D is performed according to the G2 curve, so that the rounded fourth vertex D is obtained as shown in the state S40 in fig. 5.
In some embodiments of the present application, the sequence of states S20 to S40 shown in fig. 5 is not limited, and may be executed by the processing unit sequentially or simultaneously, so as to finally implement the rounding processing on the vertices B, C, and D.
In some embodiments, the execution sequence of S102 to S103 provided by the present application is not limited, and the processing unit may determine G2 curves of all vertices through S101 to S102, and then perform round-pointing processing on the vertices through S103; or, after determining the G2 curve of one vertex in S101-S102, the processing unit may perform rounding processing on the vertex corresponding to the G2 curve immediately, and then sequentially calculate the G2 curve of the next vertex.
In addition, it can be understood that, in the embodiment of the present application, a G2 curve corresponding to the top left corner a of the icon is calculated first in the state S10 shown in fig. 5 as an example, in other possible implementation manners, the processing unit may also calculate a G2 curve of any other corner through a formula first, and then perform coordinate change according to the calculated G2 curve to obtain a G2 curve of the other corner, where a specific manner is the same as the principle, and is not described again.
In the whole process of performing the rounding processing on the four vertexes of the icon, which is provided by the embodiment of the application, when the coding is implemented, except for when the G2 curve corresponding to the first vertex (exemplified by coordinates of top left vertexes) of the icon is calculated, a plurality of segments of bezier functions are used for calculation, when the other three vertexes of the icon are calculated, the G2 curve corresponding to the vertex is relatively simply and directly obtained in a manner of changing coordinates in a coordinate system where a display plane is located, and then each vertex is subjected to rounding processing respectively through the G2 curve, so that the manner of obtaining the G2 curve through changing one-dimensional coordinates provided by the embodiment is adopted, compared with a manner of calculating the G2 curve through the multidimensional bezier functions at each vertex, the amount of calculation of the coordinate change is greatly reduced, thereby reducing the time for performing the rounding processing on the four vertexes of one icon on the display page by a processing unit of the electronic device, further reducing the time for drawing the display page by the processing unit, in a scene shown in fig. 2, the processing unit obtains the page at the time of obtaining the page due to reduce the amount of the calculation when the four vertexes of the drawing the icon on the display page, and can improve the power consumption of the electronic device, and improve the display efficiency of the electronic device at the time of the electronic device, and improve the display efficiency of the electronic device, and the electronic device, thereby improving the display efficiency of the electronic device, and the display efficiency of the electronic device.
In other embodiments, the storage unit may store a plurality of icon drawing parameters and G2 curves of four vertices corresponding to each icon drawing parameter, so that when the electronic device performs rounding processing on an icon, the electronic device may store the drawn G2 curves of the four vertices of the icon in advance from the storage unit according to the icon drawing parameters of the icon to be drawn, so that when the processing unit of the electronic device needs to draw the G2 curve, the processing unit may directly read the G2 curve corresponding to the icon drawing parameter of the current icon from the storage unit, thereby further reducing speed and efficiency when the electronic device draws a page. The storage unit may be a device capable of storing data, such as a memory and a cache in the electronic device, or may also be a module for storing data in the processing unit. Illustratively, also taking the process of drawing the system main page by the processing unit in the scenario shown in fig. 2 as an example, when the processing unit performs rounding processing on each icon after acquiring the page at time T0, the processing unit may acquire a G2 curve of four vertices corresponding to the current icon size from the storage unit, and then directly perform clipping processing on the four vertices of the icon according to the acquired G2 curve.
In other embodiments, considering that the storage unit occupies a larger storage space if the G2 curves of the four vertices corresponding to the icons of all sizes are stored, the storage unit may store the G2 curve corresponding to one vertex of the icon, and record the vertex as the first vertex, so that when the processing unit performs the rounding processing on the vertex of the icon, the processing unit acquires the G2 curve of the first vertex corresponding to the size from the storage unit according to the size of the currently processed icon. Exemplarily, fig. 6 is a schematic flowchart of another icon rounding processing method provided by the present application, and based on the embodiment shown in fig. 4, S101 of the method shown in fig. 6 is specifically S1011: the processing unit acquires a G2 curve corresponding to a first vertex at the upper left corner of the icon from the storage unit. After S1011, the processing unit calculates G2 curves of the other three vertices corresponding to the icon in the same manner as formula three, formula four, and formula five in S102, and performs round-angle processing on the four vertices of the icon in S103, so that the calculation efficiency can be improved to a certain extent even when the storage space is reduced.
In some embodiments, the G2 curves stored in the storage unit may correspond to different drawing parameters of the icon, such as different sizes, wherein, assuming that the pixel resolution of the electronic device is 1080 × 2340, 1080 × 2340=2527200 rectangles with different sizes may be combined according to the pixel resolution, and the G2 curves with one vertex or four vertices may be drawn according to the rectangles with each size and then stored in the storage unit. At this time, the icon drawing parameter may be used to indicate the size of the icon by the pixel resolution of the second icon on the long side and the wide side. And when the vertex of the icon is subjected to the round angle processing, the processing unit acquires the G2 curve corresponding to the size from the storage unit according to the size indicated by the icon drawing parameter of the currently processed icon. Exemplarily, fig. 7 is a schematic diagram of G2 curves stored in a storage unit provided in the present application, where the storage unit stores G2 curves corresponding to rectangles of different sizes according to different sizes of the rectangular icon, all the G2 curves use an O point at the upper left corner of a display page of the electronic device as an origin, coordinate systems are established on the long side and the wide side of the display page by using a pixel resolution as a unit, and initial coordinate values of the G2 curves are plotted as the origin O of the coordinate system, where the plotted sizes are J1, J2, J3, J4 \8230; \, and the initial coordinate values of the G2 curves are plotted as the origin O of the coordinate system. When a processing unit in the electronic device draws an icon and performs rounding processing on the icon, if it is determined that a first coordinate value of a first vertex a of an upper left corner of a second icon to be currently drawn on a display page is (x 1, y 1) and a pixel resolution corresponding to a side length of the icon is J3, the processing unit may obtain a G2 curve corresponding to the size J3 from the storage unit, add a coordinate of the G2 curve from an initial coordinate value (0, 0) of an O point to the first coordinate value (x 1, y 1) of the a point, and finally obtain the G2 curve required when rounding processing is performed on the icon to be drawn at the a point.
In some embodiments, the G2 curve stored in the storage unit may be drawn and stored in advance by a manufacturer of the electronic device; or, in the process of drawing the G2 curve, the electronic device may store the G2 curve corresponding to the icon with one size in the storage unit after drawing the G2 curve corresponding to the icon with one size for the first time, and judge the size of the current icon each time the G2 curve is drawn subsequently, and if the storage unit stores the G2 curve of the icon with the size, the G2 curve may be directly obtained from the storage unit, otherwise, the processing unit calculates the G2 curve.
In the embodiment shown in fig. 2 to 7, when an icon is displayed on a display page by a processing unit of an electronic device, a round-cornered processing process is performed on four vertices of the icon, in the above scenario, the size of the displayed icon is fixed, and after the processing unit finishes displaying the current page, the size of an icon control does not need to be changed in a subsequent page, so that a round-cornered processing of the icon is performed.
In other embodiments, the size of the icon displayed on the display page of the electronic device is not fixed, but is changed in a scaling manner within a certain time period, and at this time, the processing unit needs to perform round-pointing processing on the vertex of one icon control continuously by using different G2 curves according to the size of the icon at different times.
For example, fig. 8 is a schematic diagram illustrating a change of an embodiment of a display state of an electronic device provided in the present application, and fig. 9 is a schematic diagram illustrating a display process of the electronic device, where in S201 illustrated in fig. 9, the electronic device displays a system main page, which corresponds to the state S1 illustrated in fig. 8. In S202 shown in fig. 9, the electronic device detects a user' S click operation on the "set" application program of the target position on the display page, which corresponds to state S2 shown in fig. 8. Subsequently, the electronic device runs the "setting" application corresponding to the target location in S103, corresponding to the state S3 shown in fig. 8, and the electronic device displays a page of the "setting" application on the display page.
During the above states S2-S3, some electronic devices may also provide a process of dynamically changing icons of application programs, thereby providing a richer display effect. For example, fig. 10 is a schematic diagram of another embodiment of a change of a display state of an electronic device provided in the present application, and illustrates contents that can be displayed by the electronic device through a display page thereof between states S2-S3 shown in fig. 8. The time corresponding to the display state S2 of the electronic device is denoted as T2, the time corresponding to the display state S3 is denoted as T6, assuming that the pixel resolution of the whole display screen is 1080 × 2340, and the pixel resolution of the icons in the main system page is 36 × 36, then between T2 and T6, the electronic device gradually increases the icons of the "set" application program from the size of 36 × 36 in S2 to the size of 1080 × 2340 occupying the whole display screen area in S3 according to a certain frequency and time, and the time length between T2 and T6 may be preset or set by a user, or may also be set by the application program in the electronic device.
Exemplarily, in the example shown in fig. 10, after time T2, the processing unit in the electronic device will start drawing pages with a frequency, each page having an icon of the "set" application program larger in area than the icon in the previous page. The frequency of drawing pages may be set by a user of the electronic device. For example, at time T2 after time T2, the processing unit will draw a larger icon for the "set" application than the icon at time T2 and finally display it in display state S21; at time T4-T5, the icon drawn by the processing unit continues to increase and continues in the display states S22-S23. At each preset time in T2-T6, the processing unit will draw a new page, and in the process of drawing a page, the icon in which the application program is "set" needs to be cut according to the G2 curve with different size each time. And if the G2 curves of the four vertexes of the icon are calculated each time and then cut, redrawing is carried out for many times in the process from T2 to T6, the calculated amount of a processing unit in page drawing is also greatly increased, the efficiency of page drawing is seriously influenced, the electronic equipment can display S2 to S3 states, and when the dynamic change effect of the icon is realized, the page has visual effects of page blocking, slow application starting and the like, so that the viewing experience of a user of the electronic equipment is influenced.
In some embodiments, from the process of states S1-S3, the content within the icon may change from a graphic of the "setup" application to an interface of the application, e.g., an image within the icon of state S22 and an interface of the application within state 23, and this switching may occur at any time between S1-S3, with the present application emphasizing the change in icon size and the processing of vertices, and without limitation to the specific content displayed within the icon.
In addition, the scene of dynamically displaying the icons as shown in fig. 10 is only an example, and the electronic device further includes other scenes of dynamically displaying the icons, for example, fig. 11 is a schematic diagram of a change of another embodiment of the display state of the electronic device provided by the present application, which shows another possible scene of dynamically displaying the icons. In a state S4 shown in fig. 11, the electronic device displays a system main page, and after detecting that the user slides up at the bottom of the display page, in a state S5, the electronic device displays a window of a currently opened application program, and starts to perform an operation of closing the application program after detecting that the user slides up the window of a certain application program, and at the same time, in a subsequent state S6, the electronic device displays a window of a gradually decreasing application program on the display page, at this time, the processor also needs to perform real-time drawing on a change process of the window, and redraws the page and performs rounding processing on vertex angles of the icon at preset intervals between times T7 and T8.
Therefore, the present application further provides a method for rounding an icon when the processing unit in the electronic device draws an icon with a dynamically changing size in the scene shown in fig. 10, wherein the method is executed by an application program in the processing unit in the electronic device. Specifically, fig. 12 is a schematic flowchart of an embodiment of a processing method for icon rounded corners provided in the present application, where the method includes:
s200: the processing unit of the electronic device detects a touch operation on the first icon, for example, S200 may correspond to state S2 as shown in fig. 10, and the processing unit detects a click operation of the user on the first icon of the first application program on the display page at time T2, the first application program taking "setting" application program as an example, and further, the touch operation may be long-press, slide, drag, double-click, or the like. After the time T2, the processing unit of the electronic device starts executing the expansion process of drawing the icon of the first application in S300, and the expansion process of the icon in S300 starts from the time T2 and ends at the time T6 after the icon is completely expanded to the entire display page.
In some embodiments, after detecting the touch operation on the first icon, the processing unit may further determine, according to the touch operation, icon drawing parameters of the icon of the first application program at time T2 to time T6, for example, the processing unit may determine, according to a certain preset frequency, that the size of the icon corresponding to the first application program increases sequentially in the repeatedly drawn display page between time T2 and time T6. The processing unit needs to determine drawing parameters of the icon at each time of drawing the display page, for example, a length and a width of the icon to be drawn on the display page in a unit of pixel resolution, and then the processing unit performs rounding processing on the icon corresponding to the first application according to a G2 curve corresponding to the drawing parameters of the icon to be drawn. Wherein the preset frequency may be a refresh frequency, an update frequency, etc. of a display page of the electronic device, for example, 60 frames per second, the processing unit will perform the process of drawing the icon in S300 once every 1/60 second interval, and the size of the icon drawn each time will be increased in turn.
In some embodiments, S300 specifically includes the following steps:
s301: the processing unit obtains a rounding curve corresponding to the icon drawing parameter from the storage unit, where the rounding curve may be a preset G2 curve.
In the electronic device provided in this embodiment, the G2 curves corresponding to the drawn icons with different sizes may be stored in advance through the storage unit, and the example shown in fig. 7 may be referred to for specific stored G2 curves. When the processing unit of the electronic equipment needs to draw the G2 curve, the preset G2 curve can be directly read from the storage unit without calculating the G2 curve in real time. Taking the scene shown in fig. 10 as an example, when the processing unit draws the current display page at a time T3 after the time T2, after icon drawing parameters such as the size of the second icon corresponding to the first application program in the current display page to be updated are obtained, the preset G2 curve corresponding to the icon drawing parameters can be obtained from the storage unit according to the icon drawing parameters, where the size of the second icon is different from the size of the first icon. The second icon here may be an icon corresponding to the first application program in the display page to be drawn at any time after the time T2 and before the time T6.
S302: and the processing unit performs fillet processing on four vertexes of the second icon according to the acquired preset G2 curve.
If the G2 curves of the four vertexes corresponding to the current icon drawing parameters are obtained, the four vertexes of the second icon can be respectively rounded directly according to the G2 curves; for another example, if the G2 curve of one vertex corresponding to the current icon drawing parameter is obtained, the G2 curves of the other three vertices corresponding to the second icon may be calculated in the same manner as formula three, formula four, and formula five, and then the four vertices of the second icon are rounded according to the G2 curves. Illustratively, in the scenario shown in fig. 10, the processing unit performs rounding processing on four vertices of the second icon of the first application after the size change according to the acquired G2 curve at time T3.
In some embodiments, after determining the icon drawing parameters of the first application program, the processing unit of the electronic device may complete drawing of the second icon according to the icon drawing parameters, such as the size of the second icon corresponding to the first application program in the display page to be updated, where the drawn second icon is not subjected to the rounding processing, and then the second icon is subjected to the rounding processing in S302, where the process of drawing the second icon may be performed before or after S301, or may be performed simultaneously with S301.
S303: and the processing unit displays the second icon subjected to the rounding processing through the display unit.
Taking the scenario shown in fig. 10 as an example, the processing unit calculates the display page as in the state S21 at time T3, and after the second icon subjected to the rounding processing is included in the display page, the processing unit may then display the display page as in the state S21 on the display screen through the display unit, where the second icon subjected to the rounding processing is included in the display page. The display unit may specifically be a device such as a GPU and a driver, which can be used to control a display screen to display, or the display unit may be a display screen, and the application does not limit the specific way of displaying a page on the electronic device.
It can be understood that, the processing unit repeatedly executes the process of S301 to S303 according to a preset frequency between preset time periods T2 to T6, so that in S300, the processing unit draws an icon corresponding to a first application program in a current display page to be updated according to an icon drawing parameter in the preset time period T2 to T6 according to the preset frequency, sequentially takes the drawn icon as a second icon, obtains a corresponding radiusing curve from the storage unit in real time according to the icon drawing parameter of the current second icon, performs the radiusing process on the second icon in the current display page, and displays the current display page including the second icon after the radiusing process by the display unit. Finally, the display unit will be refreshed at a preset frequency, and the second icons in the display page are all rounded and gradually changed during the refreshing process between T2 and T6.
Finally, in the icon rounding processing method provided by this embodiment, when the processing unit of the electronic device draws a dynamically changing icon in real time according to a certain preset frequency, a preset G2 curve calculated in advance can be obtained from the storage unit according to the preset frequency according to the size of a second icon in the current page to be drawn, and then rounding processing is performed on each vertex through the preset G2 curve, so that calculation of the G2 curve is not required to be performed every time, the calculation amount of the processing unit when rounding processing is performed on the icon in the whole icon changing process is greatly reduced, and thus the time for the processing unit to draw and display the page is reduced. When the processing unit is used in the scene shown in fig. 10, the processing unit refreshes the display page for multiple times and respectively draws the icons for multiple times according to the preset frequency between the time T2 and the time T6, because the preset G2 curve is obtained from the storage unit each time, the calculation amount is not increased due to the calculation of the G2 curve each time, the rounded processing of each icon can be completed at a higher speed while the power consumption of the electronic device is reduced, and then the drawing and the display of the page corresponding to each time are completed, so that the speed and the efficiency of the electronic device in drawing the page at the time T2 to the time T6 are improved, the visual effects of the electronic device, such as page blockage, slow application starting and the like, are relieved, and the display performance of the electronic device and the viewing experience of a user are improved.
In some embodiments, based on the fact that the initial size (size in S2), the final size (size of the display page) and the preset frequency of the icon are known when the icon dynamically changes between the times T2 to T6 shown in fig. 10, after the processing unit determines the clicking operation on the icon at the time T2, the processing unit may determine the total number of display pages to be drawn and the size of the icon corresponding to the first application in each display page within the preset time period T2 to T6 according to the initial size, the final size and the preset frequency of the icon. At this time, the processing unit may obtain, from the storage unit, the G2 curve corresponding to the icon size corresponding to the first application program in all the display pages within the preset time period in advance according to the preset frequency, and use the G2 curve in subsequent calculation, so that interaction between the processing unit and the storage unit can be reduced, and the processing efficiency is further improved.
Fig. 13 is a flowchart illustrating an embodiment of a processing method for icon rounded corner according to the present application, where after S200, the method shown in fig. 13 further includes: s201: the processing unit determines a plurality of preset G2 curves corresponding to the icon corresponding to the first application program when the icon changes between the moments T2-T6 according to the preset frequency, and acquires the plurality of determined preset G2 curves from the storage unit through S202. Subsequently, the processing unit will execute S400 between times T2-T6, specifically including: s401, according to a preset frequency and the size of the icon in the current display page, a preset G2 curve corresponding to the size can be directly selected from the processing unit to carry out round-corner processing on the icon, then the drawn icon is sent to the display unit through S402, and the display unit displays the icon in S403. The specific methods and principles for drawing and displaying icons in S401-S403 are the same as those in S302-S304 in fig. 12, and are not repeated herein.
In some embodiments, the present application further provides a method for performing rounding processing on an icon when a size of the icon dynamically changes according to a sliding operation of a user in drawing a scene as shown in fig. 11, where the method is executed by an application program in a processing unit in an electronic device. Specifically, fig. 14 is a schematic flowchart of an embodiment of a processing method for icon rounded corner provided in the present application, and in an example shown in fig. 14, the method includes: s500: the processing unit of the electronic device determines that a sliding operation on a first icon corresponding to a first application program is received, for example, S500 may correspond to a state S5 shown in fig. 11, and after detecting the sliding operation on the first application program icon on the display page by the user at time T7, the processing unit may determine, according to a direction and a speed of the sliding operation, an icon drawing parameter such as a size of a second icon corresponding to the first application program in the display page that needs to be displayed at the next refresh time at time T7. S501: and the processing unit acquires a preset G2 curve corresponding to the icon drawing parameter from the storage unit according to the size of the icon. S502: and the processing unit performs fillet treatment on four vertexes of the icon according to the acquired preset G2 curve. S503: the processing unit displays the display page through the display unit. The specific methods and principles for drawing and displaying icons in S501-S504 are the same as those in S301-S304 in fig. 12, and are not repeated.
In summary, in the method for rounding the icon provided in this embodiment, the processing unit can determine the size of the icon change according to the sliding operation of the user on the icon, and can obtain the preset G2 curve calculated in advance from the storage unit according to the preset frequency according to the size of the current icon, and then perform the rounding processing on each vertex through the preset G2 curve, so that the calculation of the G2 curve is not required each time, so that the calculation amount of the processing unit when performing the rounding processing on the icon is greatly reduced in the whole process of the icon change, and the time of the processing unit for drawing the display page is reduced. When the method is applied to the scene shown in fig. 12, after the sliding operation of the user on the icon is determined, the rounding processing of the icon in the next display page can be completed as soon as possible, the speed and the efficiency of the electronic device in drawing the page according to the sliding operation of the user on the icon are improved, the visual effects of page blocking, slow application starting and the like of the electronic device are relieved, and the display performance of the electronic device and the viewing experience of the user are improved.
In some embodiments, fig. 15 is a schematic flowchart of an embodiment of a processing method for icon rounding provided by the present application, in an example shown in fig. 15, when a processing unit draws a display page, a change type of an icon to be drawn in the display page is first determined, and if the icon belongs to a static change type in a scene shown in fig. 2, a preset G2 curve may be obtained from a storage unit according to a real-time size of the icon according to a processing manner shown in fig. 3, and after the icon is rounded according to the preset G2 curve, the display page including the icon is sent to a display unit for display. If the icon belongs to the dynamic change type shown in fig. 10, a plurality of preset G2 curves corresponding to the icon change may be obtained from the storage unit according to the initial size and the final size of the icon change in the manner shown in fig. 13, and after the icon is rounded according to the preset G2 curves in sequence according to the preset frequency, the display page including the icon is sent to the display unit for display.
In the foregoing embodiment, the icon rounding processing method provided in the present embodiment is described, but in order to implement each function in the method provided in the present embodiment, the electronic device serving as the execution subject may include a hardware structure and/or a software module, and implement each function in the form of a hardware structure, a software module, or a hardware structure and a software module. Whether any of the above functions is implemented as a hardware structure, a software module, or a combination of a hardware structure and a software module depends upon the particular application and design constraints imposed on the technical solution.
For example, the present application provides a processing apparatus for icon rounded angle, including: the system comprises a detection module, a determination module, an acquisition module, a drawing module, a determination module, a display module and the like, wherein the detection module is used for detecting touch operation on a first icon; the determining module is used for determining icon drawing parameters of the first application program according to the touch operation; the acquisition module is used for acquiring a rounding curve corresponding to the icon drawing parameter from a storage unit; the drawing module is used for drawing a second icon according to the icon drawing parameters; the processing module is used for carrying out round angle processing on the second icon through the round angle curve; and the display module is used for displaying the second icon after the rounding processing.
It should be noted that the content specifically executed by the detection module, the determination module, the acquisition module, the drawing module, the determination module, and the display module may refer to the related content in the icon rounded corner processing method described in the foregoing embodiment, and the specific implementation manner and principle thereof are the same, and are not described herein again.
It should be understood that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. The processing element may be a separate processing element, or may be integrated into a chip of the apparatus, or may be stored in the memory of the apparatus in the form of program code, and a processing element of the apparatus may call and execute the functions of the above determination module. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when some of the above modules are implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor that can call program code. As another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
This application also provides an electronic device comprising: a processor and a memory; the memory stores computer executable instructions, and when the processor executes the computer executable instructions, the processor can be used for executing the icon rounding processing method according to any one of the foregoing embodiments of the present application.
The present application further provides a computer-readable storage medium storing computer-executable instructions, which when executed, can be used to implement the icon rounding processing method as in any one of the foregoing embodiments of the present application.
The embodiment of the present application further provides a chip for executing the instruction, where the chip is used to execute the icon rounding processing method executed by the electronic device in any one of the foregoing embodiments of the present application.
Embodiments of the present application further provide a computer program product, the computer program product includes a computer program, the computer program is stored in a storage medium, and when the computer program is executed, the processing method for icon rounding performed by an electronic device according to any of the foregoing embodiments of the present application may be implemented.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (18)

1. A method for icon rounded corner processing, comprising:
detecting touch operation on the first icon; wherein the first icon corresponds to a first application;
determining an icon drawing parameter of the first application program according to the touch operation;
acquiring a rounding curve corresponding to the icon drawing parameter from a storage unit; the storage unit stores a plurality of icon drawing parameters and at least one filleting curve corresponding to each icon drawing parameter;
drawing a second icon according to the icon drawing parameter; wherein the second icon corresponds to the first application, and the first icon and the second icon are different in size;
performing rounding treatment on the second icon through the rounding curve;
displaying the second icon after the round corner treatment;
the storage unit is used for specifically storing a plurality of drawing parameters and filleting curves of the icon corresponding to each drawing parameter at four vertexes;
alternatively, the first and second electrodes may be,
the storage unit is used for specifically storing a plurality of drawing parameters and a rounding curve of an icon corresponding to each drawing parameter at a first vertex;
if a plurality of drawing parameters and a rounding curve of the icon corresponding to each drawing parameter at the first vertex are specifically stored in the storage unit, rounding the second icon through the rounding curve, including:
performing filleting treatment on the first vertex of the second icon through the filleting curve of the first vertex;
according to the icon drawing parameters, carrying out coordinate change on the filleting curves to obtain the filleting curves of the second icon at a second vertex, a third vertex and a fourth vertex;
and performing round angle processing on the second vertex, the third vertex and the fourth vertex of the second icon respectively through the round angle curves of the second vertex, the third vertex and the fourth vertex.
2. The method of claim 1,
the icon drawing parameters include: pixel resolution of the second icon in long and wide side directions; the method comprises the steps of establishing a coordinate system by taking pixel resolution as a unit in the directions of a long edge and a wide edge of a display page, and drawing an initial coordinate value of a rounding curve stored in a storage unit by taking an origin of the coordinate system as a reference.
3. The method of claim 2, wherein prior to the rounding the first vertex of the second icon with the rounded curve of the first vertex, further comprising:
determining a first coordinate value of a first vertex of the second icon in the coordinate system;
and adding the initial coordinate value of the rounding curve of the first vertex in the coordinate system and the first coordinate value to obtain the rounding curve of the first vertex of the second icon.
4. The method of claim 3, wherein the coordinate transformation of the rounded curve according to the icon drawing parameters comprises:
keeping an initial coordinate value of the radiusing curve of the first vertex of the second icon in the coordinate system unchanged in the broadside direction, turning over the radiusing curve in the long-side direction, and adding the initial coordinate value of the radiusing curve of the first vertex of the second icon with the pixel resolution of the second icon in the long-side direction to obtain the radiusing curve of the second icon at the second vertex;
turning the initial coordinate value of the rounding curve of the first vertex of the second icon in the coordinate system in the long edge direction, adding the initial coordinate value of the rounding curve of the first vertex of the second icon to the pixel resolution of the second icon in the long edge direction, turning the initial coordinate value of the rounding curve of the first vertex of the second icon in the wide edge direction, adding the initial coordinate value of the rounding curve of the first vertex of the second icon to the pixel resolution of the second icon in the long edge direction, and turning the initial coordinate value of the rounding curve of the first vertex of the second icon in the wide edge direction, adding the initial coordinate value of the rounding curve of the second icon to the pixel resolution of the second icon in the long edge direction, and adding the pixel resolution of the second icon in the wide edge direction to obtain the rounding curve of the second icon in the third vertex;
and keeping the initial coordinate value of the rounding curve of the first vertex of the second icon in the coordinate system unchanged in the long side direction, turning the second icon in the broadside direction, and adding the initial coordinate value of the rounding curve of the first vertex of the second icon with the pixel resolution of the second icon in the broadside direction to obtain the rounding curve of the second icon in the fourth vertex.
5. The method according to any one of claims 1 to 4, wherein the determining an icon drawing parameter of the first application according to the touch operation includes:
and according to the touch operation, determining that the used icon drawing parameters are updated every time when the icon of the first application program is updated and refreshed according to the preset frequency within the preset time period.
6. The method according to claim 5, wherein the obtaining the rounding curve corresponding to the icon drawing parameter from the storage unit comprises:
and in the preset time period, according to a preset frequency, obtaining a rounding curve corresponding to the icon drawing parameter used when the icon of the first application program is updated from the storage unit respectively.
7. The method according to claim 5, wherein the obtaining the rounding curve corresponding to the icon drawing parameter from the storage unit comprises:
and acquiring a filleting curve corresponding to each icon drawing parameter when the icon of the first application program is updated according to a preset frequency in the preset time period from a storage unit.
8. The method according to claim 6 or 7, wherein said drawing a second icon on a second display page according to the icon drawing parameter comprises;
and drawing the icon of the first application program according to the icon drawing parameter and the icon drawing parameters within the preset time period according to the preset frequency, and taking the drawn icon as the second icon in sequence.
9. An apparatus for icon rounded processing, comprising:
the detection module is used for detecting touch operation on the first icon; wherein the first icon corresponds to a first application;
the determining module is used for determining icon drawing parameters of the first application program according to the touch operation;
the obtaining module is used for obtaining a rounding curve corresponding to the icon drawing parameter from a storage unit; the storage unit stores a plurality of icon drawing parameters and at least one filleting curve corresponding to each icon drawing parameter;
the drawing module is used for drawing a second icon according to the icon drawing parameter; wherein the second icon corresponds to the first application, the first and second icons being different sizes;
the processing module is used for carrying out round angle processing on the second icon through the round angle curve;
the display module is used for displaying the second icon after the rounding treatment;
the storage unit is used for specifically storing a plurality of drawing parameters and filleting curves of the icon corresponding to each drawing parameter at four vertexes;
alternatively, the first and second liquid crystal display panels may be,
the storage unit is used for specifically storing a plurality of drawing parameters and a rounding curve of an icon corresponding to each drawing parameter at a first vertex;
if the storage unit specifically stores a plurality of drawing parameters and a rounding curve of the icon corresponding to each drawing parameter at the first vertex, the processing module is specifically configured to,
performing filleting treatment on the first vertex of the second icon through the filleting curve of the first vertex;
according to the icon drawing parameters, carrying out coordinate change on the filleting curves to obtain the filleting curves of the second icon at a second vertex, a third vertex and a fourth vertex;
and performing round angle processing on the second vertex, the third vertex and the fourth vertex of the second icon respectively through the round angle curves of the second vertex, the third vertex and the fourth vertex.
10. The apparatus of claim 9, wherein the icon drawing parameters comprise:
pixel resolution of the second icon in long and wide side directions; the method comprises the steps of establishing a coordinate system by taking pixel resolution as a unit in the long edge and wide edge directions of a display page, and drawing an initial coordinate value of a rounding curve stored in a storage unit by taking an origin of the coordinate system as a reference.
11. The apparatus of claim 10, wherein the processing module is further configured to,
determining a first coordinate value of a first vertex of the second icon in the coordinate system;
and adding the initial coordinate value of the rounding curve of the first vertex in the coordinate system and the first coordinate value to obtain the rounding curve of the first vertex of the second icon.
12. The apparatus of claim 11, wherein the processing module is specifically configured to,
keeping an initial coordinate value of the filleting curve of the first vertex of the second icon in the coordinate system unchanged in the broadside direction, turning the initial coordinate value in the long-side direction, and adding the initial coordinate value to the pixel resolution of the second icon in the long-side direction to obtain the filleting curve of the second icon in the second vertex;
turning the initial coordinate value of the rounding curve of the first vertex of the second icon in the coordinate system in the long edge direction, adding the initial coordinate value of the rounding curve of the first vertex of the second icon to the pixel resolution of the second icon in the long edge direction, turning the initial coordinate value of the rounding curve of the first vertex of the second icon in the broadside direction, adding the initial coordinate value of the rounding curve of the first vertex of the second icon to the pixel resolution of the second icon in the long edge direction, and turning the initial coordinate value of the rounding curve of the first vertex of the second icon in the broadside direction, adding the initial coordinate value of the rounding curve of the first vertex of the second icon to the pixel resolution of the second icon in the broadside direction, and adding the pixel resolution of the second icon to the pixel resolution of the second icon in the broadside direction to obtain a rounding curve of the second icon in the third vertex;
and keeping the initial coordinate value of the rounding curve of the first vertex of the second icon in the coordinate system unchanged in the long-side direction, turning over the second icon in the broadside direction, and adding the initial coordinate value of the rounding curve of the first vertex of the second icon with the pixel resolution of the second icon in the broadside direction to obtain the rounding curve of the second icon at the fourth vertex.
13. The apparatus according to any of claims 9-12, wherein the determining means is specifically configured to,
and according to the touch operation, determining that the used icon drawing parameters are updated every time when the icon of the first application program is updated and refreshed according to the preset frequency within the preset time period.
14. The apparatus according to claim 13, wherein the obtaining means is specifically configured to,
and in the preset time period, according to a preset frequency, obtaining a rounding curve corresponding to the icon drawing parameter used when the icon of the first application program is updated from the storage unit respectively.
15. The apparatus of claim 13,
and acquiring a filleting curve corresponding to each icon drawing parameter when the icon of the first application program is updated according to a preset frequency in the preset time period from a storage unit.
16. The apparatus according to claim 14 or 15, wherein the rendering module is specifically configured to,
and in the preset time period, according to the preset frequency, drawing the icon of the first application program according to the icon drawing parameter, and sequentially taking the drawn icon as the second icon.
17. An electronic device, comprising: a processor and a memory;
the memory stores computer-executable instructions;
the processor executing the computer-executable instructions stored by the memory causes the processor to perform the method of icon rounded corner processing of any of claims 1 to 8.
18. A computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium, and when executed, the computer-executable instructions are used for implementing the icon rounding processing method according to any one of claims 1 to 8.
CN202110773976.2A 2021-07-08 2021-07-08 Icon rounded angle processing method and device Active CN113610943B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110773976.2A CN113610943B (en) 2021-07-08 2021-07-08 Icon rounded angle processing method and device
CN202211004546.5A CN115619894A (en) 2021-07-08 2021-07-08 Icon rounded angle processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110773976.2A CN113610943B (en) 2021-07-08 2021-07-08 Icon rounded angle processing method and device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202211004546.5A Division CN115619894A (en) 2021-07-08 2021-07-08 Icon rounded angle processing method and device

Publications (2)

Publication Number Publication Date
CN113610943A CN113610943A (en) 2021-11-05
CN113610943B true CN113610943B (en) 2022-10-04

Family

ID=78304236

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110773976.2A Active CN113610943B (en) 2021-07-08 2021-07-08 Icon rounded angle processing method and device
CN202211004546.5A Pending CN115619894A (en) 2021-07-08 2021-07-08 Icon rounded angle processing method and device

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202211004546.5A Pending CN115619894A (en) 2021-07-08 2021-07-08 Icon rounded angle processing method and device

Country Status (1)

Country Link
CN (2) CN113610943B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117541461A (en) * 2024-01-10 2024-02-09 广州中望龙腾软件股份有限公司 Arc scaling drawing method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224177A (en) * 2015-09-30 2016-01-06 努比亚技术有限公司 A kind of mobile terminal and application icon redraw method
CN106445332A (en) * 2016-09-05 2017-02-22 深圳Tcl新技术有限公司 Icon display method and system
CN108153526A (en) * 2017-12-22 2018-06-12 武汉虹信技术服务有限责任公司 A kind of reusable control corners setting method
CN109445898A (en) * 2018-10-31 2019-03-08 维沃移动通信有限公司 A kind of application icon generation method and terminal device
WO2020173370A1 (en) * 2019-02-26 2020-09-03 华为技术有限公司 Method for moving application icons, and electronic device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2522109B2 (en) * 1990-10-17 1996-08-07 株式会社精工舎 Curve fitting method
CN105094507B (en) * 2014-05-15 2018-05-08 Tcl集团股份有限公司 One kind realizes fillet icon-in-focus fitting method and system in 3D UI
CN110928461A (en) * 2019-10-31 2020-03-27 维沃移动通信有限公司 Icon moving method and electronic equipment
CN111127590B (en) * 2019-12-26 2023-06-20 新奥数能科技有限公司 Second-order Bezier curve drawing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224177A (en) * 2015-09-30 2016-01-06 努比亚技术有限公司 A kind of mobile terminal and application icon redraw method
CN106445332A (en) * 2016-09-05 2017-02-22 深圳Tcl新技术有限公司 Icon display method and system
CN108153526A (en) * 2017-12-22 2018-06-12 武汉虹信技术服务有限责任公司 A kind of reusable control corners setting method
CN109445898A (en) * 2018-10-31 2019-03-08 维沃移动通信有限公司 A kind of application icon generation method and terminal device
WO2020173370A1 (en) * 2019-02-26 2020-09-03 华为技术有限公司 Method for moving application icons, and electronic device

Also Published As

Publication number Publication date
CN113610943A (en) 2021-11-05
CN115619894A (en) 2023-01-17

Similar Documents

Publication Publication Date Title
EP4221164A1 (en) Display method for electronic device with flexible display and electronic device
CN110347269B (en) Empty mouse mode realization method and related equipment
WO2021213164A1 (en) Application interface interaction method, electronic device, and computer readable storage medium
WO2021036585A1 (en) Flexible screen display method and electronic device
WO2020093988A1 (en) Image processing method and electronic device
CN110597510A (en) Dynamic layout method and device for interface
CN112506386A (en) Display method of folding screen and electronic equipment
CN114887323B (en) Electronic equipment control method and electronic equipment
CN113691271B (en) Data transmission method and wearable device
CN110557740A (en) Electronic equipment control method and electronic equipment
CN112860428A (en) High-energy-efficiency display processing method and equipment
CN113728295A (en) Screen control method, device, equipment and storage medium
CN114880251A (en) Access method and access device of storage unit and terminal equipment
CN110704145B (en) Hot area adjusting method and device, electronic equipment and storage medium
WO2022143180A1 (en) Collaborative display method, terminal device, and computer readable storage medium
WO2022095744A1 (en) Vr display control method, electronic device, and computer readable storage medium
CN113448482A (en) Sliding response control method and device of touch screen and electronic equipment
CN113610943B (en) Icon rounded angle processing method and device
CN113901485B (en) Application program loading method, electronic device and storage medium
WO2022095906A1 (en) Key mapping method, electronic device, and system
CN112527220B (en) Electronic equipment display method and electronic equipment
CN116828100A (en) Bluetooth audio playing method, electronic equipment and storage medium
CN113721827A (en) Floating keyboard display method, electronic equipment and storage medium
CN114089902A (en) Gesture interaction method and device and terminal equipment
CN114332331A (en) Image processing method and device

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