CN116136721A - Delay-free line drawing display method, device, equipment and storage medium - Google Patents

Delay-free line drawing display method, device, equipment and storage medium Download PDF

Info

Publication number
CN116136721A
CN116136721A CN202111341323.3A CN202111341323A CN116136721A CN 116136721 A CN116136721 A CN 116136721A CN 202111341323 A CN202111341323 A CN 202111341323A CN 116136721 A CN116136721 A CN 116136721A
Authority
CN
China
Prior art keywords
position information
touch
preset
canvas
memory
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
CN202111341323.3A
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.)
Jiangsu TSD Electronics Technology Co Ltd
Original Assignee
Jiangsu TSD Electronics Technology 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 Jiangsu TSD Electronics Technology Co Ltd filed Critical Jiangsu TSD Electronics Technology Co Ltd
Priority to CN202111341323.3A priority Critical patent/CN116136721A/en
Publication of CN116136721A publication Critical patent/CN116136721A/en
Pending legal-status Critical Current

Links

Images

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/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03547Touch pads, in which fingers can move on a surface
    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention relates to the field of data processing, in particular to a method, a device, equipment and a storage medium for drawing and displaying a delay-free line, which comprise the following steps: receiving a touch action of the touch display device, and storing position information of a pixel point of the touch action into a circulation buffer area with a preset size; when the space of the circulation buffer area is full or new position information is not received at a preset time interval, the position information stored in the circulation buffer area is read, and the color of a target pixel point on a preset memory canvas is set to be a preset color based on the read position information, so that a display pattern is formed; wherein the position of the target pixel point corresponds to the position information; and displaying the display pattern on the memory canvas on the touch display device. The number of times of displaying the display pattern on the display window is greatly reduced, so that the time loss can be reduced, the occurrence of a delay phenomenon is avoided, and the operation experience of a user is improved.

Description

