CN112506372B - Graffiti spray drawing method and device based on touch screen and storage medium - Google Patents

Graffiti spray drawing method and device based on touch screen and storage medium Download PDF

Info

Publication number
CN112506372B
CN112506372B CN202011375977.3A CN202011375977A CN112506372B CN 112506372 B CN112506372 B CN 112506372B CN 202011375977 A CN202011375977 A CN 202011375977A CN 112506372 B CN112506372 B CN 112506372B
Authority
CN
China
Prior art keywords
range
touch
touch screen
spraying
coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011375977.3A
Other languages
Chinese (zh)
Other versions
CN112506372A (en
Inventor
王添
唐涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Lango Electronic Science and Technology Co Ltd
Original Assignee
Guangzhou Lango Electronic Science and 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 Guangzhou Lango Electronic Science and Technology Co Ltd filed Critical Guangzhou Lango Electronic Science and Technology Co Ltd
Priority to CN202011375977.3A priority Critical patent/CN112506372B/en
Publication of CN112506372A publication Critical patent/CN112506372A/en
Application granted granted Critical
Publication of CN112506372B publication Critical patent/CN112506372B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • 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

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)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a graffiti spray drawing method, device and storage medium based on a touch screen, wherein the drawing method comprises the following steps of S1: acquiring a spraying signal formed by a touch action of a user on a touch screen in real time; step S2: and analyzing the spraying signal to obtain a drawing range and a drawing density corresponding to the touch action, and generating a corresponding spraying image on the touch screen according to the drawing range and the drawing density. The touch screen painting device can achieve a doodling and spraying effect on the touch screen, and increases the painting function of the touch screen.

Description

