CN116610246A - Method and device for calculating erasing area, storage medium and display device - Google Patents

Method and device for calculating erasing area, storage medium and display device Download PDF

Info

Publication number
CN116610246A
CN116610246A CN202210119629.2A CN202210119629A CN116610246A CN 116610246 A CN116610246 A CN 116610246A CN 202210119629 A CN202210119629 A CN 202210119629A CN 116610246 A CN116610246 A CN 116610246A
Authority
CN
China
Prior art keywords
width
height
whiteboard application
pixel
touch object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210119629.2A
Other languages
Chinese (zh)
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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN202210119629.2A priority Critical patent/CN116610246A/en
Publication of CN116610246A publication Critical patent/CN116610246A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a method and a device for calculating an erasure area, a storage medium and electronic equipment, wherein the method comprises the following steps: acquiring a first width and a first height of a touch object on the display screen reported by the control chip, and a second width and a second height of the display screen; acquiring an adjustment coefficient of the whiteboard application; calculating the pixel width of an erasing area of the touch object in the whiteboard application based on the first width, the adjustment coefficient of the whiteboard application and the second width; calculating the pixel height of an erasing area of the touch object in the whiteboard application based on the first height, the adjustment coefficient of the whiteboard application and the second height; and obtaining the erasing area of the erasing area based on the pixel width of the erasing area and the pixel height of the erasing area. By adopting the embodiment of the application, the accuracy of calculating the erasing area is improved.

Description