Delay-free line drawing display method, device, equipment and storage medium
Technical Field
The invention relates to the field of data processing, in particular to a delay-free line drawing display method, a delay-free line drawing display device, delay-free line drawing display equipment and a storage medium.
Background
The development of touch technology has led to users not being satisfied with simple interactions with terminal devices, but also hoped to more conveniently handle life and work matters by means of terminal devices. For example, writing, drawing, etc. are performed on the touch display device.
When a user uses the terminal equipment to write or draw, the terminal equipment draws on the memory canvas after receiving the data of each point on the touch display, and copies the content on the memory canvas to the display window to be presented to the user. Because copying the content on the memory canvas to the display window is time-consuming, a delay phenomenon often occurs when writing or drawing operations are performed, resulting in poor user operation experience.
Disclosure of Invention
Therefore, the invention aims to solve the technical problem that a delay phenomenon often occurs when writing or drawing and other operations are performed, and provides a delay-free line drawing display method for displaying a pattern corresponding to a touch screen action received by a touch display device, which comprises the following steps:
receiving a touch action of the touch display device, and storing position information of a pixel point of the touch action into a circulation buffer area with a preset size;
when the space of the circulation buffer area is full or new position information is not received at a preset time interval, the position information stored in the circulation buffer area is read, and the color of a target pixel point on a preset memory canvas is set to be a preset color based on the read position information, so that a display pattern is formed; wherein the position of the target pixel point corresponds to the position information;
and displaying the display pattern on the preset memory canvas on the touch display device.
Preferably, the receiving the touch action on the touch display device and saving the position information of the pixel point of the touch action to a circulation buffer area with a preset size includes:
the method comprises the steps that a receiving thread receives touch actions of the touch display equipment, and position information of pixel points of the touch actions is stored in a circulation buffer area with a preset size;
the reading the position information stored in the circulation buffer area, setting the color of the target pixel point on the preset memory canvas as a preset color based on the read position information, forming a display pattern, and comprising:
and the drawing thread reads the position information stored in the circulating buffer zone, and sets the color of the target pixel point on the preset memory canvas as a preset color based on the read position information to form a display pattern.
Preferably, the displaying the display pattern on the preset memory canvas on the touch display device includes:
and displaying the display pattern on the preset memory canvas on the touch display device by using a bitblt function, an XCopyArea function or a StretchBlt function.
Preferably, the displaying the display pattern on the preset memory canvas on the touch display device by using a bitblt function, an XCopyArea function or a stratchblt function includes:
and correspondingly displaying the display pattern on the preset memory canvas on the touch display device by using a bitblt function, an XCopyArea function or a StretchBlt function.
Preferably, the method further comprises: after the position information stored in the circulating buffer area is read, the position information of the circulating buffer area is emptied;
and receiving the touch action of the touch display equipment again, and storing the position information of the pixel points of the touch action into a circulation buffer area.
Preferably, the receiving the touch action on the touch display device and saving the position information of the pixel point of the touch action to a circulation buffer area with a preset size includes:
the pixel point position information corresponding to the touch action is obtained by calling a GetRawInputData function or a read function once through a preset cache;
analyzing the pixel position information and storing the pixel position information in the circulating buffer area with the preset size.
The invention also provides a delay-free line drawing display device for displaying the pattern corresponding to the touch screen action received by the touch display device, comprising:
the receiving and storing module is used for receiving the touch action of the touch display equipment and storing the position information of the pixel points of the touch action into a circulating buffer area with a preset size;
the reading and drawing module is used for reading the position information stored in the circulation buffer area when the space of the circulation buffer area is filled or the new position information is not received at a preset time interval, and setting the color of a target pixel point on a preset memory canvas to be a preset color based on the read position information to form a display pattern; wherein the position of the target pixel point corresponds to the position information;
and the display module is used for displaying the display pattern on the preset memory canvas on the touch display device.
Preferably, the receiving and storing module receives a touch action on the touch display device by using a receiving thread, and stores position information of a pixel point of the touch action into a circulating buffer zone with a preset size;
and the reading and drawing module reads the position information stored in the circulation buffer area by utilizing a drawing thread, and sets the color of a target pixel point on a preset memory canvas as a preset color based on the read position information to form a display pattern.
Preferably, the display module displays the display pattern on the preset memory canvas on the touch display device by using a bitblt function, an XCopyArea function or a stratchblt function.
The present invention also provides a computer device comprising: the system comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions so as to execute the delay-free line drawing display method.
The present invention also provides a computer-readable storage medium storing computer instructions for causing a computer to execute the above-described delay-free line drawing display method.
The technical scheme of the invention has the following advantages:
according to the delay-free line drawing display method provided by the invention, pixel point position information corresponding to the touch action of the touch display device is stored in the circulation buffer zone, when the space of the circulation buffer zone is filled or the circulation buffer zone does not receive new position information in a preset time interval, the position information in the circulation buffer zone is read, the color of a target pixel point on a preset memory canvas is set to be a preset color based on the read position information, so that a display pattern is formed, and the formed display pattern is displayed on the touch display device. The number of times of displaying the display pattern on the display window is greatly reduced, so that the time loss can be reduced, the occurrence of a delay phenomenon is avoided, and the operation experience of a user is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for displaying a delay-free line drawing in embodiment 1 of the present invention;
fig. 2 is a schematic diagram of a structure of drawing lines on a display window in the delay-free line drawing display method of embodiment 1 of the present invention;
fig. 3 is a block diagram of a delay-free line drawing display device according to embodiment 2 of the present invention;
fig. 4 is a schematic block diagram of a computer device according to embodiment 3 of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the present invention, it should be noted that the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, the technical features of the different embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
And the development of touch technology greatly improves the interactive experience of the user and the terminal equipment. In particular, the application of capacitive screens to terminal devices, so that users are no longer satisfied with simple interactions with the terminal devices, but are also willing to handle life, work, etc. more conveniently by means of the terminal devices. For example writing and/or drawing etc. on the terminal device.
In the prior art, delay often occurs when writing and/or drawing is performed on a terminal device. For example, when writing on the terminal device, the speed of displaying words on the display window of the terminal device is significantly slower than the speed of writing on the terminal device by the user, thereby seriously affecting the user experience.
Example 1
In this embodiment, fig. 1 is a flowchart illustrating a method for receiving a touch action of a touch display device, storing position information of a pixel point corresponding to the touch action in a circulation buffer area, reading and drawing a display pattern based on the position information in the circulation buffer area, and displaying the display pattern on the touch display device according to some embodiments of the present invention. While the processes described below include a number of operations that occur in a particular order, it should be clearly understood that the processes may include more or less operations that may be performed sequentially or in parallel (e.g., using a parallel processor or a multi-threaded environment).
The embodiment provides a delay-free line drawing display method, which is used for displaying a pattern corresponding to a touch screen action received by a touch display device, for example, a user writes a word on a display window of the touch display device, and the touch display device displays the corresponding word on the display window. The touch display device can adopt a capacitive screen or an electromagnetic screen, and the touch display device is a human-computer interaction device, including but not limited to terminal devices such as a smart phone, a smart watch, a tablet personal computer, a notebook computer and the like. As shown in fig. 1, the delay-free line drawing display method includes the following steps:
s101, receiving touch actions of the touch display device, and storing position information of pixel points of the touch actions into a circulation buffer area with a preset size.
In the implementation step, the user may interact with the touch display device using a medium such as a finger, a stylus, a capacitive pen, a mouse, an electromagnetic pen, etc., where the electromagnetic pen, the stylus, and the capacitive pen refer to external devices capable of interacting on a display window of the touch display device. For example, writing and/or drawing is performed on a display window of a tablet computer using a capacitive pen. It should be noted that the touch display device may be a display device with a processor, such as a mobile phone, a tablet computer, a notebook computer, etc.; the touch display device may also be a device having only a touch display function, where the touch display device needs to be connected to a device having a processor to implement a data processing and display function, where the processor may be a device such as a desktop computer.
In some embodiments, the user, while interacting with the touch display device, may make contact with, i.e., perform a touch action (i.e., a touch screen action) on, the display window of the touch display device to draw lines on the display window. For example, a user writes a "mouth" word on a tablet computer using a capacitive pen, and the user needs to write on a display window using the capacitive pen as if writing on paper, to draw the lines required for the "mouth" word. The display pattern formed by the lines is understood to be a display pattern formed by writing or drawing.
After the touch display device receives the touch action, the position information of the pixel point corresponding to the touch action in the display window is stored in the circulation buffer area. The size of the circular buffer can be reasonably selected by those skilled in the art according to practical situations, and is not limited herein.
Further, the preset buffer memory can be allocated in advance, after the touch display device receives the touch action, under the windows system, the touch data is obtained by calling the GetRawInputData function only once by using the preset buffer memory, the touch data is pixel point position information corresponding to the touch action, and after the touch data is analyzed, the analyzed data is stored in the circulation buffer area. Compared with the prior art, after each touch action is received, the GetRAwInputData function is called once to obtain the required buffer size, the required buffer is allocated, and the GetRAwInputData function is called for the second time to obtain the coordinate data corresponding to the touch action. Under the linux system, the touch data can be acquired by calling a read function only once by using a preset cache.
As shown in fig. 2, the display window 200 is formed by a plurality of pixel points 201, and after receiving a touch action with the touch display device, the position information of the touch action at the pixel point corresponding to the display window 200 is identified, and the position information is stored in the circular buffer. For example, the user uses a capacitive pen to draw a horizontal line on the display window 200 to form a line 202, and saves the position information of the line 202 corresponding to the pixel point of the display window 200 to the circular buffer.
When the touch display equipment with the processor is used, after the touch action corresponding to the display window is received, the position information of the pixel point of the touch action corresponding to the display window is stored in a circulation buffer area of the touch display equipment; when the touch display device with the touch display function is used, after the touch action corresponding to the display window is received, the position information of the pixel point of the touch action corresponding to the display window is stored in a circulation buffer area of the external processor.
S102, when the space of the circulation buffer area is filled or new position information is not received at a preset time interval, reading the position information stored in the circulation buffer area, and setting the color of a target pixel point on a preset memory canvas to be a preset color based on the read position information to form a display pattern; wherein the position of the target pixel point corresponds to the position information.
In the above embodiment, the circular buffer has the position information of the pixels corresponding to the touch action, and the memory canvas may have the same number and arrangement of the pixels as the display window. And reading the position information stored in the circulation buffer area, determining a target pixel point on a preset memory canvas based on the read position information, and changing the color of the target pixel point on the preset memory canvas into a preset color so as to form a display pattern. The preset color may be selected according to a preset by a user, for example, the user selects black, green, red, blue, etc. in the system in advance. In some embodiments, the number of pixels on the memory canvas may be greater than the number of pixels of the display window, i.e., the size of the memory canvas is greater than the size of the display window.
It should be noted that, when the touch display device itself having the processor is used, the preset memory canvas is the memory canvas of the touch display device itself; when the touch display device with only the touch display function is used, the preset memory canvas is the memory canvas of the external processor.
The method comprises the steps that a circulation buffer area with a preset size is provided with two states of being filled and not being filled, if the circulation buffer area is filled, all position information in the circulation buffer area is read, and drawing of display patterns is conducted on a preset memory canvas based on the read position information; if the circulating buffer area is not filled, but the touch display device does not receive touch action within a preset time interval, namely, no position information is filled into the circulating buffer area any more within the preset time interval, all the position information in the circulating buffer area is read, and drawing of display patterns is carried out on a preset memory canvas based on the read position information.
For example, as shown in fig. 2, the display window 200 has an 8×8 pixel array, and the default memory canvas (not shown) also has an 8×8 pixel array. Drawing a line 202 on the display window 200, wherein the position information of the line 202 corresponds to the pixel points from 'row 4 column 2 to row 4 column 7' in the display window 200, and determining the corresponding position on the memory canvas according to the position information of the line 202, namely determining the target pixel point with the position of 'row 4 column 2 to row 4 column 7' on the preset memory canvas.
And S103, displaying the display pattern on the preset memory canvas on the touch display device.
In the implementation step, the display pattern on the canvas of the preset memory is displayed on the touch display device, that is, the pattern corresponding to the touch screen action of the user is displayed on the display window so as to interact with the user.
Because the display pattern is drawn and displayed on the display window based on the position information of the whole circulation buffer zone or is drawn and displayed on the display window after the circulation buffer zone does not receive new position information within a preset time interval, the refreshing frequency of the display pattern can be reduced, namely the copying frequency of the pattern on the canvas with the preset memory to the display window is reduced. Because copying the patterns on the preset memory canvas to the display window is time-consuming, the number of times of copying the patterns on the preset memory canvas to the display window is reduced, the time loss can be greatly reduced, the occurrence of a delay phenomenon is avoided, and the operation experience of a user is improved.
In the above embodiment, the pixel position information corresponding to the touch action of the touch display device is stored in the circulation buffer, when the space of the circulation buffer is filled or the circulation buffer does not receive new position information in a preset time interval, the position information in the circulation buffer is read, and the color of the target pixel on the preset memory canvas is set to be the preset color based on the read position information, so as to form a display pattern, and the formed display pattern is displayed on the touch display device. The number of times of displaying the display pattern on the display window is greatly reduced, so that the time loss can be reduced, the occurrence of a delay phenomenon is avoided, and the operation experience of a user is improved.
In one or more embodiments, a receiving thread may be used to receive a touch action to the touch display device, and store location information of a pixel point of the touch action to a circular buffer of a preset size; and reading the position information stored in the circular buffer area by using a drawing thread, and setting the color of a target pixel point on a preset memory canvas as a preset color based on the read position information to form a display pattern.
In one or more embodiments, for windows systems, the display pattern on the preset memory canvas may be displayed on the touch display device using a bitblt function or a stratchblt function. For example, after the display pattern is drawn on the preset memory canvas, the display pattern on the preset memory canvas is copied to the display window by using the bitblt function so as to be presented to the user, but because the bitblt function is time-consuming to call, the time for calling the bitblt function can be greatly reduced by adopting the delay-free line drawing display method provided by the embodiment, and the delay is avoided. In some embodiments, for the linux system, the XCopyArea function may be used to display the display pattern on the preset memory canvas on the touch display device.
In one or more embodiments, the display pattern on the preset memory canvas is correspondingly displayed on the touch display device by using a bitblt function, an XCopyArea function or a stratchblt function, that is, the display pattern on the preset memory canvas is displayed at the pixel point position corresponding to the touch action of the display window.
For example, as shown in fig. 2, a line 202 is drawn on the display window 200, where the position of the line 202 corresponds to the pixels of "row 4, column 2 to row 4, column 7" in the display window 200, and after the touch display device finishes drawing the line on the preset memory canvas, the line on the preset memory canvas is presented on the pixels of "row 4, column 2 to row 4, column 7" in the display window 200.
It should be noted that, the user may draw on one touch display device, and the display pattern is displayed on the other touch display device. For example, drawing is performed on a tablet, and a pattern is displayed on a display of a desktop computer.
In one or more embodiments, after the position information stored in the circular buffer is read, the position information of the circular buffer is emptied; and receiving the touch action of the touch display equipment again, and storing the position information of the pixel points of the touch action into a circulation buffer area.
The position information in the circular buffer area can be cleared before being presented to the display window, or can be cleared after being presented to the display window. Those skilled in the art may make reasonable selections according to the actual situation, and are not limited herein.
The delay-free line drawing display method provided by the embodiment can still ensure that the phenomenon of delay does not occur when the window is transparent and/or the mouse event is penetrated.
Example 2
The embodiment provides a display device for drawing a non-delay line, which is used for displaying a pattern corresponding to a touch screen action received by a touch display device, as shown in fig. 3, and includes:
the receiving and storing module 301 is configured to receive a touch action on the touch display device, and store position information of a pixel point of the touch action to a circulation buffer area with a preset size; please refer to the related description of step S101 in embodiment 1 for details, which are not repeated here.
The reading and drawing module 302 is configured to read the position information stored in the circulation buffer when the space of the circulation buffer is full or the new position information is not received at a preset time interval, and set the color of the target pixel point on the preset memory canvas to be a preset color based on the read position information, so as to form a display pattern; wherein the position of the target pixel point corresponds to the position information; please refer to the related description of step S102 in embodiment 1 for details, which are not repeated here.
And the display module 303 is configured to display a display pattern on the preset memory canvas on the touch display device. Please refer to the related description of step S103 in embodiment 1 for details, which are not repeated here.
In the above embodiment, the receiving and storing module 301 stores the pixel location information corresponding to the touch action of the touch display device in the circulation buffer, when the space of the circulation buffer is filled or the circulation buffer does not receive new location information in the preset time interval, the reading and drawing module 302 reads the location information in the circulation buffer, and sets the color of the target pixel on the preset memory canvas to the preset color based on the read location information, thereby forming the display pattern, and the display module 303 displays the formed display pattern on the touch display device. The number of times of displaying the display pattern on the display window is greatly reduced, so that the time loss can be reduced, the occurrence of a delay phenomenon is avoided, and the operation experience of a user is improved.
In one or more embodiments, the receiving storage module 301 receives a touch action on the touch display device by using a receiving thread, and stores position information of a pixel point of the touch action in a circulation buffer area with a preset size; the reading and drawing module 302 reads the position information stored in the circular buffer by using a drawing thread, and sets the color of the target pixel point on the preset memory canvas to a preset color based on the read position information, so as to form a display pattern. For details, please refer to the related description in embodiment 1, and the detailed description is omitted here.
In one or more embodiments, the display module 303 displays the display pattern on the preset memory canvas on the touch display device using a bitblt function, an XCopyArea function, or a stratchblt function. For details, please refer to the related description in embodiment 1, and the detailed description is omitted here.
Example 3
The present embodiment provides a computer device, as shown in fig. 4, which includes a processor 401 and a memory 402, where the processor 401 and the memory 402 may be connected by a bus or other means, and in fig. 4, the connection is exemplified by a bus.
The processor 401 may be a central processing unit (Central Processing Unit, CPU). The processor 401 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), graphics processor (Graphics Processing Unit, GPU), embedded Neural network processor (Neural-network Processing Unit, NPU) or other dedicated deep learning coprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., or a combination of the above.
The memory 402 is used as a non-transitory computer readable storage medium, and may be used to store a non-transitory software program, a non-transitory computer executable program, and modules, such as program instructions/modules (e.g., the receiving storage module 301, the reading drawing module 302, and the display module 303 shown in fig. 3) corresponding to the delay-free line drawing display method in the embodiment of the invention. The processor 401 executes various functional applications of the processor and data processing by running non-transitory software programs, instructions, and modules stored in the memory 402, that is, implements the delay-free line drawing display method in the above-described method embodiment 1.
Memory 402 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created by the processor 401, or the like. In addition, memory 402 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, such remote memory being connectable to processor 401 through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 402, which when executed by the processor 401, performs the delay-free line drawing display method in the embodiment shown in fig. 1.
In this embodiment, the memory 402 stores program instructions or modules of the delay line drawing display method, and when the processor 401 executes the program instructions or modules stored in the memory 402, the processor saves pixel position information corresponding to a touch action of the touch display device to the circular buffer, reads the position information in the circular buffer when the space of the circular buffer is filled or the circular buffer does not receive new position information in a preset time interval, and sets the color of a target pixel on a preset memory canvas to a preset color based on the read position information, thereby forming a display pattern, and displays the formed display pattern on the touch display device. The number of times of displaying the display pattern on the display window is greatly reduced, so that the time loss can be reduced, the occurrence of a delay phenomenon is avoided, and the operation experience of a user is improved.
The embodiment of the invention also provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions can execute the delay-free line drawing display method in any of the method embodiments. Wherein the storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
It is apparent that the above examples are given by way of illustration only and are not limiting of the embodiments. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. While still being apparent from variations or modifications that may be made by those skilled in the art are within the scope of the invention.