Doodle spray drawing method and device based on touch screen and storage medium
Technical Field
The invention relates to the technical field of touch electronic equipment, in particular to a graffiti spray drawing method and device based on a touch screen and a storage medium.
Background
At present, touch screens are widely applied in various scenes, and because drawing tools of electronic white screens generally mainly use hard pens, the drawn effects are line segments with the same density and uniform color distribution, the drawing functions on the electronic white screens are generally limited to writing on the electronic white screens, or marking or annotating the contents displayed on the electronic white screens. And the effect of doodling spraying can not be simulated on the current electronic white board, so that the drawing function of the electronic white screen is single, and various drawing requirements of a user can not be met.
Disclosure of Invention
In order to overcome the defects of the prior art, an object of the present invention is to provide a graffiti spray drawing method based on a touch screen, which can achieve a graffiti spray effect on the touch screen and increase the drawing function of the touch screen.
Another object of the present invention is to provide an electronic device.
It is a further object of the present invention to provide a storage medium.
One of the purposes of the invention is realized by adopting the following technical scheme:
a doodling spray drawing method based on a touch screen comprises the following steps:
step S1: acquiring a spraying signal formed by a touch action of a user on a touch screen in real time;
step S2: and analyzing the spraying signal to obtain a drawing range and a drawing density corresponding to the touch action, and generating a corresponding spraying image on the touch screen according to the drawing range and the drawing density.
Further, the spraying signal at least comprises starting point data, the starting point data comprises a touch control range, a central point coordinate of the touch control range and a starting point touch control duration, the drawing range is determined according to the central point coordinate and the touch control range, and the drawing density corresponding to the starting point is determined according to the touch control duration of the touch control action staying on the starting point.
Further, the method for determining the drawing range comprises the following steps:
determining a rectangular range according to a plurality of edge coordinates of the touch range;
and drawing a circular range by taking the coordinate of the central point of the touch range as the center of a circle and taking the diagonal line of the rectangular range as the diameter, wherein the range covered by the circle is the drawing range.
Further, the drawing density of the spray image gradually decreases from the center of the drawing range to the edge.
Further, the spraying signal further comprises sliding data generated by sliding on the touch screen after the starting point, wherein the sliding data comprises a sliding track and sliding touch duration; and when the spraying image is generated along the sliding track, drawing according to the drawing range of the starting point, and determining the drawing density of any sliding coordinate point of the sliding track according to the touch control time length of the touch control action staying on the coordinate point.
Further, whether the drawing density of the starting point and any coordinate point in the sliding track reaches a preset threshold value is judged, and if yes, an overflow image is generated vertically downwards along the ordinate direction of the coordinate point.
Further, the length of the overflow image is in a direct proportion relation with the drawing density corresponding to the coordinate point.
Further, step S1 is preceded by: and receiving a setting instruction, and changing the color and the transparency of the sprayed image according to the setting instruction.
The second purpose of the invention is realized by adopting the following technical scheme:
an electronic device comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to realize the scrawling spray drawing method based on the touch screen.
The third purpose of the invention is realized by adopting the following technical scheme:
a storage medium having stored thereon a computer program which, when executed, implements the above-described touch screen-based graffiti-spray drawing method.
Compared with the prior art, the invention has the beneficial effects that:
and acquiring a corresponding drawing range and drawing density according to the touch action, generating a corresponding spraying image on the touch screen, and simulating a doodle and mist effect on the touch screen.
Drawings
FIG. 1 is a schematic flow diagram of a graffiti spray drawing process of the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Example one
The embodiment provides a doodle spray drawing method based on a touch screen, which can realize the drawing effect of doodle spray on the touch screen such as an electronic white screen, improve the drawing function of the touch screen and meet the use requirements of users; as shown in fig. 1, the drawing method of this embodiment specifically includes the following steps:
step S0: and receiving a setting instruction, and changing the color and the transparency of the sprayed image according to the setting instruction. A user enters a drawing interface of the touch screen in advance, and after clicking a doodle spraying function, the color and the transparency of the doodle spraying are set in a user-defined mode so as to change the presentation effect of the sprayed image; the setting of the transparency determines the drawing density corresponding to the unit time of the sprayed image, namely the smaller the transparency is, the fewer drawing points corresponding to the same drawing range in the unit time are, and the smaller the drawing density is; the greater the transparency is, the more drawing points corresponding to the same drawing range in unit time are, and the greater the drawing density is.
Step S1: and acquiring a spraying signal formed by the touch action of the user on the touch screen in real time.
When a user uses a doodling spraying function, touch actions can be performed in a drawing area of a touch screen by using fingers or a touch pen, the touch actions can be point-touching the touch screen to form simple clicking actions, and continuous sliding actions can also be formed in the drawing area after the touch screen is point-touched. Generating corresponding spraying signals aiming at different touch actions, wherein when a user only executes a clicking action in a drawing area, the spraying signals generated by a touch screen only comprise starting point data; when a user executes a sliding action in the drawing area, the spraying signal generated by the touch screen comprises starting point data and sliding data.
The starting point data comprises a touch range, a center point coordinate of the touch range and a starting point touch duration, wherein the touch range is a touch area formed by a user finger or a stylus touching a drawing area, when a touch screen identifies a touch action, the shape of the touch range is determined according to a plurality of edge coordinates of the touch range, generally, the touch range formed by a pen point part of the stylus touching the drawing area is generally in a circular state, the touch range formed by the finger touching the drawing area is generally in a rectangular shape, the center point coordinate of the touch range can be known according to the touch range, then, the drawing range can be determined according to the center point coordinate and the touch range, and the drawing density corresponding to the starting point is determined according to the touch duration of the touch action staying on the starting point.
The spraying signal comprises initial point data formed by a user finger starting to touch the drawing area, and also comprises sliding data generated by sliding on the touch screen after the initial point, wherein the sliding data comprises a sliding track and sliding touch duration; and when the spraying image is generated along the sliding track, drawing according to the drawing range of the starting point, and determining the drawing density of any sliding coordinate point of the sliding track according to the touch duration of the touch action staying on the coordinate point.
Step S2: and analyzing the spraying signal to obtain a drawing range and a drawing density corresponding to the touch action, and generating a corresponding spraying image on the touch screen according to the drawing range and the drawing density.
When a user touches the drawing area with a finger, the method for determining the drawing range comprises the following steps:
determining a rectangular range according to a plurality of edge coordinates of the touch range;
and drawing a circular range by taking the coordinate of the central point of the touch range as the center of a circle and the diagonal line of the rectangular range as the diameter, wherein the range covered by the circle is the drawing range.
When a user touches a drawing area with a pen tip of a touch pen, the method for determining the drawing range comprises the following steps:
and determining a circular state according to the edge coordinates of the touch range, wherein the circular range is a drawing range.
When the user touches the drawing area using the side of the stylus, the method of determining the drawing range may be determined with reference to the manner of finger touch. The drawing range means the size of an actual sprayer, and the larger the drawing range is, namely the larger the sprayer is, the thicker the sprayed lines are; the smaller the drawing range, i.e., the smaller the head, the thinner the line to be ejected.
In this embodiment, the drawing range is divided into a plurality of concentric circle regions according to a set proportion, the more the concentric circle region is closer to the center of the drawing range, the more and more dense the drawing points are, and the more sparse the drawing points are, the more sparse the drawing points are, the spray-like effect is; the drawing points of the spraying image are irregular point images, and the coordinates of the drawing points in the drawing range are randomly determined through a random coordinate algorithm.
The drawing density of the sprayed image is also influenced by the touch control duration, namely, the longer the stay time on any coordinate of the drawing area is in the process of executing the touch control action by the finger of the user, the longer the stay time is understood as the duration that the spray is always sprayed, and the greater the drawing density is, the overflow image is generated at the moment; when the drawing density of the starting point and any coordinate point in the sliding track reaches a preset threshold value, the spraying image vertically downwards generates an overflowing image along the ordinate direction of the coordinate point with the drawing density larger than the threshold value, and the effect that liquid overflows and flows downwards is generated. The length of the overflow image and the drawing density corresponding to the coordinate point are in a direct proportion relation, namely the longer the spraying time is, the longer the overflow image overflows downwards, and the effect that the liquid overflows downwards and flows after the sprayed liquid is saturated is formed.
Example two
The embodiment provides an electronic device, which comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to implement the graffiti spray drawing method based on a touch screen in the first embodiment; in addition, the embodiment also provides a storage medium, on which a computer program is stored, and when the computer program is executed, the method for drawing the doodle spray based on the touch screen is implemented.
The apparatus and the storage medium in this embodiment are based on two aspects of the same inventive concept, and the method implementation process has been described in detail in the foregoing, so that those skilled in the art can clearly understand the structure and implementation process of the system in this embodiment according to the foregoing description, and for the sake of brevity of the description, details are not repeated here.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.