Method and device for calculating erasing area, storage medium and display device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for calculating an erasure area, a storage medium, and a display device.
Background
With the rapid development of touch screens, the touch screens are separated from a mouse and a keyboard, and the selection, editing, erasing, annotation and the like of interface contents can be realized by clicking a terminal interface by hands. For example, after editing on the terminal, when the error content is required to be edited or the whole content is required to be edited, the part required to be erased can be directly controlled and erased by hand, so that great convenience is brought to people in life and work when the terminal is used.
Disclosure of Invention
In order to solve the above problems, embodiments of the present application provide a method, an apparatus, a storage medium, and a display device for calculating an erasure area, which improve the accuracy of calculating the erasure area.
In a first aspect, an embodiment of the present application provides a method for calculating an erasure area, where the method includes:
acquiring a first width and a first height of a touch object on the display screen reported by the control chip, and a second width and a second height of the display screen;
acquiring an adjustment coefficient of the whiteboard application;
calculating the pixel width of an erasing area of the touch object in the whiteboard application based on the first width, the adjustment coefficient of the whiteboard application and the second width;
Calculating the pixel height of an erasing area of the touch object in the whiteboard application based on the first height, the adjustment coefficient of the whiteboard application and the second height;
and obtaining the erasing area of the erasing area based on the pixel width of the erasing area and the pixel height of the erasing area.
In a second aspect, an embodiment of the present application provides a computing device for erasing an area, the device including:
the data acquisition module is used for acquiring a first width and a first height of a touch object on the display screen, and a second width and a second height of the display screen, which are reported by the control chip;
the adjustment coefficient acquisition module is used for acquiring the adjustment coefficient of the whiteboard application;
a first calculating module, configured to calculate a pixel width of an erasing area of the touch object in the whiteboard application based on the first width, the adjustment coefficient of the whiteboard application, and the second width;
a second calculating module, configured to calculate a pixel height of an erasing area of the touch object in the whiteboard application based on the first height, the adjustment coefficient of the whiteboard application, and the second height;
and the erasing area calculation module is used for obtaining the erasing area of the erasing area based on the pixel width of the erasing area and the pixel height of the erasing area.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of the first aspect described above.
In a fourth aspect, an embodiment of the present application provides a display apparatus, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of the first aspect described above.
The technical scheme provided by the embodiments of the application has the beneficial effects that at least:
in the embodiment of the application, the first width and the first height of the touch object on the display screen reported by the control chip, and the second width and the second height of the display screen are acquired; acquiring an adjustment coefficient of the whiteboard application, and calculating the pixel width of an erasing area of the touch object in the whiteboard application based on the first width, the adjustment coefficient of the whiteboard application and the second width; calculating the pixel height of an erasing area of the touch object in the whiteboard application based on the first height, the adjustment coefficient of the whiteboard application and the second height; the erasure area of the erasure area is obtained based on the pixel width of the erasure area and the pixel height of the erasure area. The first width and the first height of the touch object reported by the control chip are converted into the pixel width and the pixel height displayed in the whiteboard application, so that the area of the erasing area is obtained, and the accuracy of calculating the area of the erasing area is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a system architecture diagram of a method for calculating an erasure area according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method for calculating an erasure area according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating an example of determining an erase region according to an embodiment of the present application;
FIG. 4 is a schematic illustration of an embodiment of the present application for forming an erase region;
FIG. 5 is a flowchart of a method for calculating an erasure area according to an embodiment of the present application;
FIG. 6 is a schematic diagram showing an example of an erasing area according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a device for calculating an erasing area according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a device for calculating an erasing area according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a device for calculating an erasing area according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a display device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
In the following description, the terms "first," "second," and "first," are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The following description provides various embodiments of the application that may be substituted or combined between different embodiments, and thus the application is also to be considered as embracing all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then the present application should also be considered to include embodiments that include one or more of all other possible combinations including A, B, C, D, although such an embodiment may not be explicitly recited in the following.
The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements described without departing from the scope of the application. Various examples may omit, replace, or add various procedures or components as appropriate. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
Along with the development of technology, the touch screen is rapidly developed, the touch screen is separated from a mouse and a keyboard, and the selection, editing, erasing, annotation and the like of the interface content can be realized by clicking the terminal interface by hand. For example, after editing on the terminal, when the error content is required to be edited or the whole content is required to be edited, the part required to be erased can be directly controlled and erased by hand, so that great convenience is brought to people in life and work when the terminal is used. Currently, for erasing content written on a terminal interface, a part to be erased is usually selected, then the content written on the selected part is erased, or an erasing area with a corresponding size is generated through the area of a touch object on the terminal interface, and the touch object is moved to erase the content written on the terminal interface. For the method of erasing after the circle selection, the closed circle is required to be formed for erasing, and when the closed circle is not formed, the circle selection is required to be repeated, so that the operation is complicated and troublesome; for the method that the touch object forms the erasure area with the corresponding size on the terminal interface, the same touch object forms different erasure areas under different resolutions, so that the erasure accuracy is insufficient.
Based on the above, the embodiment of the application provides a calculation method of an erasing area, which is implemented by acquiring a first width and a first height of a touch object on a display screen reported by a control chip, and a second width and a second height of the display screen; acquiring an adjustment coefficient of the whiteboard application, and calculating the pixel width of an erasing area of the touch object in the whiteboard application based on the first width, the adjustment coefficient of the whiteboard application and the second width; calculating the pixel height of an erasing area of the touch object in the whiteboard application based on the first height, the adjustment coefficient of the whiteboard application and the second height; the erasure area of the erasure area is obtained based on the pixel width of the erasure area and the pixel height of the erasure area. The first width and the first height of the touch object reported by the control chip are converted into the pixel width and the pixel height displayed in the whiteboard application, so that the area of the erasing area is obtained, and the accuracy of calculating the area of the erasing area is improved.
Fig. 1 is a schematic diagram of a system architecture of a method for calculating an erasure area according to an embodiment of the present application.
The system includes a terminal device, which may include, but is not limited to, an intelligent interactive tablet, a personal computer, a desktop computer, a tablet computer, a palm top computer, a laptop computer, a computer all-in-one, a vehicle-mounted multimedia, and the like. The terminal equipment is intelligent equipment which can be used for a touch screen, a whiteboard application is installed in the terminal equipment, and the terminal equipment comprises a control chip and a display screen.
Acquiring a first width and a first height of a touch object on a display screen reported by a control chip, acquiring a width pixel quantity and a height pixel quantity of a whiteboard application under the current resolution, calculating a ratio of the width pixel quantity to the second width of the display screen to obtain a first ratio, calculating a ratio of the pixel height to the second height of the display screen to obtain a second ratio, and taking an average value of the first ratio and the second ratio as an adjustment coefficient of the whiteboard application; the method comprises the steps of adjusting the first width of integer data of a touch object to be a third width of floating point data displayed by the touch object in the whiteboard application through adjustment coefficient of the whiteboard application, the first width of the touch object and preset value calculation, and then calculating the pixel width of an erasing area of the touch object in the whiteboard application based on the third width and the second width; simultaneously, the first height of integer data of the touch object is adjusted to be a third height of floating point data displayed by the touch object in the whiteboard application through adjustment coefficient of the whiteboard application, the first height of the touch object and preset value calculation, and then the pixel height of an erasing area of the touch object in the whiteboard application is calculated based on the third height and the second height; taking the result of multiplying the pixel width and the pixel height as the corresponding erasing area of the touch object in the whiteboard application; and displaying the erasing area in the whiteboard application by taking a rectangle which is formed by the pixel width and the pixel height and is overlapped with the center of the rectangle formed by the touch object on the display screen as the erasing area. The first width and the first height of the touch object reported by the control chip are adjusted to be the pixel width and the pixel height of the touch object when the touch object is displayed on the whiteboard application, the physical width and the physical height of the touch object are converted into pixel quantities, the erasing area of the touch object on the whiteboard application is formed by the pixel quantities, the corresponding erasing area is formed, the erasing area of the touch object is calculated by the pixel quantities, and the accuracy of calculating the erasing area is improved.
Based on the system architecture shown in fig. 1, a method for calculating the erasure area according to an embodiment of the present application will be described in detail with reference to fig. 2 to 6.
Fig. 2 is a flowchart of a method for calculating an erasing area according to an embodiment of the present application. As shown in fig. 2, the method for calculating the erasure area may include the following steps:
s101, acquiring a first width and a first height of a touch object on the display screen, and a second width and a second height of the display screen, which are reported by the control chip.
In one embodiment, a whiteboard application is installed on the terminal device, the terminal device comprises a control chip and a display screen, when a user writes on the whiteboard application, whether an instruction for erasing the current writing content is generated or not is detected, when the instruction for erasing the current writing content exists, the control chip acquires a first width and a first height of a touch object on the current display screen, and then acquires the first width and the first height of the touch object on the display screen reported by the control chip, and a second width and a second height inherent to the display screen.
Among other things, the command to erase the current writing may include, but is not limited to, clicking a button such as "erase" or "clear" in a whiteboard application, voice control by "turn on erase" or the like, when it is monitored that the contact currently touching the display screen is not the rest of the object to write, and so on.
The first width and the first height of the touch object reported by the control chip may include, but are not limited to, a maximum width and a maximum height of the touch object when the touch object contacts the display screen, a maximum continuous width and a maximum continuous height of the touch object when the touch object contacts the display screen, and so on.
For example, as shown in fig. 3 (a), the contact is the entire palm of the user, and the first width and the first height of the touch object are the maximum width and the maximum height of the entire palm, and as shown in fig. 3 (b), the contact is the entire palm of the user, and the palms of the user are separated, so that the width and the height of any one finger can be obtained as the first width and the first height of the touch object.
The first width and the first height of the touch object reported by the control chip are the physical width and the physical height of the touch object, and the reported value of the control chip is integer data, for example, the length of the palm of a person is about 10cm, the width is about 18cm, the corresponding physical length is 1000mm, and the corresponding physical width is 1800mm.
The second width and the second height of the display screen reported by the control chip are the inherent physical width and physical height of the display screen, for example, the length of the 10-inch display screen is 19cm, the width is 15cm, the corresponding physical length is 1900mm, and the corresponding physical width is 1500mm.
S102, acquiring an adjustment coefficient of the whiteboard application.
In one embodiment, the control chip reports integer data, the whiteboard application can only identify floating point data, the first width and the second width of the touch object and the second width and the second height of the display screen reported by the control chip are obtained through the system interface, the data touch object obtained by the system interface is the first width and the first height, the second width and the second height of the display screen correspond to the floating point data, and when the first width and the first height of the touch object are adjusted to be displayed on the editing application through an adjustment coefficient of the whiteboard application, the width and the height corresponding to the touch object are displayed on the whiteboard application according to the floating point data.
Since the first width and the first height of the touch object on the display screen acquired by the control chip are different from the width and the height of the touch object displayed on the whiteboard application, the first width and the first height of the touch object on the display screen need to be adjusted to be corresponding to the width and the height when the touch object is displayed in the whiteboard application through the increment coefficient of the whiteboard application.
For example, the first width and the first height of the palm of the person reported by the control chip on the display screen are 1000mm, the first height is 1800mm, the first width acquired through the system interface for the whiteboard application is 1000.0mm, and the first height is 1800.0mm, however, the corresponding width and length of the first width and the first length of the palm of the person when displayed in the whiteboard application are not necessarily 1800.0mm and 1000.0mm through the adjustment coefficient of the whiteboard application.
The system interface may be defined as getTouchMajor, or other representation of an interface for acquiring data, such as getMajorData, getFirstData, etc., and the definition of the system interface is not limited in the embodiment of the present application.
S103, calculating the pixel width of an erasing area of the touch object in the whiteboard application based on the first width, the adjustment coefficient of the whiteboard application and the second width.
In one embodiment, the first width of the touch object on the display screen and the second height of the display screen reported by the control chip are obtained, and the adjustment coefficient of the whiteboard application is obtained. And adjusting the first width of the touch object to be the width corresponding to the display in the whiteboard application according to the first width corresponding to the touch object and the adjustment coefficient of the whiteboard application, and calculating the pixel width corresponding to the erasing area of the touch object in the whiteboard application according to the width, the second width corresponding to the display screen and the width pixel quantity of the whiteboard application.
When a touch object is displayed in a whiteboard application, the touch object is displayed according to a pixel corresponding to the touch object in the whiteboard application, so that a physical width corresponding to the touch object needs to be converted into a pixel width.
S104, calculating the pixel height of an erasing area of the touch object in the whiteboard application based on the first height, the adjustment coefficient of the whiteboard application and the second height.
In one embodiment, the first height of the touch object on the display screen and the second height of the display screen reported by the control chip are obtained, and the adjustment coefficient of the whiteboard application is obtained. And adjusting the first width of the touch object to be the corresponding height when the touch object is displayed in the whiteboard application according to the first height corresponding to the touch object and the adjustment coefficient of the whiteboard application, and calculating the pixel height corresponding to the erasing area of the touch object in the whiteboard application according to the height, the second height corresponding to the display screen and the height pixel quantity of the whiteboard application.
When the touch object is displayed in the whiteboard application, the display is performed according to the pixel corresponding to the touch object in the whiteboard application, so that the physical height corresponding to the touch object needs to be converted into the pixel height.
S105, obtaining the erasing area of the erasing area based on the pixel width of the erasing area and the pixel height of the erasing area.
In one embodiment, the pixel width of the erasing area calculated by the first width corresponding to the touch object is calculated to be equal to the pixel height of the erasing area calculated by the first height corresponding to the touch object, and the erasing area corresponding to the erasing area when the touch object is erased in the whiteboard application is calculated.
The erasing area is a rectangle formed by taking the width and the height of the pixel corresponding to the touch object as the width and the height of the pixel.
As shown in fig. 4, 100 is a palm of a user, 200 is a rectangular frame formed by a first width and a first height of the palm reported by a control chip, and 300 is a rectangular frame corresponding to an erasing area formed by the palm on a whiteboard application. After the user writes in the whiteboard application, an instruction for erasing the current writing content is triggered, at the moment, the palm is placed on the display screen of the terminal device, at the moment, the control chip reports the first width and the first height of the palm and the second width and the second height of the display screen to the whiteboard application, the whiteboard application obtains related data of a touch object and the display screen reported by the control chip through a system interface, and the pixel width and the pixel height of an erasing area when the palm of the user erases in the whiteboard application are calculated through adjusting the coefficient and the width pixel quantity and the height pixel quantity of the whiteboard application, and the erasing area corresponding to the erasing area is calculated according to the pixel width and the pixel height of the erasing area, so that the erasing area when the palm of the user erases in the whiteboard application is obtained.
In the embodiment of the application, the first width and the first height of the touch object on the display screen reported by the control chip, and the second width and the second height of the display screen are acquired; acquiring an adjustment coefficient of the whiteboard application, and calculating the pixel width of an erasing area of the touch object in the whiteboard application based on the first width, the adjustment coefficient of the whiteboard application and the second width; calculating the pixel height of the erasing area of the touch object in the white board based on the first height, the adjustment coefficient applied by the white board and the second height; and obtaining the erasing area of the erasing area based on the pixel width of the erasing area and the pixel pitch of the erasing area. The first width and the first height of the touch object reported by the control chip are converted into the pixel width and the pixel height displayed in the whiteboard application, so that the area of the erasing area is obtained, and the accuracy of calculating the area of the erasing area is improved.
Referring to fig. 5, a flowchart of a method for calculating an erasure area is provided in the present application. As shown in fig. 5, the method for calculating the erasure area may include the steps of:
s201, acquiring a first width and a first height of a touch object on the display screen, and a second width and a second height of the display screen, which are reported by the control chip.
In this step, reference may be made to step S101, which is not described herein.
S202, acquiring the width pixel quantity and the height pixel quantity of the whiteboard application under the current resolution.
In one embodiment, a width pixel amount corresponding to a width of a whiteboard application and a height pixel amount corresponding to a height of the whiteboard application at a current resolution are obtained.
The pixel quantity is pixel points with width and pixel points with height, which are installed in the terminal equipment and applied under different resolutions.
For example, at 1080P resolution, the pixel count is 1920 pixels in the x-axis (i.e., the width of the whiteboard application) and 1080 pixels in the y-axis (i.e., the height of the whiteboard application).
At 4k resolution, the x-axis is 3840 pixels and the y-axis is 2160 pixels.
S203, calculating the ratio of the pixel quantity with the width to the second width to obtain a first ratio.
S204, calculating the ratio of the height pixel quantity to the second height to obtain a second ratio.
In one embodiment, a ratio of a width pixel amount of the whiteboard application to a second width of the display screen at the current resolution is calculated to obtain a first ratio, and a ratio of a height pixel amount of the whiteboard application to a second height of the display screen at the current resolution is calculated to obtain a second ratio.
And S205, taking the average value of the first ratio and the second ratio as an adjustment coefficient applied by the whiteboard.
In one embodiment, an average of the first ratio and the second ratio is calculated and used as an adjustment factor for the whiteboard application at the current resolution.
The calculation of the first ratio relates to the amount of pixels of the width of the whiteboard applied at the current resolution and the calculation of the second ratio relates to the amount of pixels of the height of the whiteboard applied at the current resolution, whereby both the first ratio and the second ratio are related to the current resolution of the terminal device, and therefore the adjustment coefficients of the whiteboard application are different at different resolutions.
And the first width and the first height of the touch object reported by the control chip are converted into the width and the height of the area corresponding to the touch object when the whiteboard application is displayed by using corresponding adjustment coefficients under different resolutions, so that the method is more accurate. Stretching or deformation in the display caused by the difference in resolution can be avoided.
S206, based on the adjustment coefficient of the whiteboard application, the first width and a preset value, obtaining a third width of the touch object displayed in the whiteboard application, wherein the first width is integer data, and the third width is floating point data.
In one embodiment, the control chip reports a first width of a touch object on the display screen to the whiteboard application, the whiteboard application obtains the first width of the touch object reported by the control chip through the system interface, the first width of the touch object reported by the control chip is integer data, the system interface obtains floating point data corresponding to the first width of the touch object which can be identified by the whiteboard application, the data reported by the control chip and the data obtained by the system interface are numerical values corresponding to the first width of the touch object, and the difference is that the two representative numerical values corresponding to the first width of the touch object under different data types.
The quotient is obtained by dividing the first width of the touch object by the adjustment coefficient of the whiteboard application, and the calculated quotient is multiplied by the preset value to obtain the third width of the touch object displayed in the whiteboard application, so that the first width of the touch object reported by the control chip is adjusted to be the third width of the touch object displayed on the whiteboard application through the adjustment coefficient of the whiteboard application.
For example, the calculation of the third width may be expressed by a preset value of formula width=touch_major/k, and in the embodiment of the present application, the writing manner of each character in the calculation formula is not limited, and may represent the calculation relationship thereof.
Where width is the third width of the touch object displayed in the whiteboard application, touch_major is the first width of the touch object, and k is the adjustment coefficient of the whiteboard application.
The preset value is configured according to the performance of the terminal equipment, and the optimal value can be determined in a testing stage according to the performance of the terminal equipment, so that the first width and the second width of the touch object reported by the control chip can be accurately adjusted to be a third width and a third height when the touch object is displayed in the whiteboard application.
For example, by taking a preset value of 2 as an illustration, the calculation formula of the third width may be expressed as width=touch_major/k×2, and the first width of the touch object on the display screen is adjusted to the third width when displayed on the whiteboard application through calculation.
The calculation formula can be understood that the adjustment coefficient of the whiteboard application can be obtained from the steps S202 to S205 by calculating a first ratio of the pixel amount of the width of the whiteboard application to the second width of the display screen, and a second ratio of the pixel amount of the height of the whiteboard application to the second height of the display screen, and then calculating an average value of the first ratio and the second ratio, where the average value is the adjustment coefficient of the whiteboard application. As known from the calculation process of the adjustment coefficient of the whiteboard application, the adjustment coefficient of the whiteboard application can adjust the first width of the touch object to the third width when the touch object is displayed in the whiteboard application.
S207, calculating the pixel width of an erasing area of the touch object in the whiteboard application based on the third width and the second width.
In one embodiment, according to a first width of a touch object and an adjustment coefficient of a whiteboard application, which are reported by a control chip, the first width of the touch object is adjusted to be a third width when the touch object is displayed on the whiteboard application, according to the third width and a second width of a display screen, the third width is multiplied by a width pixel quantity of the whiteboard application at a current resolution, and the product is divided by the second width of the display screen, so that a pixel width of an erasing area of the touch object in the whiteboard application is obtained.
For example, the process of calculating the pixel width of the erasing area may be represented by any character, and in the embodiment of the present application, the formula real_width=real_width_width/width_width_max is described by taking as an example, where real_width is the pixel width of the erasing area of the touch object in the whiteboard application, width is the third width of the touch object displayed in the whiteboard application, real_width_width_max is the pixel amount of the whiteboard application at the current resolution, and width_max is the second width of the display screen.
The calculation formula can be understood as that the pixel quantity of the width of the whiteboard applied under the current resolution is divided by the second width of the display screen, the pixel quantity corresponding to the unit width can be calculated, and then the pixel width of the erasing area of the touch object in the whiteboard application can be obtained by multiplying the third width of the touch object when the touch object is displayed on the whiteboard application and the pixel quantity corresponding to the unit width.
And S208, obtaining a third height of the touch object displayed in the whiteboard application based on the adjustment coefficient of the whiteboard application, the first height and a preset value, wherein the first height is integer data, and the third height is floating point data.
In one embodiment, the control chip reports the first height of the touch object on the display screen to the whiteboard application, the whiteboard application obtains the first height of the touch object reported by the control chip through the system interface, the first height of the touch object reported by the control chip is shaping data, the system interface obtains floating point type data corresponding to the first height of the touch object which can be identified by the whiteboard application, the data reported by the control chip and the data obtained by the system interface are numerical values corresponding to the first height of the touch object, and the difference is that the two represent the numerical values of the first height of the touch object under different data types.
The first height of the touch object reported by the control chip is adjusted and increased to be the third height of the touch object displayed on the whiteboard application through the adjustment coefficient of the whiteboard application.
In the calculation formula of the third height, any character may be used to indicate the meaning represented by each character, for example, a preset value is taken as 2 to describe the calculation formula of the third height when the touch object is displayed in the whiteboard application, where the third height is the third height when the touch object is displayed in the whiteboard application, the touch_high is the first height of the touch object, and k is an adjustment coefficient of the whiteboard application.
S209, calculating the pixel height of an erasing area of the touch object in the whiteboard application based on the third height and the second height.
In one embodiment, according to a first height of a touch object and an adjustment coefficient of a whiteboard application, which are reported by a control chip, the first width of the touch object is adjusted to be a third height when the touch object is displayed on the whiteboard application, according to the third height and a second height of a display screen, the third height is multiplied by a height pixel quantity of the whiteboard application at the current resolution, and the product is divided by the second width of the display screen, so that a pixel height of an erasing area of the touch object in the whiteboard application is obtained.
For example, the calculation formula of the pixel height of the erasing area may be represented by any character, and only the meaning represented by each character needs to be indicated, for example, real_high=high_real_high/high_min is described as an example, where real_high is the pixel height of the erasing area of the touch object in the whiteboard application, high is the third height of the touch object displayed in the whiteboard application, real_high_min is the pixel amount of the height of the whiteboard application in the current resolution, and high_high is the second height of the display screen.
The calculating process can be understood as that the pixel quantity corresponding to the unit height can be calculated by dividing the pixel quantity of the height of the whiteboard applied under the current resolution by the second height of the display screen, and then the pixel height of the erasing area of the touch object in the whiteboard application can be obtained by multiplying the third height of the touch object when the touch object is displayed on the whiteboard application by the pixel quantity corresponding to the unit height.
S210, multiplying the pixel width of the erasing area by the pixel height of the erasing area to obtain the erasing area of the erasing area.
In one embodiment, the pixel width and the pixel height of the touch object in the whiteboard application are calculated, the rectangle is constructed by using the pixel width and the pixel height as the width and the height of the rectangle, the area corresponding to the rectangle is the erasing area of the touch object in the whiteboard application, the area of the erasing area can be calculated by multiplying the pixel width and the pixel height of the erasing area, and when an erasing instruction of a user is received, the first width and the first height of the touch object on the display screen are obtained, and the corresponding erasing area of the touch object in the whiteboard application can be calculated.
In the calculation process of the erasing area, the first width and the first height reported by the control chip are adjusted to be the adjustment coefficients of the third width and the third height displayed on the whiteboard application, and the adjustment coefficients are calculated according to the quick-reading pixel quantity and the height pixel quantity of the whiteboard application under the current resolution, so that the erasing areas of the touch object in the whiteboard application are different under different resolutions, and the conditions of stretching or deformation and the like of the erasing area of the touch object in the whiteboard application caused by different resolutions are avoided.
And S211, displaying the erasing area in the whiteboard application, wherein the central point of the erasing area coincides with the central point corresponding to the touch object reported by the control chip.
In one embodiment, after determining an erasure area of the touching object in the whiteboard application, i.e. after determining the size of the erasure area, a center point corresponding to a rectangle formed by the first width and the first height of the touching object is determined, and a center point of the erasure area when the touching object is displayed on the whiteboard application is determined, the erasure area is displayed in the whiteboard application, and when displayed, the center point of the erasure area when the touching object is displayed on the whiteboard application is overlapped with the center point of the rectangle formed by the first width and the first height of the touching object, so as to determine an area where the erasure area is performed in the whiteboard application.
For example, as shown in fig. 6, 400 is a rectangle formed by a first width and a first height of a touch object, 500 is an erasing area corresponding to the touch object in a whiteboard application, 600 is a rectangle formed by the first width and the first height of the touch object and a rectangle corresponding to the erasing area corresponding to the touch object in the whiteboard application, and a common center point of the two rectangles is common. In order to ensure that the writing content of the place where the touch object passes is erased when the touch object slides on the whiteboard application, the central point of the touch object on the display screen is taken as the central point of the erasing area to form a rectangle corresponding to the erasing area.
In the embodiment of the application, a first width and a first height of a touch object on a display screen reported by a control chip, a second width and a second height of the display screen are obtained, a width pixel quantity and a height pixel quantity of a whiteboard application under the current resolution are obtained, the ratio of the width pixel quantity to the second width is calculated to obtain a first ratio, the ratio of the height pixel quantity to the second height is calculated to obtain a second ratio, the average value of the first ratio and the second ratio is used as an adjustment coefficient of the whiteboard application, a third width of the touch object displayed in the whiteboard application is obtained based on the adjustment coefficient of the whiteboard application, the first width and a preset value, and the pixel width of an erasing area of the touch object in the whiteboard application is calculated based on the third width of the touch object displayed in the whiteboard application and the second width of the display screen; the method comprises the steps of obtaining a third height of a touch object displayed in a whiteboard application based on an adjustment coefficient of the whiteboard application, a first height of the touch object on a display screen reported by a control chip and a preset value, and calculating the pixel height of an erasing area of the touch object in the whiteboard application based on the third height of the touch object displayed in the whiteboard application and a second height of the display screen; and multiplying the pixel height of the erasing area by the pixel width of the erasing area to obtain the erasing area of the erasing area, and displaying the erasing area in the whiteboard application, wherein the central point of the erasing area coincides with the central point of a rectangle formed by the first width and the first height of the touch object during display. The first width and the first height of the touch object reported by the control chip are adjusted to be the pixel width and the pixel height of the touch object when the touch object is displayed on the whiteboard application, the physical width and the physical height of the touch object are converted into pixel quantities, the erasing area of the touch object on the whiteboard application is formed by the pixel quantities, the corresponding erasing area is formed, the erasing area of the touch object is calculated by the pixel quantities, and the accuracy of calculating the erasing area is improved.
The following describes in detail the device for calculating the erasing area according to the embodiment of the present application with reference to fig. 7. Note that, the present application is not limited to the above-described embodiments. The erasing area calculating device in fig. 7 is used to perform the method of the embodiment of the present application shown in fig. 2 to 6, and for convenience of explanation, only the relevant parts of the embodiment of the present application are shown, and specific technical details are disclosed, please refer to the embodiment of the method shown in fig. 2 to 6.
Referring to fig. 7, a schematic structure diagram of a computing device with an erasing area is provided in the present application. As shown in fig. 7, the calculating device 1 for an erasure area according to an embodiment of the present application includes: a data acquisition module 11, an adjustment coefficient acquisition module 12, a first calculation module 13, a second calculation module 14, and an erasure area calculation module 15.
The data acquisition module 11 is configured to acquire a first width and a first height of a touch object on the display screen reported by the control chip, and a second width and a second height of the display screen;
an adjustment coefficient acquisition module 12, configured to acquire an adjustment coefficient applied by the whiteboard;
a first calculating module 13, configured to calculate a pixel width of an erasing area of the touch object in the whiteboard application based on the first width, the adjustment coefficient of the whiteboard application, and the second width;
A second calculating module 14, configured to calculate a pixel height of an erasing area of the touch object in the whiteboard application based on the first height, the adjustment coefficient of the whiteboard application, and the second height;
and the erasure area calculation module 15 is configured to obtain an erasure area of the erasure area based on the pixel width of the erasure area and the pixel height of the erasure area.
Optionally, the increment coefficient obtaining module 12 is specifically configured to:
acquiring the width pixel quantity and the height pixel quantity of the whiteboard application under the current resolution;
calculating the ratio of the pixel quantity with the width to the second width to obtain a first ratio;
calculating the ratio of the height pixel quantity to the second height to obtain a second ratio;
and taking the average value of the first ratio and the second ratio as an adjustment coefficient applied by the whiteboard.
Optionally, as shown in fig. 8, the first computing module 13 includes:
a third width calculating unit 131, configured to obtain, based on the adjustment coefficient of the whiteboard application, the first width, and a preset value, a third width of the touch object displayed in the whiteboard application, where the first width is integer data, and the third width is floating point data;
A pixel width calculating unit 132, configured to calculate a pixel width of an erasing area of the touch object in the whiteboard application based on the third width and the second width.
Optionally, the third width calculating unit 131 is specifically configured to:
calculating a first quotient of the first width and an adjustment factor applied by the whiteboard;
multiplying the first quotient by the preset value to obtain a third width of the touch object on the whiteboard application.
Optionally, the pixel width calculating unit 132 is specifically configured to:
calculating a first product of the third width and a width pixel amount of the whiteboard application at a current resolution;
dividing the first product by the second width to obtain a pixel width of an erasing area of the touch object in the whiteboard application.
Optionally, as shown in fig. 9, the second computing module 14 includes:
a third height calculating unit 141, configured to obtain, based on the adjustment coefficient of the whiteboard application, the first height, and a preset value, a third height of the touch object displayed in the whiteboard application, where the first height is integer data, and the third height is floating point data;
A pixel height calculating unit 142, configured to calculate a pixel height of an erasing area of the touch object in the whiteboard application based on the third height and the second height.
Optionally, the third height calculating unit 141 is specifically configured to:
calculating a second quotient of the first height and an adjustment factor applied by the whiteboard;
multiplying the second quotient by the preset value to obtain a third height of the touch object displayed in the whiteboard application.
Optionally, the pixel height calculating unit 142 is specifically configured to:
calculating a second product of the third height and a height pixel amount of the whiteboard application at the current resolution;
dividing the second product by the second height to obtain a pixel height of an erased area of the touch object in the whiteboard application.
Optionally, the erasure area calculating module 15 is specifically configured to:
multiplying the pixel width of the erasing area by the pixel height of the erasing area to obtain the erasing area of the erasing area.
Optionally, as shown in fig. 7, the apparatus 1 for calculating an erasure area further includes:
and the erasing area display module 16 is configured to display the erasing area in the whiteboard application, where a center point of the erasing area coincides with a center point corresponding to the touch object reported by the control chip.
In the embodiment of the application, a first width and a first height of a touch object on a display screen reported by a control chip, a second width and a second height of the display screen are obtained, a width pixel quantity and a height pixel quantity of a whiteboard applied under the current resolution are obtained, a first ratio is obtained by calculating the ratio of the width pixel quantity to the second width of the display screen, a second ratio is obtained by calculating the ratio of the pixel height to the second height of the display screen, and the average value of the first ratio and the second ratio is used as an adjustment coefficient of the whiteboard application; the method comprises the steps of adjusting the first width of integer data of a touch object to be a third width of floating point data displayed by the touch object in the whiteboard application through adjustment coefficient of the whiteboard application, the first width of the touch object and preset value calculation, and then calculating the pixel width of an erasing area of the touch object in the whiteboard application based on the third width and the second width; simultaneously, the first height of integer data of the touch object is adjusted to be a third height of floating point data displayed by the touch object in the whiteboard application through adjustment coefficient of the whiteboard application, the first height of the touch object and preset value calculation, and then the pixel height of an erasing area of the touch object in the whiteboard application is calculated based on the third height and the second height; taking the result of multiplying the pixel width and the pixel height as the corresponding erasing area of the touch object in the whiteboard application; and displaying the erasing area in the whiteboard application by taking a rectangle which is formed by the pixel width and the pixel height and is overlapped with the center of the rectangle formed by the touch object on the display screen as the erasing area. The first width and the first height of the touch object reported by the control chip are adjusted to be the pixel width and the pixel height of the touch object when the touch object is displayed on the whiteboard application, the physical width and the physical height of the touch object are converted into pixel quantities, the erasing area of the touch object on the whiteboard application is formed by the pixel quantities, the corresponding erasing area is formed, the erasing area of the touch object is calculated by the pixel quantities, and the accuracy of calculating the erasing area is improved.
The embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are adapted to be loaded by a processor and execute the method for calculating the erasure area according to the embodiment shown in fig. 2 to fig. 6, and the specific execution process may refer to the specific description of the embodiment shown in fig. 2 to fig. 6, which is not repeated herein.
Referring to fig. 10, a schematic structural diagram of a display device is provided in an embodiment of the present application. As shown in fig. 10, the display device 1000 may include: at least one processor 1001, at least one network interface 1002, at least one input output interface 1003, at least one display unit 1004, at least one memory 1005, at least one communication bus 1006. Wherein the processor 1001 may include one or more processing cores. The processor 1001 connects various parts within the entire display device 1000 using various interfaces and lines, performs various functions of the display device 1000 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and invoking data stored in the memory 1005. The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. The network interface 1002 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface, bluetooth interface), among others. The communication bus 1006 is used to enable connected communications between these components. The display unit 1004 may be a touch panel. As shown in fig. 10, the memory 1005 as one storage medium may include an operating system, a network communication module, an input-output interface module, and a calculation program of an erasure area.
In the display device 1000 shown in fig. 10, the input/output interface 1003 is mainly used to provide an interface for a user and an access device, and obtain data input by the user and the access device.
In one embodiment, the processor 1001 may be configured to call a calculation program of the erasure area stored in the memory 1005, and specifically perform the following operations:
acquiring a first width and a first height of a touch object on the display screen reported by the control chip, and a second width and a second height of the display screen;
acquiring an adjustment coefficient of the whiteboard application;
calculating the pixel width of an erasing area of the touch object in the whiteboard application based on the first width, the adjustment coefficient of the whiteboard application and the second width;
calculating the pixel height of an erasing area of the touch object in the whiteboard application based on the first height, the adjustment coefficient of the whiteboard application and the second height;
and obtaining the erasing area of the erasing area based on the pixel width of the erasing area and the pixel height of the erasing area.
In one embodiment, the processor 1001, when executing the acquisition of the adjustment coefficients of the whiteboard application, specifically performs the following operations:
Acquiring the width pixel quantity and the height pixel quantity of the whiteboard application under the current resolution;
calculating the ratio of the pixel quantity with the width to the second width to obtain a first ratio;
calculating the ratio of the height pixel quantity to the second height to obtain a second ratio;
and taking the average value of the first ratio and the second ratio as an adjustment coefficient applied by the whiteboard.
In one embodiment, the processor 1001, when executing the adjustment coefficient based on the first width, the whiteboard application, and the second width, calculates a pixel width of an erasing area of the touch object in the whiteboard application, specifically performs the following operations:
based on the adjustment coefficient of the whiteboard application, the first width and a preset value, obtaining a third width of the touch object displayed in the whiteboard application, wherein the first width is integer data, and the third width is floating point data;
based on the third width and the second width, a pixel width of an erase area of the touch in the whiteboard application is calculated.
In one embodiment, the processor 1001 obtains a third width of the touch object displayed in the whiteboard application when executing the adjustment coefficient based on the whiteboard application, the first width, and the preset value, where the first width is integer data, and when the third width is floating point data, specifically executes the following operations:
Calculating a first quotient of the first width and an adjustment factor applied by the whiteboard;
multiplying the first quotient by the preset value to obtain a third width of the touch object on the whiteboard application.
In one embodiment, the processor 1001, when executing the calculation of the pixel width of the erasing area of the touch object in the whiteboard application based on the third width and the second width, specifically performs the following operations:
calculating a first product of the third width and a width pixel amount of the whiteboard application at a current resolution;
dividing the first product by the second width to obtain a pixel width of an erasing area of the touch object in the whiteboard application.
In one embodiment, the processor 1001, when executing the calculation of the pixel height of the erased area of the touch object in the whiteboard application based on the first height, the adjustment coefficient of the whiteboard application, and the second height, specifically executes the following operations:
based on the adjustment coefficient of the whiteboard application, the first height and a preset value, obtaining a third height of the touch object displayed in the whiteboard application, wherein the first height is integer data, and the third height is floating point data;
Based on the third height and the second height, a pixel height of an erased area of the touch in the whiteboard application is calculated.
In one embodiment, when the processor 1001 obtains the third height of the touch object displayed in the whiteboard application by executing the adjustment coefficient based on the whiteboard application, the first height and the preset value, the following operations are specifically executed:
calculating a second quotient of the first height and an adjustment factor applied by the whiteboard;
multiplying the second quotient by the preset value to obtain a third height of the touch object displayed in the whiteboard application.
In one embodiment, the processor 1001, when executing the calculation of the pixel height of the erased area of the touch object in the whiteboard application based on the third height and the second height, specifically executes the following operations:
calculating a second product of the third height and a height pixel amount of the whiteboard application at the current resolution;
dividing the second product by the second height to obtain a pixel height of an erased area of the touch object in the whiteboard application.
In one embodiment, the processor 1001, when performing the obtaining the erasure area of the erasure area based on the pixel width of the erasure area and the pixel height of the erasure area, specifically performs the following operations:
Multiplying the pixel width of the erasing area by the pixel height of the erasing area to obtain the erasing area of the erasing area.
In one embodiment, the processor 1001 also performs the following:
and displaying the erasing area in the whiteboard application, wherein the central point of the erasing area coincides with the central point corresponding to the touch object reported by the control chip.
In the embodiment of the application, a first width and a first height of a touch object on a display screen reported by a control chip, a second width and a second height of the display screen are obtained, a width pixel quantity and a height pixel quantity of a whiteboard applied under the current resolution are obtained, a first ratio is obtained by calculating the ratio of the width pixel quantity to the second width of the display screen, a second ratio is obtained by calculating the ratio of the pixel height to the second height of the display screen, and the average value of the first ratio and the second ratio is used as an adjustment coefficient of the whiteboard application; the method comprises the steps of adjusting the first width of integer data of a touch object to be a third width of floating point data displayed by the touch object in the whiteboard application through adjustment coefficient of the whiteboard application, the first width of the touch object and preset value calculation, and then calculating the pixel width of an erasing area of the touch object in the whiteboard application based on the third width and the second width; simultaneously, the first height of integer data of the touch object is adjusted to be a third height of floating point data displayed by the touch object in the whiteboard application through adjustment coefficient of the whiteboard application, the first height of the touch object and preset value calculation, and then the pixel height of an erasing area of the touch object in the whiteboard application is calculated based on the third height and the second height; taking the result of multiplying the pixel width and the pixel height as the corresponding erasing area of the touch object in the whiteboard application; and displaying the erasing area in the whiteboard application by taking a rectangle which is formed by the pixel width and the pixel height and is overlapped with the center of the rectangle formed by the touch object on the display screen as the erasing area. The first width and the first height of the touch object reported by the control chip are adjusted to be the pixel width and the pixel height of the touch object when the touch object is displayed on the whiteboard application, the physical width and the physical height of the touch object are converted into pixel quantities, the erasing area of the touch object on the whiteboard application is formed by the pixel quantities, the corresponding erasing area is formed, the erasing area of the touch object is calculated by the pixel quantities, and the accuracy of calculating the erasing area is improved.
It will be clear to a person skilled in the art that the solution according to the application can be implemented by means of software and/or hardware. "Unit" and "module" in this specification refer to software and/or hardware capable of performing a specific function, either alone or in combination with other components, such as Field programmable gate arrays (Field-ProgrammaBLE Gate Array, FPGAs), integrated circuits (Integrated Circuit, ICs), etc.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, such as the division of the units, merely a logical function division, and there may be additional manners of dividing the actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some service interface, device or unit indirect coupling or communication connection, electrical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied essentially or partly in the form of a software product or all or part of the technical solution, which is stored in a memory, and includes several instructions for causing an electronic device (which may be a personal computer, a server, a network device, or the like) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned memory includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be performed by hardware associated with a program that is stored in a computer readable memory, which may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The foregoing is merely exemplary embodiments of the present disclosure and is not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a scope and spirit of the disclosure being indicated by the claims.

