Whiteboard anti-flicker method and device based on android
1. An anti-flicker method based on an android whiteboard is characterized by comprising the following steps:
determining a painting canvas and locking a display screen of the electronic whiteboard, wherein the display screen is used for displaying the painting result of the canvas;
acquiring related data of a floating window;
making a target canvas by cutting the painting canvas according to the related data;
and unlocking the display screen, and executing a drawing function through the target canvas.
2. The method of claim 1, wherein the obtaining data related to the floating window comprises:
determining a coordinate position corresponding to a suspension window, and acquiring a suspension window outline corresponding to the suspension window;
and determining related data according to the coordinate position and the outline of the floating window.
3. The method of claim 2, wherein said producing a target canvas by cropping the drawing canvas according to the relevant data comprises:
setting a pre-cutting area on the drawing canvas according to the related data;
and manufacturing a target canvas by cutting the pre-cutting area on the drawing canvas.
4. The method of claim 3, wherein prior to making a target canvas by clipping the pre-clip area on the drawing canvas, the method further comprises:
judging whether the pre-cutting area is consistent with the current cutting area;
and if not, resetting the drawing canvas.
5. The method according to any one of claims 1 to 4, wherein prior to the determining the drawing canvas, the method further comprises:
calculating the screen size of a display screen;
the determining of the drawing canvas comprises:
and determining a drawing canvas according to the screen size.
6. An anti-flicker device for an android-based whiteboard, comprising:
the electronic whiteboard comprises a determining/locking unit, a display unit and a control unit, wherein the determining/locking unit is used for determining a drawing canvas and locking a display screen of the electronic whiteboard, and the display screen is used for displaying the drawing result of the canvas;
the acquisition unit is used for acquiring related data of the floating window;
a making unit for making a target canvas by cutting the painting canvas according to the related data;
and the unlocking/drawing unit is used for unlocking the display screen and executing a drawing function through the target canvas.
7. The apparatus of claim 6, wherein the obtaining unit comprises:
the determining/obtaining module is used for determining the coordinate position corresponding to the suspension window and obtaining the suspension window outline corresponding to the suspension window;
and the determining module is used for determining related data according to the coordinate position and the outline of the floating window.
8. The apparatus of claim 7, wherein the production unit comprises:
the setting module is used for setting a pre-cutting area on the drawing canvas according to the related data;
and the manufacturing module is used for manufacturing the target canvas by cutting the pre-cutting area on the drawing canvas.
9. The apparatus of claim 8, further comprising:
the judging unit is used for judging whether the pre-cutting area is consistent with the current cutting area;
and the resetting unit is used for resetting the drawing canvas when the judging unit determines that the pre-cutting area is inconsistent with the current cutting area.
10. The apparatus of any one of claims 6 to 9, further comprising:
a calculation unit for calculating a screen size of a display screen;
the determining/locking unit is also used for determining the drawing canvas according to the screen size.
Background
The development of the technology makes the blackboard transit into a white board; electronic whiteboards are now widely used in various touch writing combos. In the prior art, in order to enable an electronic whiteboard to achieve better writing experience, a whiteboard acceleration scheme is generally used, and the electronic whiteboard controls a mechanism for refreshing the display memory content to improve writing performance and achieve better fluency. However, the display content is directly operated through a whiteboard acceleration mechanism, when a writing track on the electronic whiteboard crosses other suspension window controls covering the whiteboard interface, the whole rectangle background in the area where the suspension window is located is obtained, and the whole rectangle is mapped by the smallest unit rectangle, so that the electronic whiteboard has a more obvious sawtooth effect when the writing track crosses the other suspension window controls covering the whiteboard interface.
Disclosure of Invention
The application provides an android-based whiteboard anti-flicker method and device, because the electronic whiteboard draws by using the target canvas manufactured according to the outline of the suspension window, the writing tracks of other suspension window controls which are covered on a whiteboard interface are not displayed when the electronic whiteboard is displayed, and the sawtooth effect is avoided.
The application provides an anti-flicker method based on an android whiteboard in a first aspect, which comprises the following steps:
determining a painting canvas and locking a display screen of the electronic whiteboard, wherein the display screen is used for displaying the painting result of the canvas;
acquiring related data of a floating window;
making a target canvas by cutting the painting canvas according to the related data;
and unlocking the display screen, and executing a drawing function through the target canvas.
Optionally, the acquiring the relevant data of the floating window includes:
determining a coordinate position corresponding to a suspension window, and acquiring a suspension window outline corresponding to the suspension window;
and determining related data according to the coordinate position and the outline of the floating window.
Optionally, the manufacturing the target canvas by cutting the drawing canvas according to the related data includes:
setting a pre-cutting area on the drawing canvas according to the related data;
and manufacturing a target canvas by cutting the pre-cutting area on the drawing canvas.
Optionally, before the target canvas is manufactured by cutting the pre-cut area on the drawing canvas, the method further includes:
judging whether the pre-cutting area is consistent with the current cutting area;
and if not, resetting the drawing canvas.
Optionally, before determining the drawing canvas, the method further includes:
calculating the screen size of a display screen;
the determining of the drawing canvas comprises:
and determining a drawing canvas according to the screen size.
The application provides a device for preventing flicker based on android whiteboard in a second aspect, which includes:
the electronic whiteboard comprises a determining/locking unit, a display unit and a control unit, wherein the determining/locking unit is used for determining a drawing canvas and locking a display screen of the electronic whiteboard, and the display screen is used for displaying the drawing result of the canvas;
the acquisition unit is used for acquiring related data of the floating window;
a making unit for making a target canvas by cutting the painting canvas according to the related data;
and the unlocking/drawing unit is used for unlocking the display screen and executing a drawing function through the target canvas.
Optionally, the obtaining unit includes:
the determining/obtaining module is used for determining the coordinate position corresponding to the suspension window and obtaining the suspension window outline corresponding to the suspension window;
and the determining module is used for determining related data according to the coordinate position and the outline of the floating window.
Optionally, the manufacturing unit includes:
the setting module is used for setting a pre-cutting area on the drawing canvas according to the related data;
and the manufacturing module is used for manufacturing the target canvas by cutting the pre-cutting area on the drawing canvas.
Optionally, the apparatus further comprises:
the judging unit is used for judging whether the pre-cutting area is consistent with the current cutting area;
and the resetting unit is used for resetting the drawing canvas when the judging unit determines that the pre-cutting area is inconsistent with the current cutting area.
Optionally, the apparatus further comprises:
a calculation unit for calculating a screen size of a display screen;
the determining/locking unit is also used for determining the drawing canvas according to the screen size.
The third aspect of the present application provides an anti-flicker device for whiteboard based on android, including:
a processor, a memory, an input-output device, and a bus; the processor is connected with the memory, the input and output device and the bus.
The processor performs the following operations:
determining a painting canvas and locking a display screen of the electronic whiteboard, wherein the display screen is used for displaying the painting result of the canvas;
acquiring related data of a floating window;
making a target canvas by cutting the painting canvas according to the related data;
and unlocking the display screen, and executing a drawing function through the target canvas.
The present application provides a computer-readable storage medium having a program stored thereon, the program being executed on a computer to perform the aforementioned acceleration method.
From the above techniques: before using an electronic whiteboard for drawing, determining a drawing canvas, and locking a display screen of the electronic whiteboard, wherein the display screen is used for displaying a drawing result of the canvas; then acquiring related data of the floating window; further making a target canvas by cutting the drawing canvas according to the related data; and unlocking the display screen, and executing a drawing function through the target canvas. Because the electronic whiteboard draws by using the target canvas manufactured according to the outline of the suspension window, the writing tracks of other suspension window controls which are covered on the whiteboard interface are not displayed when the electronic whiteboard is displayed, and the sawtooth effect is avoided.
Drawings
FIG. 1 is a schematic flow chart of an embodiment of a whiteboard anti-flicker based on android;
FIG. 2 is a flowchart illustrating a method for preventing flicker of a whiteboard based on android according to another embodiment;
FIG. 3 is a schematic structural diagram of an embodiment of an anti-flicker device for an android-based whiteboard;
fig. 4 is a schematic structural diagram of another embodiment of an android whiteboard anti-flicker-based device.
Detailed Description
The application provides an android-based whiteboard anti-flicker method and device, because the electronic whiteboard draws by using the target canvas manufactured according to the outline of the suspension window, the writing tracks of other suspension window controls which are covered on a whiteboard interface are not displayed when the electronic whiteboard is displayed, and the sawtooth effect is avoided.
Referring to fig. 1, an embodiment of a method for preventing flicker based on an android whiteboard in the embodiment of the present application includes:
101. determining a painting canvas, and locking a display screen of the electronic whiteboard, wherein the display screen is used for displaying the painting result of the canvas;
in this embodiment, since the electronic whiteboard is used for drawing, a drawing canvas for drawing needs to be determined before drawing using the electronic whiteboard; and because the target canvas of this embodiment is not yet determined, so before the target canvas is determined, the memory control needs to be locked, the system is not allowed to actively refresh the electronic drawing whiteboard, that is, the system locks the display screen of the electronic whiteboard, and the display screen is used for displaying the canvas drawing result.
102. Acquiring related data of a floating window;
in this embodiment, in a state where the electronic whiteboard is required to be used for drawing while the floating window exists on the electronic whiteboard, relevant data of the floating window needs to be acquired, and the relevant data is used to determine a corresponding position of the floating window. After the position of the floating window is determined, the corresponding position of the floating window on the drawing canvas is determined according to the position of the floating window.
103. Making a target canvas by cutting the painting canvas according to the relevant data;
after determining the corresponding position of the floating window on the drawing canvas according to the relevant data, in order to avoid the sawtooth effect when the writing track crosses the floating window, in this embodiment, the corresponding position of the pair of floating windows on the drawing canvas is directly cut, and the canvas formed after cutting is used as the target canvas.
When the painting canvas is cut, the painting canvas can be cut in an overlay mode, wherein the overlay mode is that the canvas at the position is overlaid, so that the painting can not be carried out at the position; the cutting can also be carried out in a hidden mode, namely, the writing track crossing the floating window is directly hidden.
In this embodiment, tailor the drawing canvas and can use the overlay mode of tailorring to carry out the canvas and tailor, can also use hidden mode to carry out the canvas and tailor, do not specifically limit here specifically.
104. The display screen is unlocked and the drawing function is performed by the target canvas.
After the target canvas is determined, drawing can be performed on the white target canvas, and when the target canvas is used for drawing, the display screen needs to be unlocked, so that a writing track can be displayed during drawing; at this time, the writing trace on the target whiteboard can be displayed on the electronic whiteboard by using the display screen.
Before using the electronic whiteboard for drawing, determining a drawing canvas, and locking a display screen of the electronic whiteboard, wherein the display screen is used for displaying a drawing result of the canvas; then acquiring related data of the floating window; further, a target canvas is manufactured by cutting the painting canvas according to the related data; the display screen is unlocked and the drawing function is performed by the target canvas. Because the electronic whiteboard draws by using the target canvas manufactured according to the outline of the suspension window, the writing tracks of other suspension window controls which are covered on the whiteboard interface are not displayed when the electronic whiteboard is displayed, and the sawtooth effect is avoided.
Referring to fig. 2, another embodiment of the method for preventing flicker based on an android whiteboard in the embodiment of the present application includes:
201. calculating the screen size of a display screen;
in order to make the drawing space of the drawing canvas as large as possible, and to be attached to the display screen, before the drawing canvas is determined, the screen size of the electronic whiteboard display screen is calculated firstly, specifically: determining the vertex coordinate of the upper left corner of the electronic whiteboard display screen, determining the vertex coordinate of the upper right corner of the electronic whiteboard display screen, and determining the length of the electronic whiteboard display screen according to the vertex coordinate of the upper left corner and the vertex coordinate of the upper right corner; further determining the vertex coordinates of the lower left corner of the electronic whiteboard display screen; and determining the width of the display screen of the electronic whiteboard according to the vertex coordinates of the upper left corner and the vertex coordinates of the lower left corner, and finally determining the screen size of the display screen according to the length and the width of the display screen.
In this embodiment, the length of the electronic whiteboard display screen may be determined according to the top left corner vertex coordinate and the top right corner vertex coordinate, and the length of the electronic whiteboard display screen may also be determined according to the bottom left corner vertex coordinate and the bottom right corner vertex coordinate, which is not specifically limited herein.
In this embodiment, the width of the electronic whiteboard display screen may be determined according to the vertex coordinates of the upper left corner and the lower left corner, and the width of the electronic whiteboard display screen may also be determined according to the vertex coordinates of the upper right corner and the lower right corner, which is not specifically limited herein.
In this embodiment, the screen size of the display screen may be determined according to the length and the width of the display screen, and the screen size of the display screen may also be calculated according to a line segment formed by connecting the top-left corner vertex and the bottom-right corner vertex and the top-right corner vertex, which is not specifically limited herein.
202. Determining a painting canvas according to the size of the screen, and locking a display screen of the electronic whiteboard, wherein the display screen is used for displaying the painting result of the painting canvas;
after the screen size of electronic whiteboard display screen is confirmed, the size of the drawing canvas and the position of the drawing canvas are set according to the screen size, so that the drawing canvas is attached to the display screen, and the drawing canvas is larger in drawing space. In this embodiment, before the target canvas is determined, in order to make the system not actively refresh the electronic drawing whiteboard, the display screen is locked, and the display screen is used for displaying the canvas drawing result.
203. Determining a coordinate position corresponding to the suspension window, and acquiring a suspension window outline corresponding to the suspension window;
in this embodiment, when there is the suspension window on whiteboard and need use whiteboard to draw the state, need obtain the position that the suspension window corresponds and the suspension window profile that this suspension window corresponds, specific: acquiring all set points of the suspension window on a display screen, selecting the central points of all the set points as the coordinate positions of the suspension window, selecting all the edge points of all the set points as the contour points of the suspension window, and determining the contour of the suspension window corresponding to the suspension window according to the contour points of the suspension window.
204. Determining related data according to the coordinate position and the outline of the floating window;
after determining the coordinate position and the floating window profile of the floating window, the coordinate position and the floating window profile of the floating window are determined in combination as the relevant data of the floating window, and the relevant data is used for providing a data dependence basis for forming a corresponding floating window area.
205. Setting a pre-cutting area on the drawing canvas according to the relevant data;
in the embodiment, after the relevant data is determined, the corresponding cutting coordinate position of the floating window on the drawing canvas and the corresponding cutting outline are determined according to the relevant data; a pre-clipping region on the drawing canvas is further determined based on the clipping coordinate location and the clipping outline. The pre-clipping region is used for providing a clipping data base according to the drawing canvas for manufacturing the target canvas.
206. Judging whether the pre-cutting area is consistent with the current cutting area; if not, go to step 207; if yes, go to step 209;
in order to improve the cutting efficiency, whether the pre-cutting area is consistent with the current cutting area or not is judged, when the pre-cutting area is consistent with the current cutting area, the pre-cutting area is shown to be cut, at the moment, the canvas does not need to be cut again, and the current canvas can be directly used as the target canvas; when the pre-clipping region is not consistent with the current clipping region, the pre-clipping region is not clipped, and the part of the canvas which does not need to be clipped may exist and is already clipped.
207. Resetting the drawing canvas;
when it is determined that the pre-clipping region has not been clipped and that there may be portions of the canvas that do not require clipping that have already been clipped, the drawing canvas needs to be reset in order to determine the integrity of the drawing canvas so that all regions of the drawing canvas are completed.
In this embodiment, the resetting of the drawing canvas may be to reset the whole drawing canvas, or may be to reset only the area of the drawing canvas that has been cut, which is not specifically limited herein.
208. Manufacturing a target canvas by cutting a pre-cutting area on the drawing canvas;
the drawing canvas is a complete drawing canvas after being reset, at the moment, the pre-cutting area is cut on the complete drawing canvas, and the drawing canvas after being cut is used as a target canvas.
In the present embodiment, the result of cutting out the pre-cut region on the drawing canvas is to cause the writing locus beyond the floating window not to be displayed on the display screen when the writing locus crosses the floating window at the time of drawing using the electronic whiteboard.
209. The display screen is unlocked and the drawing function is performed by the target canvas.
Step 209 in this embodiment is similar to step 104 in the previous embodiment, and is not described herein again.
Referring to fig. 3, an embodiment of the device for preventing flicker based on an android whiteboard in the embodiment of the present application includes:
a determining/locking unit 301, configured to determine a drawing canvas, and lock a display screen of the electronic whiteboard, where the display screen is used to display a drawing result of the canvas;
an obtaining unit 302, configured to obtain relevant data of the floating window;
a making unit 303 for making a target canvas by cutting the drawing canvas according to the related data;
and an unlocking/drawing unit 304 for unlocking the display screen and performing a drawing function through the target canvas.
The acquiring unit 302 in this embodiment may include a determining/acquiring module 3021 and a determining module 3022.
A determining/obtaining module 3021, configured to determine a coordinate position corresponding to the floating window and obtain a floating window profile corresponding to the floating window;
a determining module 3022, configured to determine relevant data according to the coordinate position and the floating window profile.
In this embodiment, the manufacturing unit 303 may include a setting module 3031 and a manufacturing module 3032.
A setting module 3031, configured to set a pre-clipping region on the drawing canvas according to the related data;
a making module 3032 is configured to make the target canvas by cutting the pre-cut region on the drawing canvas.
In this embodiment, the apparatus may further include:
a judging unit 305 configured to judge whether the pre-clipping region is consistent with the current clipping region;
a resetting unit 306 for resetting the drawing canvas when the judging unit 305 determines that the pre-clipping region is not consistent with the current clipping region;
and an unlocking/drawing unit 304, which is further used for unlocking the display screen and executing the drawing function through the target canvas when the judging unit 305 determines that the pre-clipping area is consistent with the current clipping area.
In this embodiment, the apparatus further includes:
a calculation unit 307 for calculating a screen size of the display screen;
a determination/locking unit 301 for determining the drawing canvas according to the screen size.
In this embodiment, the calculating unit 307 calculates the screen size of the display screen and sends the screen size to the determining/locking unit 301, and the determining/locking unit 301 determines the drawing canvas according to the screen size and locks the display screen of the electronic whiteboard, the display screen being used for displaying the canvas drawing result; after determining the drawing canvas, the determining/obtaining module 3021 determines a coordinate position corresponding to the floating window and obtains a floating window profile corresponding to the floating window; then the determining module 3022 determines the relevant data according to the coordinate position and the floating window outline, and sends the relevant data to the setting module 3031, and the setting module 3031 sets the pre-clipping region on the drawing canvas according to the relevant data; after determining the pre-trimming area, the judgment unit 305 judges whether the pre-trimming area coincides with the current trimming area; when the judgment unit 305 determines that the pre-clipping region coincides with the current clipping region, the unlocking/drawing unit 304 unlocks the display screen and performs a drawing function through the target canvas; when the determination unit 305 determines that the pre-clipping region does not coincide with the current clipping region, the resetting unit 306 resets the drawing canvas. After resetting the drawing canvas, the fabrication module 3032 fabricates the target canvas by clipping a pre-clipping region on the drawing canvas; finally, the unlocking/drawing unit 304 is used to unlock the display screen and perform the drawing function through the target canvas.
Referring to fig. 4, the detailed description of the anti-flicker apparatus based on the android whiteboard in the embodiment of the present application is provided below, where another embodiment of the anti-flicker apparatus based on the android whiteboard in the embodiment of the present application includes:
a processor 401, a memory 402, an input-output unit 403, a bus 404;
the processor 401 is connected to the memory 402, the input/output unit 403, and the bus 404;
processor 401 performs the following operations:
determining a drawing canvas, and locking a display screen of the electronic whiteboard, wherein the display screen is used for displaying the drawing result of the canvas;
acquiring related data of a floating window;
making a target canvas by cutting the painting canvas according to the relevant data;
the display screen is unlocked and the drawing function is performed by the target canvas.
In this embodiment, the functions of the processor 401 are similar to those of the steps in the embodiments shown in fig. 1 to fig. 2, and are not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:输入方法、装置和机器可读介质