Claims (5)

1. A doodling spray drawing method based on a touch screen is characterized by comprising the following steps:
step S1: acquiring a spraying signal formed by a touch action of a user on a touch screen in real time; the spraying signal at least comprises starting point data, the starting point data comprises a touch control range, a central point coordinate of the touch control range and a starting point touch control duration, a drawing range is determined according to the central point coordinate and the touch control range, and drawing density corresponding to a starting point is determined according to the touch control duration of the touch control action staying on the starting point; the spraying signal further comprises sliding data generated by sliding on the touch screen after the starting point, wherein the sliding data comprises a sliding track and sliding touch duration; when a spraying image is generated along the sliding track, drawing according to the drawing range of the starting point, and determining the drawing density of any sliding coordinate point of the sliding track according to the touch control duration of the touch control action staying on the coordinate point;
step S2: analyzing the spraying signal to obtain a drawing range and a drawing density corresponding to the touch action, and generating a corresponding spraying image on the touch screen according to the drawing range and the drawing density; the drawing density of the spraying image is gradually reduced from the circle center to the edge of the drawing range; the method for determining the drawing range comprises the following steps:
determining a rectangular range according to a plurality of edge coordinates of the touch range;
drawing a circular range by taking the coordinate of the central point of the touch range as a circle center and taking the diagonal of the rectangular range as a diameter, wherein the circular range is a drawing range;
and when generating the spray image, the method further comprises the following steps: and judging whether the drawing density of any coordinate point in the sliding track reaches a preset threshold value, and if so, generating an overflow image vertically downwards along the vertical coordinate direction of the coordinate point.
2. The touch screen-based doodling and spraying drawing method of claim 1, wherein the length of the overflow image is in direct proportion to the drawing density corresponding to the coordinate point.
3. The touch screen-based doodling spray drawing method of claim 1, wherein the step S1 is preceded by: and receiving a setting instruction, and changing the color and the transparency of the sprayed image according to the setting instruction.
4. An electronic device, comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the processor implements the touch screen-based graffiti spray drawing method of any one of claims 1 to 3 when executing the computer program.
5. A storage medium having a computer program stored thereon, wherein the computer program is executed to implement the touch screen-based graffiti spray drawing method of any one of claims 1 to 3.
CN202011375977.3A 2020-11-30 2020-11-30 Graffiti spray drawing method and device based on touch screen and storage medium Active CN112506372B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011375977.3A CN112506372B (en) 2020-11-30 2020-11-30 Graffiti spray drawing method and device based on touch screen and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011375977.3A CN112506372B (en) 2020-11-30 2020-11-30 Graffiti spray drawing method and device based on touch screen and storage medium