Claims (13)

1. A method for calculating an erasure area, which is applied to a terminal device, wherein the terminal device includes a control chip and a display screen, and a whiteboard application is installed in the terminal device, the method comprising:
Acquiring a first width and a first height of a touch object on the display screen reported by the control chip, and a second width and a second height of the display screen;
acquiring an adjustment coefficient of the whiteboard application;
calculating the pixel width of an erasing area of the touch object in the whiteboard application based on the first width, the adjustment coefficient of the whiteboard application and the second width;
calculating the pixel height of an erasing area of the touch object in the whiteboard application based on the first height, the adjustment coefficient of the whiteboard application and the second height;
and obtaining the erasing area of the erasing area based on the pixel width of the erasing area and the pixel height of the erasing area.
2. The method of claim 1, wherein the obtaining adjustment coefficients for the whiteboard application comprises:
acquiring the width pixel quantity and the height pixel quantity of the whiteboard application under the current resolution;
calculating the ratio of the pixel quantity with the width to the second width to obtain a first ratio;
calculating the ratio of the height pixel quantity to the second height to obtain a second ratio;
and taking the average value of the first ratio and the second ratio as an adjustment coefficient applied by the whiteboard.
3. The method of claim 1, wherein the calculating the pixel width of the erased area of the touch object in the whiteboard application based on the first width, the adjustment factor of the whiteboard application, and the second width comprises:
based on the adjustment coefficient of the whiteboard application, the first width and a preset value, obtaining a third width of the touch object displayed in the whiteboard application, wherein the first width is integer data, and the third width is floating point data;
based on the third width and the second width, a pixel width of an erase area of the touch in the whiteboard application is calculated.
4. The method of claim 3, wherein the obtaining a third width of the touch object displayed in the whiteboard application based on the adjustment coefficient of the whiteboard application, the first width being integer data, the third width being floating point data, comprises:
calculating a first quotient of the first width and an adjustment factor applied by the whiteboard;
multiplying the first quotient by the preset value to obtain a third width of the touch object on the whiteboard application.
5. The method of claim 3, wherein the calculating a pixel width of an erase area of the touch object in the whiteboard application based on the third width and the second width comprises:
calculating a first product of the third width and a width pixel amount of the whiteboard application at a current resolution;
dividing the first product by the second width to obtain a pixel width of an erasing area of the touch object in the whiteboard application.
6. The method of claim 1, wherein the calculating the pixel height of the touch object in the erased area in the whiteboard application based on the first height, the adjustment factor of the whiteboard application, and the second height comprises:
based on the adjustment coefficient of the whiteboard application, the first height and a preset value, obtaining a third height of the touch object displayed in the whiteboard application, wherein the first height is integer data, and the third height is floating point data;
based on the third height and the second height, a pixel height of an erased area of the touch in the whiteboard application is calculated.
7. The method of claim 6, wherein the obtaining a third height of the touch object displayed in the whiteboard application based on the adjustment factor of the whiteboard application, the first height, and a preset value comprises:
Calculating a second quotient of the first height and an adjustment factor applied by the whiteboard;
multiplying the second quotient by the preset value to obtain a third height of the touch object displayed in the whiteboard application.
8. The method of claim 6, wherein the calculating the pixel height of the touch object in the erased area in the whiteboard application based on the third height and the second height comprises:
calculating a second product of the third height and a height pixel amount of the whiteboard application at the current resolution;
dividing the second product by the second height to obtain a pixel height of an erased area of the touch object in the whiteboard application.
9. The method of claim 1, wherein the deriving the erasure area of the erasure area based on the pixel width of the erasure area and the pixel height of the erasure area comprises;
multiplying the pixel width of the erasing area by the pixel height of the erasing area to obtain the erasing area of the erasing area.
10. The method according to claim 1, wherein the method further comprises:
and displaying the erasing area in the whiteboard application, wherein the central point of the erasing area coincides with the central point corresponding to the touch object reported by the control chip.
11. A computing device for an erasure area, the computing device being applied to a terminal device, the terminal device including a control chip and a display screen, and a whiteboard application being installed in the terminal device, the method comprising:
the data acquisition module is used for acquiring a first width and a first height of a touch object on the display screen, and a second width and a second height of the display screen, which are reported by the control chip;
the adjustment coefficient acquisition module is used for acquiring the adjustment coefficient of the whiteboard application;
a first calculating module, configured to calculate a pixel width of an erasing area of the touch object in the whiteboard application based on the first width, the adjustment coefficient of the whiteboard application, and the second width;
a second calculating module, configured to calculate a pixel height of an erasing area of the touch object in the whiteboard application based on the first height, the adjustment coefficient of the whiteboard application, and the second height;
and the erasing area calculation module is used for obtaining the erasing area of the erasing area based on the pixel width of the erasing area and the pixel height of the erasing area.
12. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any of claims 1-10.
13. A display device, characterized by comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1-10.
CN202210119629.2A 2022-02-08 2022-02-08 Method and device for calculating erasing area, storage medium and display device Pending CN116610246A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210119629.2A CN116610246A (en) 2022-02-08 2022-02-08 Method and device for calculating erasing area, storage medium and display device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210119629.2A CN116610246A (en) 2022-02-08 2022-02-08 Method and device for calculating erasing area, storage medium and display device

Publications (1)

Publication Number Publication Date
CN116610246A true CN116610246A (en) 2023-08-18

Family

ID=87682361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210119629.2A Pending CN116610246A (en) 2022-02-08 2022-02-08 Method and device for calculating erasing area, storage medium and display device

Country Status (1)

Country Link
CN (1) CN116610246A (en)

Similar Documents

Publication Publication Date Title
US10373359B2 (en) Method and device for erasing a writing path on an infrared electronic white board, and a system for writing on an infrared electronic white board
US20120092286A1 (en) Synthetic Gesture Trace Generator
US8576230B2 (en) Graph display apparatus, recording medium on which program is recorded, and graph display method
CN107704157B (en) Multi-screen interface operation method and device and storage medium
CN108492349B (en) Processing method, device and equipment for writing strokes and storage medium
CN110443772B (en) Picture processing method and device, computer equipment and storage medium
CN106484388B (en) Method and device for realizing user interface
CN110471609B (en) Text information editing method and device, computer equipment and storage medium
CN113741753A (en) Revocation method, electronic device, storage medium, and computer program product
CN111399952A (en) Method for adjusting layout of application interface, terminal equipment and computer storage medium
CN111223155A (en) Image data processing method, image data processing device, computer equipment and storage medium
CN107391148B (en) View element saving method and device, electronic equipment and computer storage medium
CN111522476B (en) Method, device, computer device and storage medium for monitoring window switching
WO2018228062A1 (en) Application interface display method under split-screen display state and mobile terminal
CN116610246A (en) Method and device for calculating erasing area, storage medium and display device
EP3101527A1 (en) Information processing device, information processing program, and information processing method
US20200057549A1 (en) Analysis device equipped with touch panel device, method for display control thereof, and program
CN113703653A (en) Image processing method, device, equipment and computer readable storage medium
CN112000328B (en) Page visual editing method, device and equipment
CN110162251B (en) Image scaling method and device, storage medium and electronic equipment
CN112306341A (en) Display area moving method and device, storage medium and electronic whiteboard
CN111078112A (en) Terminal device control method and device, computer device and storage medium
CN116188628B (en) Free painting page-crossing drawing and displaying method and server
CN114327208B (en) Legend display method and device, storage medium and terminal
CN115826838A (en) Gesture recognition method and related equipment

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