Claims (10)

1. The delay-free line drawing display method is used for displaying a pattern corresponding to a touch screen action received by touch display equipment, and is characterized by comprising the following steps of:
receiving a touch action of the touch display device, and storing position information of a pixel point of the touch action into a circulation buffer area with a preset size;
when the space of the circulation buffer area is full or new position information is not received at a preset time interval, the position information stored in the circulation buffer area is read, and the color of a target pixel point on a preset memory canvas is set to be a preset color based on the read position information, so that a display pattern is formed; wherein the position of the target pixel point corresponds to the position information;
and displaying the display pattern on the preset memory canvas on the touch display device.
2. The method for displaying a line drawing without delay according to claim 1, wherein the steps of receiving a touch action to the touch display device and storing position information of a pixel point of the touch action in a circulation buffer of a preset size include:
the method comprises the steps that a receiving thread receives touch actions of the touch display equipment, and position information of pixel points of the touch actions is stored in a circulation buffer area with a preset size;
the reading the position information stored in the circulation buffer area, setting the color of the target pixel point on the preset memory canvas as a preset color based on the read position information, forming a display pattern, and comprising:
and the drawing thread reads the position information stored in the circulating buffer zone, and sets the color of the target pixel point on the preset memory canvas as a preset color based on the read position information to form a display pattern.
3. The method for displaying the delay-free line drawing of claim 1 or 2, wherein displaying the display pattern on the preset memory canvas on the touch display device comprises:
and displaying the display pattern on the preset memory canvas on the touch display device by using a bitblt function, an XCopyArea function or a StretchBlt function.
4. The method for displaying the delay-free line drawing of claim 3, wherein displaying the display pattern on the preset memory canvas on the touch display device using a bitblt function, an XCopyArea function, or a stratchblt function comprises:
and correspondingly displaying the display pattern on the preset memory canvas on the touch display device by using a bitblt function, an XCopyArea function or a StretchBlt function.
5. A delay-free line drawing display method of any one of claims 1-4, further comprising:
after the position information stored in the circulating buffer area is read, the position information of the circulating buffer area is emptied;
and receiving the touch action of the touch display equipment again, and storing the position information of the pixel points of the touch action into a circulation buffer area.
6. The method for displaying a line drawing without delay according to any one of claims 1 to 5, wherein the steps of receiving a touch action to the touch display device and storing position information of a pixel point of the touch action in a circulation buffer of a preset size include:
the pixel point position information corresponding to the touch action is obtained by calling a GetRawInputData function or a read function once through a preset cache;
analyzing the pixel position information and storing the pixel position information in the circulating buffer area with the preset size.
7. A delay-free line drawing display apparatus for displaying a pattern corresponding to a touch screen action received by a touch display device, comprising:
the receiving and storing module is used for receiving the touch action of the touch display equipment and storing the position information of the pixel points of the touch action into a circulating buffer area with a preset size;
the reading and drawing module is used for reading the position information stored in the circulation buffer area when the space of the circulation buffer area is filled or the new position information is not received at a preset time interval, and setting the color of a target pixel point on a preset memory canvas to be a preset color based on the read position information to form a display pattern; wherein the position of the target pixel point corresponds to the position information;
and the display module is used for displaying the display pattern on the preset memory canvas on the touch display device.
8. The delay-free line drawing display apparatus of claim 7, wherein the receiving storage module receives a touch action to the touch display device by using a receiving thread and stores position information of a pixel point of the touch action to a circulation buffer region of a preset size;
and the reading and drawing module reads the position information stored in the circulation buffer area by utilizing a drawing thread, and sets the color of a target pixel point on a preset memory canvas as a preset color based on the read position information to form a display pattern.
9. A computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the delay-free line drawing display method of any one of claims 1-6.
10. A computer-readable storage medium storing computer instructions for causing a computer to execute the delay-free line drawing display method according to any one of claims 1 to 6.
CN202111341323.3A 2021-11-12 2021-11-12 Delay-free line drawing display method, device, equipment and storage medium Pending CN116136721A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111341323.3A CN116136721A (en) 2021-11-12 2021-11-12 Delay-free line drawing display method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111341323.3A CN116136721A (en) 2021-11-12 2021-11-12 Delay-free line drawing display method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116136721A true CN116136721A (en) 2023-05-19

Family

ID=86332476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111341323.3A Pending CN116136721A (en) 2021-11-12 2021-11-12 Delay-free line drawing display method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116136721A (en)

Similar Documents

Publication Publication Date Title
CN111651079B (en) Handwriting display method, device, equipment and computer storage medium
CN107515759B (en) Screen capture method and device, electronic equipment and readable storage medium
CN110597444B (en) Handwriting display method and device, terminal device and storage medium
CN107251004B (en) Backward compatibility by using spoofed clocks and fine-grained frequency control
EP3805908A1 (en) Annotation display method, device and apparatus, and storage medium
US20210263644A1 (en) Multipage display on a computing device
CN103455292A (en) Business data display and processing method and device and user equipment
US11398065B2 (en) Graphic object modifications
US20210264648A1 (en) Graphics rendering
CN107203434A (en) A kind of texture shared method, device and computer-readable recording medium
CN112783346A (en) Handwriting data processing method and system, computer equipment and storage medium
CN103257735A (en) Stroke presentation method for handwriting input and electronic device
CN111949156A (en) Chinese character writing test method and system of writing device and writing device
CN108509241B (en) Full-screen display method and device for image and mobile terminal
CN113282214A (en) Stroke rendering method, device, storage medium and terminal
US10140680B2 (en) Hardware-accelerated resource tiling
CN107391148B (en) View element saving method and device, electronic equipment and computer storage medium
CN112783595A (en) Display method and device for interactive writing and electronic equipment
CN107015726A (en) A kind of multidate information methods of exhibiting and device
WO2020211029A1 (en) Note redrawing method, writing device, and storage medium
CN116136721A (en) Delay-free line drawing display method, device, equipment and storage medium
CN111460342A (en) Page rendering display method and device, electronic equipment and computer storage medium
CN116136734A (en) Delay-free line drawing display method, device, equipment and storage medium
KR20100084338A (en) Method and apparatus for image drawing
US9904665B2 (en) Partial rasterization of web page tiles

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