Publications (2)

Publication Number Publication Date
CN112506372A CN112506372A (en) 2021-03-16
CN112506372B true CN112506372B (en) 2022-06-07

Family

ID=74969610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011375977.3A Active CN112506372B (en) 2020-11-30 2020-11-30 Graffiti spray drawing method and device based on touch screen and storage medium

Country Status (1)

Country Link
CN (1) CN112506372B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103376981A (en) * 2012-04-19 2013-10-30 富泰华工业(深圳)有限公司 Drawing system, drawing method and touch electronic device with drawing system
CN103164158A (en) * 2013-01-10 2013-06-19 深圳市欧若马可科技有限公司 Method, system and device of creating and teaching painting on touch screen
CN104199547B (en) * 2014-08-29 2017-05-17 福州瑞芯微电子股份有限公司 Virtual touch screen operation device, system and method
CN111243378B (en) * 2020-03-17 2022-02-22 广东智媒云图科技股份有限公司 Drawing method and device based on fractal Brown motion model

Also Published As

Publication number Publication date
CN112506372A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN111381754B (en) Handwriting processing method, equipment and medium
CN106325737B (en) Writing path erasing method and device
CN107728916B (en) Display method and device of space handwriting track
CN108829327B (en) Writing method and device of interactive intelligent equipment
CN110045840B (en) Writing track association method, device, terminal equipment and storage medium
CA2922393A1 (en) Simultaneous hover and touch interface
US10268369B2 (en) Detecting erasure gestures in an electronic presentation system
US9262012B2 (en) Hover angle
JPH0644006A (en) Method of dynamically selecting and operating object
CN112905102B (en) Method and device for realizing writing tip, electronic equipment and readable storage medium
CN111580687B (en) Data processing method and device and intelligent interaction equipment
CN108304129A (en) Teaching electronics exhibition booth annotation method, equipment, storage medium and system
EP3413179A1 (en) Rejecting extraneous touch inputs in an electronic presentation system
CN110633042A (en) Handwriting erasing method, device and equipment for electronic whiteboard
CN106445386A (en) Handwriting display method and device
CN111310557A (en) Gesture recognition method, device and medium based on infrared touch frame
CN112506372B (en) Graffiti spray drawing method and device based on touch screen and storage medium
CN106598351B (en) Touch point processing method and device
CN112596660B (en) Writing display processing method and electronic equipment
CN105320316B (en) Method and device for removing jitter of touch screen and terminal
JP2011203796A (en) Coordinate input device and program
CN113176831A (en) Touch pen, setting method and setting device
CN106990900A (en) One kind writing implementation method and device
CN110633041B (en) Method and device for switching writing, selecting and erasing modes by utilizing gestures
CN107403087B (en) Touch feedback method and device and terminal

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 238, room 406, 1 Yichuang street, Huangpu District, Guangzhou, Guangdong 510700

Applicant after: Guangzhou langguo Electronic Technology Co.,Ltd.

Address before: Room 238, room 406, 1 Yichuang street, Huangpu District, Guangzhou, Guangdong 510700

Applicant before: GUANGZHOU LANGO ELECTRONIC SCIENCE & TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant