WO2024093579A1 - 一种显示设备及笔迹显示方法 - Google Patents

一种显示设备及笔迹显示方法 Download PDF

Info

Publication number
WO2024093579A1
WO2024093579A1 PCT/CN2023/121435 CN2023121435W WO2024093579A1 WO 2024093579 A1 WO2024093579 A1 WO 2024093579A1 CN 2023121435 W CN2023121435 W CN 2023121435W WO 2024093579 A1 WO2024093579 A1 WO 2024093579A1
Authority
WO
WIPO (PCT)
Prior art keywords
texture
sub
contours
stroke
filling
Prior art date
Application number
PCT/CN2023/121435
Other languages
English (en)
French (fr)
Inventor
王镜茹
Original Assignee
京东方科技集团股份有限公司
北京京东方技术开发有限公司
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 京东方科技集团股份有限公司, 北京京东方技术开发有限公司 filed Critical 京东方科技集团股份有限公司
Publication of WO2024093579A1 publication Critical patent/WO2024093579A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/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
    • 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
    • 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
    • G06F3/04883Interaction 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 for inputting data by handwriting, e.g. gesture or text
    • 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/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels

Definitions

  • the present invention relates to the field of data display technology, and in particular to a display device and a handwriting display method.
  • the electronic ink screen also known as electronic paper display technology, consists of two substrates coated with an electronic ink composed of countless tiny transparent particles.
  • the particles are formed by many black and white particles with positive and negative charges. Charged particles of different colors will move in different directions due to the different applied electric fields, presenting a black or white effect on the surface of the display screen.
  • the electronic ink screen is also equipped with a handwriting function.
  • large-size smart display devices are also equipped with a handwriting function.
  • the handwriting track can be displayed through the handwriting function in the electronic ink screen or smart display device.
  • the present invention provides a display device and a handwriting display method, which are used to achieve multiple and naturally changing texture writing effects and better meet the handwriting simulation requirements.
  • an embodiment of the present invention provides a display device, wherein the device includes a display screen, a controller, and an input component, wherein:
  • the display screen is configured to display content
  • the controller is configured to perform:
  • a stroke corresponding to the trajectory point wherein the stroke includes a stroke contour, the stroke contour includes K sub-contours, the stroke contour and the sub-contours extend in the same direction, and K is an integer greater than 1;
  • an embodiment of the present invention provides a handwriting display method, comprising:
  • a stroke corresponding to the trajectory point wherein the stroke includes a stroke contour, the stroke contour includes K sub-contours, the stroke contour and the sub-contours extend in the same direction, and K is an integer greater than 1;
  • an embodiment of the present invention further provides a handwriting display device, the device comprising:
  • An information acquisition pen type unit is used to acquire track point information of track points included in the user's writing track through an input component
  • a stroke contour determining unit configured to determine a stroke corresponding to the trajectory point according to the trajectory point information of the trajectory point, wherein the stroke includes a stroke contour, the stroke contour includes K sub-contours, the stroke contour and the sub-contours have the same extension direction, and K is an integer greater than 1;
  • a pixel filling unit used for performing pixel filling on some sub-contours of the K sub-contours
  • a stroke display unit is used to control the display screen to display the strokes.
  • an embodiment of the present invention further provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, it is used to implement the steps of the method described in the second aspect above.
  • FIG1 is a schematic diagram of a display device provided by an embodiment of the present invention.
  • FIG2 is a schematic diagram of a filling comparison of a texture pattern provided by an embodiment of the present invention.
  • FIG3 is a filling comparison diagram of a texture pattern provided by an embodiment of the present invention.
  • FIG4 is a filling comparison diagram of a texture pattern provided by an embodiment of the present invention.
  • FIG5 is a schematic diagram of a filling comparison of a texture pattern provided by an embodiment of the present invention.
  • FIG6 is a schematic diagram showing a comparison of filling of a texture pattern provided by an embodiment of the present invention.
  • FIG7 is a schematic diagram of a filling comparison of a texture pattern provided by an embodiment of the present invention.
  • FIG8 is a schematic diagram of a filling comparison of a texture pattern provided by an embodiment of the present invention.
  • FIG9 is a schematic diagram of a method for drawing a sub-contour provided by an embodiment of the present invention.
  • FIG10 is a schematic diagram of a pencil-shaped simulation effect provided by an embodiment of the present invention.
  • FIG11 is a flowchart of an implementation method of a handwriting display method with a brush simulation effect provided by an embodiment of the present invention
  • FIG12 is a flow chart of a handwriting display method according to an embodiment of the present invention.
  • FIG. 13 is a schematic diagram of a handwriting display device provided in an embodiment of the present invention.
  • the term "and/or” describes the association relationship of associated objects, indicating that three relationships may exist.
  • a and/or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone.
  • the character "/" generally indicates that the associated objects before and after are in an "or" relationship.
  • Electronic ink screens also known as electronic paper display technology, consist of two substrates coated with an electronic ink composed of countless tiny transparent particles. The particles are formed by many black and white particles with positive and negative charges. Charged particles of different colors will move in different directions due to different applied electric fields, presenting a black or white effect on the display surface.
  • electronic ink screens are also equipped with handwriting functions. With the popularization of smart conferences, large-size smart display devices are also equipped with handwriting functions. The handwriting track can be displayed through the handwriting function in the electronic ink screen or smart display device. With the expansion of the ink screen reading book market and the various usage requirements of large-size smart display devices, the demand for high-simulation handwriting functions is also increasing.
  • the display device in this embodiment includes an intelligent interactive display device with touch and handwriting functions; on the intelligent display device, writing programs such as an electronic whiteboard are installed, and the user can use fingers, active pens or passive pens to write on the display device.
  • the intelligent display device can include display modules such as liquid crystal display (LCD), organic electroluminescence display (OLED), and electronic ink, and can be an ink screen that can display writing in real time.
  • This embodiment simulates the writing trajectories of different simulated pen types to achieve a variety of naturally changing texture writing effects. It can be applied to various writing scenarios such as handwriting books and display devices, providing a variety of highly simulated handwriting functions and improving the user's writing experience.
  • the stroke contour formed by the writing trajectory is split.
  • Feibai is a special brushwork in calligraphy, and some parts of the strokes are parallel to dry silk.
  • the dry brushstrokes of calligraphy and painting are also generally called Feibai, and the strokes are slightly white, like written with a dry brush.
  • the method of filling some sub-contours of the stroke contour is named Feibai filling, and the method of filling all the sub-contours of the stroke contour is named full filling.
  • a display device provided in this embodiment includes a display screen 100 and a controller 101, wherein:
  • the display screen 100 is configured to display content
  • the controller 101 is configured to perform the following steps:
  • Step 1 Obtaining track point information of track points included in the user's writing track
  • the simulated pen type corresponding to the user's writing trajectory may be obtained, and texture filling with different effects may be performed according to the simulated pen type; the simulated pen type in this embodiment is determined according to the simulated pen type selected by the user, and the simulated pen type in this embodiment includes but is not limited to pencils, pens, brushes, etc.
  • This embodiment achieves a variety of texture filling effects by performing texture filling on different simulated pen types.
  • a writing trajectory written by a user is received, and sampling processing is performed on the received writing trajectory to obtain trajectory point information of the sampling trajectory point at time t.
  • the track point information includes but is not limited to track point coordinates, sampling time, writing pressure, writing speed, etc.
  • This embodiment determines each stroke written by the user according to the user's pen-down-writing-lifting operation mode, and for each stroke written by the user, uses the handwriting display method disclosed in the present invention to fill and display each stroke with different texture effects.
  • the methods for obtaining the track point information of the track points included in the user's writing track include but are not limited to any one or more of the following:
  • Method 1 obtaining the track point information of the track points contained in the writing track of the user through the display screen 100 itself.
  • the track point information may be obtained through a touch component configured on the display screen 100 .
  • the track point information may be obtained through capacitive touch, infrared touch, electromagnetic touch, or the like.
  • Method 2 obtaining track point information of track points included in the user's writing track through a handwriting board.
  • a connection is established between the handwriting tablet and the display device.
  • the writing can be displayed on the display screen 100 simultaneously.
  • the user can use an electromagnetic pen, a touch pen or other stylus to write on the handwriting tablet.
  • the handwriting tablet receives the electromagnetic signal or touch signal of the stylus, determines the track point information, and sends the track point information to the display device for the display device to display the writing track.
  • Method 3 obtaining the track point information of the track points included in the user's writing track through fingertip recognition.
  • the user's writing gesture is collected through a camera on the display device, and the gesture is recognized to obtain the track point information of the corresponding track point.
  • the writing pressure in this embodiment can be obtained by acquiring the writing pressure value of each trajectory point collected by the electromagnetic pen, or can be obtained by collecting it through a pressure sensor of a display device, and this embodiment does not impose too many restrictions on this.
  • the writing speed in this embodiment can be obtained by collecting the instantaneous speed of the trajectory point, or can be calculated based on the distance between two adjacent trajectory points and the sampling time, and this embodiment does not impose too many restrictions on this.
  • the controller is specifically configured to determine the writing speed of the trajectory point in the following manner:
  • Step 2 determining the stroke corresponding to the trajectory point according to the trajectory point information of the trajectory point, wherein the stroke includes a stroke contour, the stroke contour includes K sub-contours, the stroke contour and the sub-contours have the same extension direction, and K is an integer greater than 1;
  • the writing trajectory of each stroke written by the user is received, the trajectory point information of each trajectory point contained in the writing trajectory of each stroke is obtained, the writing trajectory of each stroke is split to obtain the writing trajectory of each stroke after splitting, and part or all of the sub-contours are selected from the K sub-contours after splitting for filling.
  • the writing track in this embodiment refers to the touch point information (i.e., track point information) generated by the user using a finger or a writing pen to directly write on a display screen equipped with a touch function.
  • the hardware layer obtains the writing track. After the trace is completed, it will be passed to the simulation algorithm for processing, and the strokes will be determined according to the writing trajectory, so as to display the strokes.
  • the trajectory point information includes but is not limited to the trajectory point coordinates, sampling time, writing pressure, writing speed, etc.
  • This embodiment can determine each stroke written by the user according to the user's operation mode of putting down the pen-writing-lifting the pen, and for each stroke written by the user, the handwriting display method disclosed in the present invention is used to display each stroke with a flying white effect. It should be noted that the strokes in this embodiment are displayed after being filled or rendered, and the user can choose the color used for filling or rendering. When the stroke outline is filled with pixels, the pixel filling can be based on the color selected by the user.
  • the stroke outline of the stroke can be determined directly using the trajectory points or the trajectory points after sparse sampling, the position of the stroke outline can be determined according to the coordinate information of the trajectory points, and the width of the stroke outline can be determined according to the writing speed and writing pressure of the trajectory points, thereby determining the stroke outline of the stroke of the trajectory points.
  • the width of the stroke outline can be determined based on different handwriting parameters, and the handwriting parameters can be extracted from the trajectory point information.
  • the handwriting parameters include but are not limited to writing speed, writing pressure, writing inclination, pen angle, pen turning angle and other parameters.
  • the writing inclination angle represents the maximum value of the absolute value of the inclination angle of the projection of the writing pen on the writing plane relative to the X-axis direction and the Y-axis direction of the writing plane;
  • the pen angle represents the angle between the trajectory vector determined by adjacent trajectory points and the preset horizontal vector;
  • the pen turning angle represents the angle between two consecutive trajectory vectors, and each trajectory vector is determined according to adjacent trajectory points.
  • the width of the stroke outline can be calculated based on the handwriting parameters.
  • the writing plane in this embodiment includes but is not limited to a standard plane or a slightly curved surface (such as the writing plane of a curved screen), that is, the writing plane in this embodiment is allowed to have a certain degree of curvature.
  • the coordinates of the writing plane are designed according to the actual screen coordinates.
  • the trajectory points in this embodiment also include interpolation points, where the interpolation points are determined based on the sampling trajectory points actually obtained by the touch component. For example, each trajectory point is fitted using a Bezier curve to obtain a fitting curve, and the width of the stroke outline of the trajectory point on the fitting curve is calculated. Then, an interpolation operation is performed on the fitting curve to obtain the interpolation point, and the width of the stroke outline of the interpolation point is calculated.
  • Step 3 performing pixel filling on some of the K sub-contours
  • At least part of the K sub-contours are pixel-filled according to the simulated pen type; in implementation, this embodiment can determine whether to fill all the sub-contours according to the simulated pen type. Pixel filling is performed, and the specific implementation is as follows:
  • Method 1 when the simulated pen type is a writing brush, and the writing speed or writing pressure of the track point meets the preset requirements, pixel filling is performed on part of the K sub-contours.
  • the writing speed of the trajectory point is determined in the following manner: determine the first midpoint of the trajectory point corresponding to the sampling time t-1 and the sampling time t respectively; determine the writing speed of the tth trajectory point based on the Euclidean distance and time difference between the first midpoint and the trajectory point corresponding to the sampling time t.
  • the writing pressure may be obtained by acquiring the writing pressure value of each track point collected by the electromagnetic pen.
  • pixels are filled on some of the K sub-contours to generate a texture with a flying white effect.
  • Mode 2 when the simulation pen type is a writing brush and the writing speed or writing pressure of the track point does not meet the preset requirements, all the sub-contours of the K sub-contours are pixel-filled;
  • the stroke outline is not split, that is, the entire stroke outline is directly filled with pixels or not filled.
  • Method 3 when the simulated pen type is not a writing brush, pixel filling is performed on all the K sub-contours.
  • the simulated pen type is a writing brush
  • pixels are filled on part of the sub-contour to produce a flying white effect.
  • the simulated pen type is a hard pen type such as a pencil or a fountain pen
  • Step 4 Control the display screen to display the strokes.
  • the writing trajectory in this embodiment refers to the touch point information (i.e., trajectory point information) generated by the user using a finger or a writing pen to directly write on a display screen equipped with a touch function.
  • the hardware layer obtains the writing trajectory, it will be passed to the simulation
  • the algorithm is used to process and the strokes are determined according to the writing trajectory, so as to display the strokes.
  • this embodiment when this embodiment performs pixel filling on some sub-contours of the K sub-contours, there is a sub-contour that is not pixel filled between at least two sub-contours that are pixel filled.
  • a flying white effect can be formed by the filled and unfilled sub-contours.
  • some sub-contours are randomly selected from the K sub-contours for pixel filling; or, some sub-contours are randomly selected from the K sub-contours for pixel filling.
  • the specific implementation method of this embodiment of performing pixel filling on a part of the K sub-contours is as follows:
  • the stroke contour is pixel-filled using a texture atlas with Feibai features, and the texture atlas with Feibai features is used to pixel-fill part of the K sub-contours.
  • the texture atlas of the Feibai feature includes multiple texture patterns, and different texture patterns are used to represent different Feibai features; the controller is specifically configured to execute: according to the multiple texture patterns, pixel filling of the stroke outline is performed in sequence.
  • the texture pattern is determined based on a texture array, and the texture array is used to determine the filling position and filling method of the sub-contour to be filled.
  • Multiple texture patterns in a texture atlas are used to fill pixels of the stroke contours corresponding to the current trajectory point and the trajectory points after the current trajectory point. It should be noted that each texture pattern in this embodiment is used to fill pixels of the stroke contours corresponding to one or more trajectory points.
  • the texture atlas includes 8 texture patterns
  • the first texture pattern is used to fill pixels of the stroke contours corresponding to the 1st to 3rd trajectory points
  • the second texture pattern is used to fill pixels of the stroke contours corresponding to the 4th to 6th trajectory points
  • the third texture pattern is used to fill pixels of the stroke contours corresponding to the 7th to 9th trajectory points, and so on.
  • the stroke contour when the stroke contour is pixel-filled using different texture patterns, at least one of the number, position and filled texture type of sub-contours in the stroke contour that are pixel-filled is different.
  • Method 1 When different texture patterns are used to fill the stroke outline with pixels, the stroke The number or position of sub-contours without pixel filling in the outline drawing is different;
  • Mode 2 when the stroke contour is pixel-filled using different texture patterns, and the number and position of the sub-contours that are not pixel-filled in the stroke contour are the same, the sub-contours that are pixel-filled in the stroke contour are filled with different texture types.
  • the texture types in this embodiment include but are not limited to scattered point filling, solid filling, etc.
  • the texture atlas includes a plurality of texture patterns arranged in sequence; the controller is specifically configured to execute: filling pixels of the stroke outline in sequence according to the arrangement order of the plurality of texture patterns.
  • the texture patterns in this embodiment are arranged in sequence, and adjacent texture patterns satisfy certain rules, thereby avoiding the problem of texture breakage and mutation caused by mutation of adjacent texture patterns.
  • the specific rules satisfied are as follows:
  • the difference of Feibai features between adjacent texture patterns is less than a difference threshold.
  • the difference of Feibai features is used to indicate the difference of Feibai effects between different texture patterns, and the difference is determined by at least one of the number and position of sub-contours filled with pixels in the stroke contour when the texture pattern fills the stroke contour with pixels, and the type of texture filled.
  • adjacent texture pattern filled stroke contours include at least one group of sub-contours having the same position and different filling modes
  • the number of the sub-contours having an adjacent relationship in the at least one group of sub-contours is less than a difference threshold
  • the sub-contours are arranged sequentially in the stroke contour, and the arrangement order of the sub-contours having an adjacent relationship in the stroke contour is continuous.
  • texture pattern 1 performs pixel filling on stroke contour 1 of trajectory point 1
  • texture pattern 2 performs pixel filling on stroke contour 2 of trajectory point 2
  • stroke contour 1 includes 8 sub-contours arranged in sequence (respectively, sub-contour 1, sub-contour 2, sub-contour 3, sub-contour 4, sub-contour 5, sub-contour 6, sub-contour 7, and sub-contour 8), and stroke contour 2 includes 8 sub-contours arranged in sequence;
  • the stroke contours filled by texture pattern 1 and texture pattern 2 include at least one group of sub-contours with the same position and different filling methods, for example, texture pattern 1 uses scattered point filling for sub-contour 3 and sub-contour 4 in the filled stroke contour 1, and texture pattern 2 uses solid filling for sub-contour 3 and sub-contour 4 in the filled stroke contour 2, then the number of sub-contours with adjacent relationships is 2, that is, the number of sub-contours with adjacent relationships (sub-contour 3 and sub-contour 4) should be less than the difference threshold, for example, the number of sub-contours with adjacent relationships should be less than 3.
  • the filling method includes at least one of texture filling and non-filling of multiple texture types; the non-filling means no pixel filling; adjacent texture patterns are specifically any one or more of the following rules:
  • the stroke contours filled with adjacent texture patterns include at least one group of sub-contours with the same position and different texture types filled with textures.
  • the number of sub-contours with adjacent relationships in the at least one group of sub-contours is less than a first difference threshold.
  • texture pattern 1 and texture pattern 2 are taken as examples for specific description.
  • Texture pattern 1 performs pixel filling on the stroke contour 1 of trajectory point 1
  • texture pattern 2 performs pixel filling on the stroke contour 2 of trajectory point 2
  • the stroke contour 1 includes 8 sub-contours arranged in sequence (respectively, sub-contour 1, sub-contour 2, sub-contour 3, sub-contour 4, sub-contour 5, sub-contour 6, sub-contour 7, and sub-contour 8)
  • the stroke contour 2 includes 8 sub-contours arranged in sequence
  • this embodiment provides a filling comparison schematic diagram of a texture pattern.
  • texture pattern 1 uses solid filling for sub-contour 3 in the filled stroke contour 1, and uses scattered filling for sub-contour 4.
  • Texture pattern 2 uses scattered filling for sub-contour 3 in the filled stroke contour 2, and sub-contour 4 uses solid filling.
  • the number of sub-contours with adjacent relationships is 2, that is, the number of sub-contours with adjacent relationships (sub-contours 3 and sub-contours 4) should be less than the first difference threshold, for example, the number of sub-contours with adjacent relationships should be less than 4.
  • this embodiment provides a filling comparison schematic diagram of a texture pattern.
  • the texture pattern 1 uses solid filling for sub-contour 3 in the filled stroke contour 1, and uses scattered filling for sub-contour 4 and solid filling for sub-contour 7.
  • Sub-contour 8 is filled with scattered points; texture pattern 2 uses scattered point filling for sub-contour 3 in the filled stroke contour 2, sub-contour 4 is filled with solid point filling, sub-contour 7 is filled with scattered points, and sub-contour 8 is filled with solid point filling; at this time, the number of sub-contours with adjacent relationships is 2, the number of sub-contours with adjacent relationships (sub-contour 3 and sub-contour 4) is less than 3, and the number of sub-contours with adjacent relationships (sub-contour 7 and sub-contour 8) is also less than 3, which meets the requirements for the change of the texture pattern.
  • the stroke contours filled with adjacent texture patterns include at least one group of sub-contours with the same position and one sub-contour is filled with texture and the other sub-contour is not filled.
  • the number of sub-contours with adjacent relationships in the at least one group of sub-contours is less than the second difference threshold.
  • the first difference threshold is greater than the second difference threshold.
  • texture pattern 1 and texture pattern 2 are taken as examples for specific description.
  • Texture pattern 1 performs pixel filling on the stroke contour 1 of trajectory point 1
  • texture pattern 2 performs pixel filling on the stroke contour 2 of trajectory point 2
  • the stroke contour 1 includes 8 sub-contours arranged in sequence (respectively, sub-contour 1, sub-contour 2, sub-contour 3, sub-contour 4, sub-contour 5, sub-contour 6, sub-contour 7, and sub-contour 8)
  • the stroke contour 2 includes 8 sub-contours arranged in sequence
  • this embodiment provides a filling comparison schematic diagram of a texture pattern, for example, texture pattern 1 uses solid filling for sub-contour 3 in the filled stroke contour 1, and uses scattered filling for sub-contour 4, and texture pattern 2 does not fill sub-contour 3 and sub-contour 4 in the filled stroke contour 2.
  • the number of sub-contours with adjacent relationships is 2, that is, the number of sub-contours with adjacent relationships (sub-contour 3 and sub-contour 4) should meet less than the second difference threshold, for example, the number of sub-contours with adjacent relationships should be less than 3.
  • the second difference threshold is set to 2
  • the number of sub-contours with adjacent relationships is one.
  • texture pattern 1 uses solid filling for sub-contour 1 in the filled stroke contour 1
  • texture pattern 2 does not fill sub-contour 1 in the filled stroke contour 2, that is, the number of sub-contours with adjacent relationships (sub-contour 3) is 1.
  • a difference threshold (a first difference threshold or a second difference threshold)
  • texture breaks or mutations in adjacent texture patterns can be avoided, thereby improving the simulation effect.
  • the number of merged sub-contours is less than a set value; wherein the merged sub-contours represent sub-contours with the same texture type filled with the texture and having an adjacent relationship; the sub-contours are arranged sequentially in the stroke contour, and the arrangement order of the sub-contours with an adjacent relationship in the stroke contour is continuous.
  • the stroke outline filled with the texture pattern includes 8 sub-outlines arranged in sequence (sub-outline 1, sub-outline 2, sub-outline 3, sub-outline 4, sub-outline 5, sub-outline 6, sub-outline 7, and sub-outline 8, respectively). For example, if sub-outline 2 and sub-outline 3 are filled with scattered points, sub-outline 4 and sub-outline 5 are filled with solid points, and sub-outline 7 and sub-outline 8 are filled with scattered points, then sub-outline 2 and sub-outline 3 are merged, sub-outline 4 and sub-outline 5 are merged, and sub-outline 7 and sub-outline 8 are merged. At this time, the number of merged sub-outlines is 3, and 3 should be less than the set value.
  • the texture pattern includes a first texture pattern and a second texture pattern; in the sub-contours of the stroke contour filled by the first texture pattern, the number of merged sub-contours is less than that of the second texture pattern.
  • the number of merged sub-contours in the sub-contours of the stroke contour filled with the first texture pattern should be smaller than the number of merged sub-contours in the sub-contours of the stroke contour filled with the second texture pattern.
  • the number of merged sub-contours in the first texture pattern is set to be smaller than that in the second texture pattern.
  • the texture pattern includes a first texture pattern and a second texture pattern; the first texture pattern has a lower degree of flying white than the second texture pattern, and the degree of flying white represents the number of sub-contours in the stroke contour that are not pixel-filled; the controller is specifically configured to execute: pixel-filling the stroke contour in sequence from the first texture pattern to the second texture pattern.
  • pixel filling is performed on the stroke outline of the current trajectory point and the stroke outline of the trajectory point after the current trajectory point in sequence from the first texture pattern to the second texture pattern.
  • the texture pattern includes a first texture pattern and a second texture pattern arranged in sequence; the controller is specifically configured to execute:
  • the pixels of the stroke outline corresponding to the current trajectory point are filled according to the first texture pattern; in implementation, the pixels of the stroke outlines of the current trajectory point and the trajectory points after the current trajectory point can be filled in sequence according to the arrangement order of the first texture pattern.
  • the corresponding texture pattern is replaced once every at least one track point.
  • the corresponding first texture pattern is replaced every N track points; and/or the corresponding second texture pattern is replaced every M track points.
  • N is less than M.
  • the N is a preset value, or the N is determined by the sampling time of the first trajectory point for pixel filling using the texture array.
  • the M is a preset value, or the M is determined by the sampling time of the first trajectory point for pixel filling using the texture array.
  • the texture pattern includes a plurality of second texture patterns
  • the controller is specifically configured to execute:
  • the second texture pattern is selected in the order in which the second texture forward group and the second texture reverse group are alternately arranged in sequence, and the pixel filling is performed on the current trajectory point and the trajectory points after the current trajectory point;
  • the second texture forward group includes a plurality of second texture patterns arranged in sequence
  • the second texture reverse group includes a plurality of second texture patterns arranged in reverse sequence
  • the second texture positive group and the second texture reverse group contain the same second texture patterns, but the arrangement order of the second texture patterns is different.
  • the zigzag order can achieve a texture gradient effect, avoid texture breakage or mutation, and only need to store a small amount of texture patterns. By processing the pattern, better texture gradient effect can be achieved, effectively saving storage space.
  • the texture pattern includes 5 second texture patterns arranged in sequence (respectively, texture pattern 1, texture pattern 2, texture pattern 3, texture pattern 4, and texture pattern 5) as an example
  • the first texture positive group includes texture pattern 1, texture pattern 2, texture pattern 3, texture pattern 4, and texture pattern 5 arranged in sequence
  • the second texture positive group includes texture pattern 5, texture pattern 4, texture pattern 3, texture pattern 2, and texture pattern 1 arranged in reverse order;
  • texture pattern 1 texture pattern 2, texture pattern 3, texture pattern 4, texture pattern 5, texture pattern 5, texture pattern 4, texture pattern 3, texture pattern 2, texture pattern 1, texture pattern 1, texture pattern 2, texture pattern 3, texture pattern 4, texture pattern 5... to fill the pixels of the stroke outline corresponding to each trajectory point.
  • the texture pattern in this embodiment is determined based on the texture array.
  • the texture atlas includes a plurality of texture atlases, and different texture atlases are used to represent different Feibai features.
  • the controller is specifically configured to execute:
  • the multiple texture atlases are stored; a texture atlas is selected from the multiple texture atlases to perform pixel filling on the stroke outline.
  • a texture atlas is arbitrarily selected from a plurality of texture atlases to perform pixel filling on the stroke outline; or, a corresponding texture atlas is selected from a plurality of texture atlases according to the sampling time of the trajectory point to perform pixel filling on the stroke outline.
  • a texture atlas is selected from the multiple texture atlases to perform pixel filling on the stroke outline of the current trajectory point; wherein the full filling is used to perform pixel filling on the stroke outline of the trajectory point, and the Feibai filling is used to perform pixel filling on a partial sub-outline of the stroke outline of the trajectory point.
  • the texture pattern in this embodiment is determined based on a texture array, and the texture array is used to determine the filling position and filling method of the sub-contour to be filled.
  • this embodiment performs pixel filling on a portion of the sub-contour in the following manner:
  • a texture array is selected from a pre-stored texture set, wherein the texture set includes a plurality of textures.
  • a texture array is used to determine the filling position and filling method of the sub-contour to be filled; each texture array is used to fill the stroke contours corresponding to multiple consecutive trajectory points with pixels; according to the selected texture array, the pixel filling is performed on the part of the sub-contour.
  • pixel filling is performed on some sub-contours of the K sub-contours, and specifically, pixel filling is performed on some sub-contours in the following manner:
  • a texture array is selected from a pre-stored texture set, wherein the texture set includes multiple texture arrays, and the texture array is used to determine the filling position and filling method of the sub-contour to be filled; each texture array is used to perform pixel filling on the stroke contour corresponding to multiple consecutive trajectory points; and according to the selected texture array, the pixel filling is performed on the part of the sub-contour.
  • the filling methods in this embodiment include but are not limited to scattered filling, solid filling and no filling.
  • the texture array in this embodiment is used to determine the texture pattern, and the texture pattern is used to fill the stroke outline.
  • a texture set containing 8 texture arrays is given as follows. Taking the first texture array as an example, the first two digits in ⁇ 0,2,1 ⁇ of the texture array indicate that the first to third sub-contours (excluding the third) need to be filled, and the third digit value of 1 indicates that a solid filling method is used; the first two digits in ⁇ 2,3,2 ⁇ indicate that the third to fourth sub-contours (excluding the fourth) need to be filled, and the third digit value of 2 indicates that a random scattered filling method is used; taking the third texture array as an example, the first two digits in ⁇ 0,2,2 ⁇ of the texture array indicate that the first to third sub-contours (excluding the third) need to be filled, and the third digit value of 2 indicates that a random scattered filling method is used, and the first two digits in ⁇
  • the first two digits in ⁇ 10,15,1 ⁇ indicate that the 11th to 16th sub-contours (excluding the 16th) need to be filled, and the third digit value of 1 indicates that solid filling is used.
  • the first two digits in ⁇ 15,16,2 ⁇ indicate that the 16th to 17th sub-contours (excluding the 17th) need to be filled, and the third digit value of 2 indicates that random scattered point filling is used.
  • the first two digits in ⁇ 16,20,1 ⁇ indicate that the 17th to 21st sub-contours (excluding the 21st) need to be filled, and the third digit value of 1 indicates that solid filling is used.
  • the texture array The first two digits of ⁇ 3,6,1 ⁇ indicate that the 4th to 7th sub-contours (excluding the 7th) need to be filled, and the third digit value of 1 indicates that solid filling is used.
  • the first two digits of ⁇ 6,8,2 ⁇ indicate that the 7th to 9th sub-contours (excluding the 9th) need to be filled, and the third digit value of 2 indicates that random scattered filling is used.
  • the first two digits of ⁇ 10,11,1 ⁇ indicate that the 11th to 12th sub-contours (excluding the 12th) need to be filled, and the third digit value of 1 indicates that solid filling is used.
  • the first two digits of ⁇ 2 ⁇ indicate that the sub-contours from the 12th to the 14th (excluding the 14th) need to be filled, and the third digit value of 2 indicates that random scattered filling is used.
  • the first two digits of ⁇ 13,17,1 ⁇ indicate that the sub-contours from the 14th to the 18th (excluding the 18th) need to be filled, and the third digit value of 1 indicates that solid filling is used.
  • the first two digits of ⁇ 18,20,1 ⁇ indicate that the sub-contours from the 19th to the 21st (excluding the 21st) need to be filled, and the third digit value of 1 indicates that solid filling is used; and so on.
  • the texture set includes a plurality of texture arrays arranged in sequence; and the stroke outline is filled with pixels in sequence according to the order of the plurality of texture arrays.
  • pixels are filled in the stroke outlines corresponding to the trajectory point and the trajectory points after the trajectory point in sequence according to the order of the multiple texture arrays.
  • the stroke outline corresponding to each trajectory point is filled with pixels in turn.
  • this embodiment designs adjacent texture arrays as follows:
  • the stroke contours filled by the adjacent texture arrays include at least one group of sub-contours having the same position and different filling modes;
  • the number of the sub-contours having an adjacent relationship in the at least one group of sub-contours is less than a difference threshold
  • the sub-contours are arranged sequentially in the stroke contour, and the arrangement order of the sub-contours having an adjacent relationship in the stroke contour is continuous.
  • Texture array 1 fills the stroke contour 1 with pixels
  • texture array 2 fills the stroke contour 2 with pixels.
  • the stroke contour 1 includes 8 sub-contours arranged in sequence (respectively, sub-contour 1, sub-contour 2, sub-contour 3, sub-contour 4, sub-contour 5, sub-contour 6, sub-contour 7, and sub-contour 8), and the stroke contour 2 includes 8 sub-contours arranged in sequence.
  • texture array 1 and texture array 2 include at least one group of sub-contours with the same position and different filling methods
  • texture array 1 uses solid filling for sub-contour 3 in the filled stroke contour 1 and uses scattered filling for sub-contour 4
  • texture array 2 uses scattered filling for sub-contour 3 in the filled stroke contour 2 and uses solid filling for sub-contour 4, that is, the number of sub-contours (sub-contour 3 and sub-contour 4) with adjacent relationships should be less than the first difference threshold, for example, the number of sub-contours with adjacent relationships should be less than 4.
  • the texture array 1 uses solid filling for sub-contour 3 in the filled stroke contour 1, uses scattered filling for sub-contour 4, uses solid filling for sub-contour 7, and uses scattered filling for sub-contour 8;
  • Texture array 2 uses scattered point filling for sub-contour 3 in the filled stroke contour 2, solid filling for sub-contour 4, scattered point filling for sub-contour 7, and solid filling for sub-contour 8;
  • the number of adjacent sub-contours (sub-contour 3 and sub-contour 4) is less than 3, and the number of adjacent sub-contours (sub-contour 7 and sub-contour 8) is also less than 3, which meets the change requirements of the texture array.
  • the filling method includes at least one of texture filling and non-filling of multiple texture types; the non-filling means that no pixel filling is performed; it should be noted that the non-filling in this embodiment does not mean that the corresponding display area has no color display.
  • the non-filled display area may have no color display, but when the display screen is a liquid crystal display
  • the background color of the handwriting software may be displayed in the corresponding display area.
  • the stroke contours filled by adjacent texture arrays include at least one group of sub-contours with the same position and different texture types filled by the textures.
  • the number of sub-contours with adjacent relationships in the at least one group of sub-contours is less than a first difference threshold.
  • Texture array 1 fills the pixels of stroke contour 1 of trajectory point 1
  • texture array 2 fills the pixels of stroke contour 2 of trajectory point 2
  • stroke contour 1 includes 8 sub-contours arranged in sequence (respectively, sub-contour 1, sub-contour 2, sub-contour 3, sub-contour 4, sub-contour 5, sub-contour 6, sub-contour 7, and sub-contour 8)
  • stroke contour 2 includes 8 sub-contours arranged in sequence;
  • this embodiment provides a filling comparison schematic diagram of a texture pattern, for example, texture array 1 uses solid filling for sub-contour 3 in the filled stroke contour 1, and sub-contour 4 and sub-contour 5 both use scattered filling, and texture array 2 uses scattered filling for sub-contour 3 in the filled stroke contour 2, and sub-contour 4 and sub-contour 5 both use solid filling.
  • the number of sub-contours with adjacent relationships is 3, that is, the number of sub-contours with adjacent relationships (sub-contour 3, sub-contour 4 and sub-contour 5) should satisfy the requirement of being less than the first difference threshold, for example, the number of sub-contours with adjacent relationships should be less than 4.
  • the present embodiment provides a filling comparison schematic diagram of a texture pattern.
  • texture array 1 uses solid filling for sub-contour 3 in the filled stroke contour 1, and uses scattered filling for sub-contour 4, solid filling for sub-contour 7, and scattered filling for sub-contour 8
  • texture array 2 uses scattered filling for sub-contour 3 in the filled stroke contour 2, and uses solid filling for sub-contour 4, solid filling for sub-contour 7, and scattered filling for sub-contour 8
  • the number of sub-contours with adjacent relationships is 2, the number of sub-contours with adjacent relationships (sub-contour 3 and sub-contour 4) is less than 3, and the sub-contours with adjacent relationships (sub-contour 3 and sub-contour 4) are less than 3. 7 and sub-contours 8) are also less than 3, satisfying the texture array variation requirements
  • the first difference threshold is 3
  • the positions of the two sub-contours in texture array 1 are the same as the positions of the two sub-contours in texture array 2. That is, the filling method of sub-contours 3 and sub-contours 4 in texture array 1 is solid filling, and the filling method of sub-contours 3 and sub-contours 4 in texture array 2 is scattered filling.
  • the stroke contours filled with adjacent texture arrays include at least one group of sub-contours with the same position and one sub-contour is filled with texture and the other sub-contour is not filled.
  • the number of sub-contours with adjacent relationships in the at least one group of sub-contours is less than the second difference threshold.
  • the first difference threshold is greater than the second difference threshold.
  • Texture array 1 fills the pixels of stroke contour 1 of trajectory point 1
  • texture array 2 fills the pixels of stroke contour 2 of trajectory point 2
  • stroke contour 1 includes 8 sub-contours arranged in sequence (respectively, sub-contour 1, sub-contour 2, sub-contour 3, sub-contour 4, sub-contour 5, sub-contour 6, sub-contour 7, and sub-contour 8)
  • stroke contour 2 includes 8 sub-contours arranged in sequence;
  • this embodiment provides a filling comparison schematic diagram of a texture pattern, for example, texture array 1 uses solid filling for sub-contour 3 in the filled stroke contour 1, and uses scattered filling for sub-contour 4, and texture array 2 does not fill sub-contour 3 and sub-contour 4 in the filled stroke contour 2.
  • the number of sub-contours with adjacent relationships is 2, that is, the number of sub-contours with adjacent relationships (sub-contour 3 and sub-contour 4) should meet the requirement of being less than the second difference threshold, for example, the number of sub-contours with adjacent relationships should be less than 3.
  • the second difference threshold is set to 2
  • the number of sub-contours with adjacent relationships is one.
  • texture array 1 uses solid filling for sub-contour 1 in the filled stroke contour 1, and texture array 2 does not fill sub-contour 1 in the filled stroke contour 2, that is, the number of sub-contours with adjacent relationships (sub-contour 3) is 1; Texture array 1 does not fill sub-contour 7 in filled stroke contour 1, and texture array 2 uses scattered point filling for sub-contour 7 in filled stroke contour 2, that is, the number of sub-contours with adjacent relationships (sub-contour 7) is 1.
  • a difference threshold (a first difference threshold or a second difference threshold)
  • texture breakage or mutation in adjacent texture arrays can be avoided, thereby improving simulation effect.
  • the texture array includes a first texture array and a second texture array, and the number of sub-contours for pixel filling in the first texture array is higher than that in the second texture array; the controller is specifically configured to fill the stroke contours with pixels in order from the first texture array to the second texture array.
  • the number of merged sub-contours is less than a set value; wherein the merged sub-contours represent sub-contours with the same texture type filled by the texture and having an adjacent relationship; the sub-contours are arranged sequentially in the stroke contour, and the arrangement order of the sub-contours with an adjacent relationship in the stroke contour is continuous.
  • the texture array includes a first texture array and a second texture array
  • the number of merged sub-contours is less than that of the second texture array.
  • the number of merged sub-contours obtained by merging the continuous sub-contours is less than a set value.
  • the set value can be determined based on the number K of sub-contours obtained by splitting the stroke contour, for example, the set value is K/4.
  • the texture array includes a first texture array and a second texture array arranged in sequence, and the second texture array is arranged after the first texture array; the controller is specifically configured to fill the stroke outline with pixels in sequence from the first texture array to the second texture array.
  • the stroke outlines corresponding to the plurality of trajectory points are pixel-filled in sequence according to the order of the first texture array
  • the stroke outlines corresponding to the plurality of trajectory points are pixel-filled in sequence according to the order of the second texture array.
  • a texture set containing 8 texture arrays is used as an example, where the texture set contains 3 There are a first texture array and five second texture arrays, and the texture arrays are arranged in sequence as texture array 1, texture array 2, texture array 3, texture array 4, texture array 5, texture array 6, texture array 7, and texture array 8 in the texture set, wherein the first texture array includes texture array 1, texture array 2, and texture array 3 arranged in sequence; the second texture array includes texture array 4, texture array 5, texture array 6, texture array 7, and texture array 8 arranged in sequence.
  • the stroke outline is first filled with pixels in the order of texture array 1, texture array 2, and texture array 3, and then the stroke outline is filled with pixels in the order of texture array 4, texture array 5, texture array 6, texture array 7, and texture array 8.
  • the first texture array in this embodiment is used to achieve the transition between filling all sub-contours and filling part of sub-contours.
  • the number of merged sub-contours is set to be less than a set value, such as setting the number of merged sub-contours to be less than K/4.
  • the second texture array in this embodiment is used to achieve different Feibai texture filling.
  • the first texture pattern in this embodiment is determined based on the first texture array, and the second texture pattern is determined based on the second texture array.
  • the first texture pattern is used to achieve transition filling between full filling and flying white filling, and the second texture pattern is used for flying white filling.
  • the texture array is selected as follows:
  • Method 1 If the texture set is not used to fill the pixels of the stroke outline corresponding to the previous track point, the stroke outline corresponding to the current track point is filled with pixels according to the first texture array.
  • the stroke contour may be a stroke contour that is not split into K sub-contours, or a stroke contour that is split into K sub-contours, and the stroke contour is filled as a whole at one time;
  • the texture array includes a plurality of first texture arrays arranged in sequence; if pixel filling is performed on the stroke contour corresponding to the previous track point, the first first texture array is used to perform pixel filling on the partial sub-contour corresponding to the current track point.
  • the first texture array used for transition is sequentially selected to perform pixel filling on the stroke contour corresponding to each track point.
  • Method 2 If the texture set is used to fill the pixel of the stroke outline corresponding to the previous trajectory point, then According to the arrangement order of the texture array of the texture set used, the stroke outlines corresponding to the current trajectory point and the trajectory points after the current trajectory point are filled with pixels.
  • the arrangement order of the texture array selected for the previous trajectory point and the number of trajectory points for pixel filling using the texture array with the arrangement order are determined; based on the arrangement order and the number of trajectory points, a texture array is determined from multiple texture arrays to fill pixels of the partial sub-contour corresponding to the current trajectory point.
  • the first texture array arranged after the texture array in the arrangement order is determined as the texture array corresponding to the current track point
  • the texture array in the arrangement order is determined as the texture array corresponding to the current trajectory point; the quantity threshold corresponding to the first texture array is less than the second texture array.
  • texture set containing 8 texture arrays as an example, wherein the texture set contains 3 first texture arrays and 5 second texture arrays, and the texture arrays are arranged in sequence as texture array 1, texture array 2, texture array 3, texture array 4, texture array 5, texture array 6, texture array 7, and texture array 8 in the texture set, wherein the first texture array includes texture array 1, texture array 2, and texture array 3 arranged in sequence; the second texture array includes texture array 4, texture array 5, texture array 6, texture array 7, and texture array 8 arranged in sequence.
  • the stroke outline is first filled with pixels in the order of texture array 1, texture array 2, and texture array 3, and then the stroke outline is filled with pixels in the order of texture array 4, texture array 5, texture array 6, texture array 7, and texture array 8.
  • the texture array corresponding to the current trajectory point is determined to be texture array 2; if the quantity threshold of texture array 4 is 5, and the pixel filling of the corresponding stroke outline has been completed for 5 trajectory points, then the texture array corresponding to the current trajectory point is determined to be texture array 5.
  • the texture array corresponding to the current trajectory point is determined to be texture array 1; if the quantity threshold of texture array 4 is 5, and the pixel filling of the corresponding stroke outline has been completed for 3 trajectory points, the texture array corresponding to the current trajectory point is determined to be texture array 4.
  • the corresponding first texture array is replaced once every N trajectory points; and/or the corresponding second texture array is replaced once every M trajectory points.
  • N is less than M.
  • the N is a preset value, or the N is determined by the sampling time of the first trajectory point for pixel filling using the texture array.
  • the M is a preset value, or the M is determined by the sampling time of the first trajectory point for pixel filling using the texture array.
  • the texture of the transition interval is generated according to the first N first texture arrays in turn, and the texture of the flying white effect is generated according to the interval of M second texture arrays.
  • the interval of changing the texture setting each time should not be too long to ensure that the transition from full filling to flying white splitting can be quickly achieved.
  • the texture of the transition interval can be changed once every 3 track points, that is, a first texture array is changed every 3 track points, and each first texture array is used to fill the stroke contour corresponding to 3 consecutive track points with pixels.
  • the texture array includes a plurality of second texture arrays, and the controller is specifically configured to perform the following steps:
  • the second texture array is selected in the order in which the second texture forward array and the second texture reverse array are alternately arranged in sequence, and the pixel filling is performed on the current trajectory point and the trajectory points after the current trajectory point;
  • the second texture forward array includes a plurality of second texture arrays arranged in sequence
  • the second texture reverse array includes a plurality of second texture arrays arranged in reverse order.
  • the second texture array can be selected in a Z-shaped order to generate a texture with a flying white effect.
  • the first texture array is arranged before the second texture array, such as the texture set includes texture array 1, texture array 2, texture array 3, texture array 4, texture array 5, texture array 6, Texture array 7, texture array 8, wherein texture array 1, texture array 2, texture array 3 are the first texture array, and texture array 4, texture array 5, texture array 6, texture array 7, texture array 8 are the second texture array.
  • the texture arrays may be selected in the order of texture array 4, texture array 5, texture array 6, texture array 7, texture array 8, texture array 8, texture array 7, texture array 6, texture array 5, texture array 4, texture array 4, texture array 5, texture array 6, texture array 7, texture array 8... to fill the stroke contour corresponding to each trajectory point with pixels.
  • each second texture array is used to fill pixels of the stroke outlines corresponding to the five trajectory points.
  • the texture arrays can be extracted in reverse order from the currently extracted texture array to the first texture array to generate textures.
  • the details are as follows:
  • the texture array selected by the previous trajectory point is the last one of the second texture array arranged in sequence, and the number of the trajectory points reaches the number threshold corresponding to the second texture array, then the corresponding second texture array is determined for the current trajectory point and the trajectory point after the current trajectory point in turn according to the arrangement order of the second texture array arranged in reverse order.
  • the texture array selected by the previous trajectory point is the last one of the second texture arrays arranged in reverse order, then the corresponding second texture arrays are determined for the current trajectory point and the trajectory points after the current trajectory point in turn according to the arrangement order of the second texture arrays arranged in sequence.
  • the texture array selected by the previous trajectory point is the last one of the second texture array arranged in reverse order, and the number of the trajectory points reaches the number threshold corresponding to the second texture array, then the corresponding second texture array is determined for the current trajectory point and the trajectory point after the current trajectory point in turn according to the arrangement order of the second texture array arranged in sequence.
  • the texture array when the second texture array of the sparse flying white interval is selected, the texture array is replaced every 5 track points; when the first texture array of the transition interval is selected, the texture array is replaced every 3 track points. Secondary texture array.
  • the threshold value of the number of trajectory points for pixel filling of each texture array is a preset value
  • the threshold value of the number of trajectory points for pixel filling of each texture array is determined by the sampling time of the first trajectory point for pixel filling of the texture array.
  • the sampling time of the first trajectory point for pixel filling of the texture array is used as a random seed to generate a pseudo-random number, and the threshold value of the number of trajectory points for pixel filling of each texture array is determined according to the pseudo-random number.
  • the threshold number of trajectory points for pixel filling of each texture array is determined as follows:
  • the duration number T is determined according to the sampling time of the current trajectory point, T ⁇ 1;
  • pixel filling is performed on the sub-contours corresponding to the current trajectory point and T-1 trajectory points after the current trajectory point.
  • the sampling timestamp of the trajectory point is used as a random seed to generate a pseudo-random number from 2 to 4, which is the threshold value of the number of trajectory points corresponding to this texture array;
  • the sampling timestamp of the trajectory point is used as a random seed to generate a pseudo-random number from 4 to 7, which is the threshold value of the number of trajectory points corresponding to this texture array.
  • the texture set includes a plurality of texture sets, and different texture sets are used to represent different texture filling features.
  • the controller is specifically configured to:
  • a plurality of the texture sets are stored; a texture set is selected from the plurality of texture sets to perform pixel filling on the stroke outline.
  • the texture set includes multiple texture sets, and different texture sets are used to represent different texture filling features.
  • a texture set is selected in the following manner:
  • Method 1 select a texture set from multiple texture sets at random, and select Select a texture array
  • Method 2 selecting a corresponding texture set from a plurality of texture sets according to the sampling time of the trajectory point, and selecting a texture array from the corresponding texture set; wherein the index number of a texture set corresponds to a pseudo-random number.
  • the sampling time of the trajectory point is used as a random seed to generate a pseudo-random number
  • a texture set corresponding to the pseudo-random number is selected from multiple texture sets
  • a texture array is selected from the texture set corresponding to the pseudo-random number.
  • controller is specifically configured to execute:
  • a texture set is selected from the multiple texture sets, and pixel filling is performed on the stroke outline of the current track point.
  • the full filling is used to perform pixel filling on the stroke outline of the trajectory point
  • the flying white filling is used to perform pixel filling on a part of the sub-outline of the stroke outline of the trajectory point.
  • the present embodiment may also store the trajectory point information of the trajectory point; generate a pseudo-random number using the sampling time of the trajectory point contained in the trajectory point information, and select a corresponding texture set from multiple texture sets; and use the corresponding texture set to re-fill pixels of a portion of the sub-contour of the trajectory point.
  • a pseudo-random number is generated using the sampling time of the trajectory point contained in the trajectory point information, and a texture set corresponding to the pseudo-random number is selected from multiple texture sets; and pixels of a partial sub-contour of the trajectory point are refilled using the texture set corresponding to the pseudo-random number.
  • the texture set corresponding to the pseudo-random number is used to re-fill the pixels on part of the sub-contours of the trajectory point.
  • the trajectory point information of the trajectory point and the arrangement order of the texture array corresponding to the trajectory point may also be stored; and the pixel filling of the partial sub-contour of the trajectory point may be re-performed using the texture array corresponding to the arrangement order.
  • the redraw triggering conditions in this embodiment include but are not limited to: the user closes the document and then reopens the document, turns pages, reloads the document, etc.
  • the texture set corresponding to the pseudo-random number is used to re-fill pixels in the part of the sub-contour of the trajectory point; or, the texture array corresponding to the arrangement order is used to re-fill pixels in the part of the sub-contour of the trajectory point.
  • a texture set is randomly selected from multiple texture sets as the basis for the texture change of this trajectory point during flying white splitting.
  • the sampling timestamp information of this trajectory point passed by the application layer to the algorithm layer is used as a random seed to generate a pseudo-random number between 1 and M, and then the texture set with the index number of the pseudo-random number is extracted.
  • the application layer will pass all the pre-stored trajectory point information to the algorithm again for calling.
  • the algorithm layer can generate the same pseudo-random number as the real-time drawing process, ensuring that the texture effect of the two drawings is consistent.
  • the texture arrays of the texture set of this embodiment are stored in the order of transition interval texture (first texture array) and sparse flying white texture (second texture array).
  • first texture array transition interval texture
  • second texture array sparse flying white texture
  • the first 3 texture arrays are set as transition interval textures
  • the other 5 texture arrays are set as sparse flying white interval textures.
  • the texture of the transition interval is generated in sequence according to the first three first texture arrays, and the first texture array of the transition interval can be set to be replaced every three track points.
  • the second texture array is extracted from the sparse Feibai interval in a zigzag order. Specifically, the extraction is performed in the order of 4 ⁇ 8, 8 ⁇ 4, 4 ⁇ 8, ... In this interval, the second texture array is set to be replaced every five track points.
  • all sub-contours of the K sub-contours are pixel-filled; or, when the simulated pen type is not a writing brush, all sub-contours of the K sub-contours are pixel-filled. Filling; when the drawing mode is changed from Feibai splitting to full filling, before pixel filling of all the sub-contours of the K sub-contours is performed, extraction is performed in reverse order from the currently extracted texture array to the first texture array.
  • the texture set includes a texture array arranged in sequence; before performing pixel filling on all the sub-contours of the K sub-contours, the controller is further configured to execute:
  • the stroke outline of the current trajectory point is filled with pixels using the texture array used for the previous trajectory point and the texture array arranged before the texture array in the texture set.
  • controller is specifically configured to execute:
  • the stroke outline of the current trajectory point is pixel filled in a reverse order from the texture array used for the Feibai filling to the first texture array in the texture set.
  • the second texture array of the sparse flying white interval when selected, the second texture array is replaced every 5 track points; when the first texture array of the transition interval is selected, the first texture array is replaced every 3 track points.
  • the stroke outline width of the stroke corresponding to the trajectory point is determined based on the writing inclination angle contained in the trajectory point information of the trajectory point; the writing inclination angle represents the inclination angle of the writing pen relative to the writing plane; based on the stroke outline width, the number of sub-contours contained in the stroke outline is determined.
  • the stroke outline width is adjusted according to the writing inclination angle. After the stroke outline width is calculated, the value is rounded down and recorded as K, which is used as the number of sub-outlines for splitting the overall outline.
  • the controller is specifically configured to perform pixel filling on all sub-contours in the following manner:
  • Some of the K sub-contours are pixel-filled in a first filling manner, and the other sub-contours are pixel-filled in a second filling manner, wherein the density of pixel filling in the first filling manner is lower than that in the second filling manner.
  • the first and the Kth sub-contours are sorted in the order of the K sub-contours.
  • the first filling method is used to perform pixel filling
  • the second filling method is used to perform pixel filling on at least one of the 2nd to K-1th sub-contours.
  • the density of pixel filling in the first filling mode is a minimum density
  • the density of pixel filling in the second filling mode is determined according to the writing pressure contained in the track point information of the track point; the density of pixel filling in the second filling mode increases as the writing pressure of the track point increases.
  • the lowest density of random scattered points is used for pixel filling.
  • the density of the random scattered points used is adjusted according to the writing pressure, and these sub-contours are filled with pixels.
  • the stroke contour is divided into the 1st sub-contour, the Kth sub-contour and the merged sub-contour, and the merged sub-contour is obtained by merging the 2nd to K-1th sub-contours; the 1st and Kth sub-contours are filled with pixels using the first filling method, and the merged sub-contour is filled with pixels using the second filling method.
  • this embodiment merges the 2nd to K-1th sub-contours into a large merged sub-contour for drawing.
  • this embodiment provides a sub-contour drawing method, calculates the position coordinates of each point, and connects them in a fixed clockwise (or counterclockwise) direction to form a large merged sub-contour.
  • a 1st sub-contour a Kth sub-contour
  • a merged sub-contour When drawing, only three sub-contours need to be drawn, namely, a 1st sub-contour, a Kth sub-contour, and a merged sub-contour.
  • the present embodiment provides a schematic diagram of a pencil pen type simulation effect.
  • the first and Kth sub-contours are filled with the lowest density of random scattered points
  • the merged sub-contours are filled with random scattered points with a filling density that varies with writing pressure, so as to achieve a rough effect on both sides of the line.
  • this embodiment also provides a flowchart of a method for displaying handwriting with a brush simulation effect, and the specific implementation process is as follows:
  • Step 1100 obtaining and storing the track point information of the track points included in the writing track of the user, and the simulation pen type corresponding to the writing track;
  • Step 1101 Determine the stroke corresponding to the track point according to the track point information of the track point.
  • the stroke includes a stroke contour, and the stroke contour includes K sub-contours;
  • Step 1102 If the simulated pen type is a writing brush, determine whether the writing speed or writing pressure of the track point meets the preset requirements. If so, execute step 1103; otherwise, execute step 1110;
  • Step 1103 Generate a pseudo-random number according to the sampling time of the trajectory point, and select a texture set corresponding to the pseudo-random number from multiple texture sets;
  • Step 1104 determine whether to perform pixel filling on all sub-contours corresponding to the previous trajectory point, if yes, execute step 1105, otherwise execute step 1106;
  • Step 1105 using the first first texture array to perform pixel filling on the stroke outline corresponding to the current trajectory point;
  • Step 1106 determining the arrangement order of the texture array selected for the last trajectory point, and the number of trajectory points for pixel filling using the texture array in the arrangement order;
  • Step 1107 determining whether the number of trajectory points reaches the number threshold corresponding to the texture array in the arrangement order, if so, executing step 1108, otherwise executing step 1109;
  • Step 1108 determining the first texture array arranged after the texture array in the arrangement order as the texture array corresponding to the current trajectory point, and performing pixel filling on the stroke outline corresponding to the current trajectory point;
  • Step 1109 determine the texture array in the arrangement order as the texture array corresponding to the current trajectory point, and perform pixel filling on the stroke outline corresponding to the current trajectory point.
  • Step 1110 Fill pixels on all sub-contours corresponding to the current trajectory point.
  • This embodiment can achieve different brush stroke effects including brushes, pencils, etc. It can achieve the rough effect of the edges of the pencil on both sides when actually writing. Whether the Feibai effect is produced is controlled by factors such as writing speed and writing pressure; a transition interval between solid filling and Feibai effect is designed to ensure the natural transformation of the pen shape effect; a pseudo-random texture array preservation scheme is designed to ensure the consistency of the writing effect when the system is redrawing. While achieving different random textures of brush strokes, the overall drawing process is designed to ensure that the drawn pen shape effect will not change when the handwritten document is closed and re-entered.
  • Example 2 Based on the same inventive concept, the embodiment of the present invention also provides a handwriting display method.
  • the principle of solving the problem by this method is similar to that of the display device. Therefore, the implementation of this method can refer to the implementation of the display device, and the repeated parts will not be repeated.
  • Step 1200 obtaining track point information of track points included in the user's writing track through the input component
  • Step 1201 Determine the stroke corresponding to the trajectory point according to the trajectory point information of the trajectory point, wherein the stroke includes a stroke contour, the stroke contour includes K sub-contours, the stroke contour and the sub-contours extend in the same direction, and K is an integer greater than 1;
  • Step 1202 performing pixel filling on some of the K sub-contours
  • Step 1203 Control the display screen to display the strokes.
  • Example 3 Based on the same inventive concept, the embodiment of the present invention further provides a handwriting display device, the principle of solving the problem by the device is similar to that of the display device, so the implementation of the device can refer to the implementation of the display device, and the repeated parts will not be repeated.
  • the device includes:
  • the information acquisition pen type unit 1300 is used to acquire the track point information of the track points included in the user's writing track through the input component;
  • a stroke contour determining unit 1301 is used to determine the stroke corresponding to the trajectory point according to the trajectory point information of the trajectory point, wherein the stroke includes a stroke contour, the stroke contour includes K sub-contours, the stroke contour and the sub-contours have the same extension direction, and K is an integer greater than 1;
  • a pixel filling unit 1302, configured to perform pixel filling on some sub-contours of the K sub-contours
  • the stroke display unit 1303 is used to control the display screen to display the strokes.
  • the embodiment of the present disclosure provides a computer storage medium, the computer storage medium includes: a computer program code, when the computer program code is run on a computer, the computer executes any of the handwriting display methods discussed above.
  • the principle of the problem is similar to that of the handwriting display method, so the implementation of the above-mentioned computer storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.
  • computer storage media may include: Universal Serial Bus Flash Drive (USB), mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other storage media that can store program code.
  • USB Universal Serial Bus Flash Drive
  • ROM read-only memory
  • RAM random access memory
  • magnetic disk or optical disk and other storage media that can store program code.
  • the embodiment of the present disclosure also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any of the handwriting display methods discussed above. Since the principle of solving the problem by the above computer program product is similar to that of the handwriting display method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.
  • the computer program product may employ any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above.
  • readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or flash memory erasable programmable read-only memory
  • CD-ROM compact disk read-only memory
  • magnetic storage device or any suitable combination of the above.
  • embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.
  • These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
  • These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Generation (AREA)

Abstract

一种显示设备及笔迹显示方法,用于实现多种、变化自然的纹理书写效果,更好的满足手写仿真需求。显示设备包括显示屏(100)、控制器(101)和输入组件,其中:显示屏(100)被配置为进行内容的显示;控制器(101)被配置为执行:通过输入组件获取用户的书写轨迹包含的轨迹点的轨迹点信息;根据轨迹点的轨迹点信息,确定轨迹点对应的笔画,笔画包括笔画轮廓,笔画轮廓包括K个子轮廓,笔画轮廓和子轮廓的延伸方向相同, K为大于1的整数;对K个子轮廓的部分子轮廓进行像素填充;控制显示屏(100)显示笔画。

Description

一种显示设备及笔迹显示方法
相关申请的交叉引用
本申请要求在2022年10月31日提交中国专利局、申请号为PCT/CN2022/128710、申请名称为“显示设备、笔迹显示及笔迹轮廓确定的方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请要求在2023年5月31日提交中国专利局、申请号为202310637028.5、申请名称为“一种显示设备及笔迹显示方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及数据显示技术领域,特别涉及一种显示设备及笔迹显示方法。
背景技术
电子墨水屏又被称为电子纸显示技术,由两片基板组成,上面涂有一种由无数微小透明颗粒组成的电子墨水,颗粒由带正、负电的许多黑色和白色粒子形成,不同颜色的带电粒子会因施加电场的不同,而朝不同的方向运动,在显示屏表面呈现出黑或白的效果。
为了满足用户的书写需求,电子墨水屏还配置有手写功能,随着智能会议的普及,大尺寸的智能显示设备也配置有手写功能,可以通过电子墨水屏或智能显示设备中的手写功能,实现手写轨迹的显示,随着墨水屏阅读本市场的拓展以及大尺寸智能显示设备的多种使用需求,对高仿真的手写功能的需求也越来越多。
发明内容
本发明提供一种显示设备及笔迹显示方法,用于实现多种、变化自然的纹理书写效果,更好的满足手写仿真需求。
第一方面,本发明实施例提供的一种显示设备,其中,该设备包括显示屏、控制器和输入组件,其中:
所述显示屏被配置为进行内容的显示;
所述控制器被配置为执行:
通过所述输入组件获取用户的书写轨迹包含的轨迹点的轨迹点信息;
根据所述轨迹点的轨迹点信息,确定所述轨迹点对应的笔画,所述笔画包括笔画轮廓,所述笔画轮廓包括K个子轮廓,所述笔画轮廓和所述子轮廓的延伸方向相同,所述K为大于1的整数;
对所述K个子轮廓的部分子轮廓进行像素填充;
控制所述显示屏显示所述笔画。
第二方面,本发明实施例提供的一种笔迹显示方法,包括:
通过输入组件获取用户的书写轨迹包含的轨迹点的轨迹点信息;
根据所述轨迹点的轨迹点信息,确定所述轨迹点对应的笔画,所述笔画包括笔画轮廓,所述笔画轮廓包括K个子轮廓,所述笔画轮廓和所述子轮廓的延伸方向相同,所述K为大于1的整数;
对所述K个子轮廓的部分子轮廓进行像素填充;
控制所述显示屏显示所述笔画。
第三方面,本发明实施例还提供一种笔迹显示装置,该装置包括:
获取信息笔型单元,用于通过输入组件获取用户的书写轨迹包含的轨迹点的轨迹点信息;
确定笔画轮廓单元,用于根据所述轨迹点的轨迹点信息,确定所述轨迹点对应的笔画,所述笔画包括笔画轮廓,所述笔画轮廓包括K个子轮廓,所述笔画轮廓和所述子轮廓的延伸方向相同,所述K为大于1的整数;
像素填充单元,用于对所述K个子轮廓的部分子轮廓进行像素填充;
笔画显示单元,用于控制所述显示屏显示所述笔画。
第四方面,本发明实施例还提供计算机存储介质,其上存储有计算机程序,该程序被处理器执行时用于实现上述第二方面所述方法的步骤。
本申请的这些方面或其他方面在以下的实施例的描述中会更加简明易懂。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种显示设备示意图;
图2为本发明实施例提供的一种纹理图案的填充对比示意图;
图3为本发明实施例提供的一种纹理图案的填充对比示意图;
图4为本发明实施例提供的一种纹理图案的填充对比示意图;
图5为本发明实施例提供的一种纹理图案的填充对比示意图;
图6为本发明实施例提供的一种纹理图案的填充对比示意图;
图7为本发明实施例提供的一种纹理图案的填充对比示意图;
图8为本发明实施例提供的一种纹理图案的填充对比示意图;
图9为本发明实施例提供的一种子轮廓的绘制方式示意图;
图10为本发明实施例提供的一种铅笔笔型的仿真效果示意图;
图11为本发明实施例提供的一种毛笔仿真效果的笔迹显示方法的实施流程图;
图12为本发明实施例提供的一种笔迹显示方法实施流程图;
图13为本发明实施例提供的一种笔迹显示装置示意图。
具体实施方式
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的 范围。
本发明实施例中术语“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
本发明实施例描述的应用场景是为了更加清楚的说明本发明实施例的技术方案,并不构成对于本发明实施例提供的技术方案的限定,本领域普通技术人员可知,随着新应用场景的出现,本发明实施例提供的技术方案对于类似的技术问题,同样适用。其中,在本发明的描述中,除非另有说明,“多个”的含义是两个或两个以上。
电子墨水屏又被称为电子纸显示技术,由两片基板组成,上面涂有一种由无数微小透明颗粒组成的电子墨水,颗粒由带正、负电的许多黑色和白色粒子形成,不同颜色的带电粒子会因施加电场的不同,而朝不同的方向运动,在显示屏表面呈现出黑或白的效果。为了满足用户的书写需求,电子墨水屏还配置有手写功能,随着智能会议的普及,大尺寸的智能显示设备也配置有手写功能,可以通过电子墨水屏或智能显示设备中的手写功能,实现手写轨迹的显示,随着墨水屏阅读本市场的拓展以及大尺寸智能显示设备的多种使用需求,对高仿真的手写功能的需求也越来越多。
需要说明的是,本实施例中的显示设备包括具有触控手写功能的智能交互显示设备;在该智能显示设备上,安装有电子白板等书写程序,用户可以利用手指、主动笔或被动笔等在该显示设备上进行书写,该智能显示设备可以包含液晶显示器(Liquid Crystal Display,LCD)、有机发光半导体(Organic Electroluminescence Display,OLED)、电子墨水等显示模组,可以是墨水屏,可以实时显示书写笔迹。
本实施例通过对不同的仿真笔型书写的轨迹进行仿真,实现多种、变化自然的纹理书写效果,可以应用于手写本、显示设备等多种书写场景,提供多样化的高仿真的手写功能,提高用户的书写体验。
需要说明的是,本实施例通过对书写轨迹形成的笔画轮廓进行分裂,通 过对分裂的多个子轮廓中的部分子轮廓进行填充,其他子轮廓不进行填充的方式,实现飞白的书写效果。其中,飞白是书法中的一种特殊笔法,笔画有的部分呈枯丝平行,把书画的干枯笔触部分也泛称飞白,笔画中丝丝露白,像枯笔所写。本实施例中,将对笔画轮廓的部分子轮廓进行填充的方式命名为飞白填充,对笔画轮廓的子轮廓进行全部填充的方式命名为全填充。
如图1所示,本实施例提供的一种显示设备,包括显示屏100和控制器101,其中:
所述显示屏100被配置为进行内容的显示;
所述控制器101被配置为执行如下步骤:
步骤1、获取用户的书写轨迹包含的轨迹点的轨迹点信息;
可选的,还可以获取用户的书写轨迹对应的仿真笔型,根据仿真笔型进行不同效果的纹理填充;本实施例中的仿真笔型是根据用户选择的仿真笔型确定的,本实施例中的仿真笔型包括但不限于铅笔、钢笔、毛笔等。本实施例通过对不同的仿真笔型进行纹理填充,实现多种纹理填充效果。
实施中,接收用户书写的书写轨迹,对接收的书写轨迹进行采样处理,得到t时刻的采样轨迹点的轨迹点信息。
可选的,轨迹点信息包括但不限于轨迹点坐标、采样时刻、书写压力、书写速度等。本实施例可以根据用户落笔-书写-抬笔的操作方式,确定用户书写的每个笔画,针对用户书写的每个笔画,利用本公开的笔迹显示方法对每个笔画进行不同纹理效果的填充显示。
需要说明的是,本实施例中获取用户的书写轨迹包含的轨迹点的轨迹点信息的方式包括但不限于如下任一或任多种:
方式1、通过显示屏100本身获取用户的书写轨迹包含的轨迹点的轨迹点信息。
实施中,可以通过显示屏100配置的触控组件获取轨迹点信息,可选的,通过电容触控、红外触控、电磁触控等方式获取轨迹点信息。
方式2、通过手写板获取用户的书写轨迹包含的轨迹点的轨迹点信息。
实施中,手写板和显示设备建立连接,用户在手写板上书写的同时,能同步在显示屏100上进行显示,用户可以使用电磁笔、触控笔等手写笔在手写板上进行手写,手写板通过接收手写笔的电磁信号或触控信号,确定轨迹点信息,并将该轨迹点信息发送给显示设备,用于显示设备进行书写轨迹的显示。
方式3、通过指尖识别获取用户的书写轨迹包含的轨迹点的轨迹点信息。
实施中,通过显示设备上的摄像头采集用户书写的手势,对该手势进行识别从而获取对应的轨迹点的轨迹点信息。
可选的,本实施例中的书写压力可以通过获取电磁笔采集的每个轨迹点的书写压力值得到,也可以通过显示设备的压力传感器采集得到,本实施例对此不作过多限定。
可选的,本实施例中的书写速度可以通过采集轨迹点的瞬时速度得到,也可以根据相邻两个轨迹点的距离和采样时间计算得到,本实施例对此不作过多限定。实施中,所述控制器具体被配置为通过如下方式确定所述轨迹点的书写速度:
确定采样时刻t-1和采样时刻t分别对应的轨迹点的第一中点;根据所述第一中点和所述采样时刻t对应的轨迹点之间的欧式距离和时间差,确定第t个轨迹点的书写速度。
步骤2、根据所述轨迹点的轨迹点信息,确定所述轨迹点对应的笔画,所述笔画包括笔画轮廓,所述笔画轮廓包括K个子轮廓,所述笔画轮廓和所述子轮廓的延伸方向相同,所述K为大于1的整数;
实施中,接收用户书写的每个笔画的书写轨迹,获取每个笔画的书写轨迹包含的各轨迹点的轨迹点信息,对每个笔画的书写轨迹进行分裂,得到每个笔画分裂后的书写轨迹,并从分裂后的K个子轮廓中选取部分或全部子轮廓进行填充。
本实施例中的书写轨迹是指用户利用手指或书写笔在配置有触控功能的显示屏上直接书写生成的触控点信息(即轨迹点信息),硬件层获取该书写轨 迹后会传递给仿真算法进行处理,根据书写轨迹确定笔画,从而对笔画进行显示。可选的,轨迹点信息包括但不限于轨迹点坐标、采样时刻、书写压力、书写速度等。本实施例可以根据用户落笔-书写-抬笔的操作方式,确定用户书写的每个笔画,针对用户书写的每个笔画,利用本公开的笔迹显示方法对每个笔画进行飞白效果的显示。需要说明的是,本实施例中的笔画是经过填充或渲染后显示的,用户可以选择填充或渲染所使用的颜色,在对笔画轮廓进行像素填充时,可以基于用户选择的颜色进行像素填充。
实施中,可以直接利用轨迹点或者对进行稀疏采样后的轨迹点确定笔画的笔画轮廓,根据所述轨迹点的坐标信息确定笔画轮廓的位置,根据轨迹点的书写速度和书写压力确定笔画轮廓的宽度,从而确定出轨迹点的笔画的笔画轮廓。其中,笔画轮廓的宽度可以基于不同的手写参数确定,手写参数可以从轨迹点信息中提取得到,可选的,手写参数包括但不限于书写速度、书写压力、书写倾角、运笔夹角、运笔转弯夹角等多种参数。其中书写倾角表示书写笔在书写平面的投影相对于书写平面的X轴方向和Y轴方向上的倾斜角的绝对值的最大值;运笔夹角表示相邻轨迹点确定的轨迹矢量与预设水平矢量的夹角;运笔转弯夹角表示连续的两个轨迹矢量的夹角,每个轨迹矢量是根据相邻轨迹点确定的。实施中,可以基于手写参数计算笔画轮廓的宽度。
需要说明的是,本实施例中的书写平面包括但不限于标准平面或轻微曲面(如曲面屏的书写平面)即本实施例中的书写平面允许存在一定程度的弯曲,在实际计算时,书写平面的坐标按照实际屏幕坐标进行设计。
可选的,本实施例中的轨迹点还包括插值点,其中插值点是根据触控组件实际获取的采样轨迹点确定的,例如利用贝塞尔曲线,对各轨迹点进行拟合,得到拟合曲线,计算该拟合曲线上的轨迹点的笔画轮廓的宽度,进而在该拟合曲线上进行插值运算,得到插值点,计算插值点的笔画轮廓的宽度。
步骤3、对所述K个子轮廓的部分子轮廓进行像素填充;
可选的,根据所述仿真笔型,对所述K个子轮廓的至少部分子轮廓进行像素填充;实施中,本实施例可以根据仿真笔型,确定是否对全部的子轮廓 都进行像素填充,具体实施方式如下所示:
方式1、当所述仿真笔型为毛笔,且所述轨迹点的书写速度或书写压力满足预设要求时,对所述K个子轮廓的部分子轮廓进行像素填充。
可选的,通过如下方式确定所述轨迹点的书写速度:确定采样时刻t-1和采样时刻t分别对应的轨迹点的第一中点;根据所述第一中点和所述采样时刻t对应的轨迹点之间的欧式距离和时间差,确定第t个轨迹点的书写速度。
可选的,书写压力可以通过获取电磁笔采集的每个轨迹点的书写压力值得到。
实施中,当所述仿真笔型为毛笔,且轨迹点的书写速度大于速度阈值,或书写压力小于压力阈值时,对所述K个子轮廓的部分子轮廓进行像素填充,产生飞白效果的纹理。
方式2、当所述仿真笔型为毛笔,且所述轨迹点的书写速度或书写压力不满足预设要求时,对所述K个子轮廓的全部子轮廓进行像素填充;
在一些实施例中,当所述仿真笔型为非毛笔或所述轨迹点的书写速度或书写压力满足预设要求时,对笔画轮廓不进行分裂,即直接对笔画轮廓整体进行像素填充或不填充。
方式3、当所述仿真笔型为非毛笔时,对所述K个子轮廓的全部子轮廓进行像素填充。
实施中,当仿真笔型为毛笔时,为了提高毛笔的书写仿真效果,当轨迹点的书写速度或书写压力满足预设要求时,对部分子轮廓进行像素填充,从而产生飞白效果。
当仿真笔型为铅笔、钢笔等硬笔笔型时,无需产生飞白效果,可以对全部子轮廓进行像素填充。
步骤4、控制所述显示屏显示所述笔画。
需要说明的是,本实施例中的笔画是经过填充后显示的,本实施例中的书写轨迹是指用户利用手指或书写笔在配置有触控功能的显示屏上直接书写生成的触控点信息(即轨迹点信息),硬件层获取该书写轨迹后会传递给仿真 算法进行处理,根据书写轨迹确定笔画,从而对笔画进行显示。
在一些实施例中,本实施例对K个子轮廓的部分子轮廓进行像素填充时,至少两个进行像素填充的子轮廓之间存在不进行像素填充的子轮廓。可以通过填充和不填充的子轮廓形成飞白效果。
在一些实施例中,从所述K个子轮廓中随机选取部分子轮廓进行像素填充;或,从所述K个子轮廓中选取部分子轮廓随机进行像素填充。
在一些实施例中,本实施例对述K个子轮廓的部分子轮廓进行像素填充的具体实施方式如下所示:
利用具有飞白特征的纹理图集,对所述笔画轮廓进行像素填充,所述飞白特征的纹理图集用于对所述K个子轮廓的部分子轮廓进行像素填充。
在一些实施例中,所述飞白特征的纹理图集包括多个纹理图案,不同的纹理图案用于表示不同的飞白特征;所述控制器具体被配置为执行:根据所述多个纹理图案,依次对所述笔画轮廓进行像素填充。
实施中,所述纹理图案是基于纹理数组确定的,所述纹理数组用于确定需填充的子轮廓的填充位置和填充方式。利用一个纹理图集中的多个纹理图案,对当前轨迹点和当前轨迹点之后的轨迹点对应的笔画轮廓进行像素填充,需要说明的是,本实施例中的每个纹理图案用于对一个或多个轨迹点对应的笔画轮廓进行像素填充,例如纹理图集包括8个纹理图案,则利用第1个纹理图案对第1-3个轨迹点对应的笔画轮廓进行像素填充,利用第2个纹理图案对第4-6个轨迹点对应的笔画轮廓进行像素填充,利用第3个纹理图案对第7-9个轨迹点对应的笔画轮廓进行像素填充,以此类推。
在一些实施例中,当利用不同的纹理图案对所述笔画轮廓进行像素填充时,所述笔画轮廓中进行像素填充的子轮廓的数量、位置以及填充的纹理类型中的至少一种不同。
实施中,设计了不同的纹理图案来实现不同的飞白纹理效果,具体实施方式如下:
方式1、当利用不同的纹理图案对所述笔画轮廓进行像素填充时,所述笔 画轮廓中未进行像素填充的子轮廓的数量或位置不同;
方式2、当利用不同的纹理图案对所述笔画轮廓进行像素填充,且所述笔画轮廓中未进行像素填充的子轮廓的数量和位置相同时,所述笔画轮廓中进行像素填充的子轮廓填充的纹理类型不同。
可选的,本实施例中的纹理类型包括但不限于散点填充、实心填充等。
在一些实施例中,所述纹理图集包括按顺序排列的多个纹理图案;所述控制器具体被配置为执行:根据所述多个纹理图案的排列顺序,依次对所述笔画轮廓进行像素填充。
实施中,本实施例中的纹理图案是顺序排列的,并且相邻的纹理图案满足一定的规则,从而避免由于相邻纹理图案的突变导致的纹理断裂、突变的问题,具体满足的规则如下所示:
相邻的纹理图案之间的飞白特征的差异度小于差异度阈值。其中,飞白特征的差异度用于表示不同纹理图案之间产生飞白效果的差异性,该差异度是由于纹理图案对所述笔画轮廓进行像素填充时,所述笔画轮廓中进行像素填充的子轮廓的数量、位置以及填充的纹理类型中的至少一种因素确定的。
在一些实施例中,相邻的纹理图案填充的笔画轮廓包括位置相同且填充方式不同的至少一组子轮廓;
在相邻的纹理图案各自填充的笔画轮廓中,所述至少一组子轮廓中具有相邻关系的子轮廓的数量小于差异度阈值;
其中,所述子轮廓在所述笔画轮廓中顺序排列,所述具有相邻关系的子轮廓的在所述笔画轮廓中的排列次序是连续的。
实施中,以相邻的纹理图案1和纹理图案2为例进行具体说明,如图2所示,本实施例提供一种纹理图案的填充对比示意图;纹理图案1对轨迹点1的笔画轮廓1进行像素填充,纹理图案2对轨迹点2的笔画轮廓2进行像素填充;笔画轮廓1包括顺序排列的8个子轮廓(分别是子轮廓1、子轮廓2、子轮廓3、子轮廓4、子轮廓5、子轮廓6、子轮廓7、子轮廓8),笔画轮廓2包括顺序排列的8个子轮廓;
若纹理图案1和纹理图案2填充的笔画轮廓包括位置相同且填充方式不同的至少一组子轮廓,例如纹理图案1对填充的笔画轮廓1中的子轮廓3和子轮廓4都采用散点填充,纹理图案2对填充的笔画轮廓2中的子轮廓3和子轮廓4都采用实心填充,此时具有相邻关系的子轮廓的数量为2,即具有相邻关系的子轮廓(子轮廓3和子轮廓4)的数量应满足小于差异度阈值,例如具有相邻关系的子轮廓的数量应小于3。
在一些实施例中,所述填充方式包括多种纹理类型的纹理填充和不填充中的至少一种;所述不填充表示不进行像素填充;相邻的纹理图案具体如下任一或任多种规则:
规则1、相邻的纹理图案填充的笔画轮廓包括位置相同且纹理填充的纹理类型不同的至少一组子轮廓,在相邻的纹理图案各自填充的笔画轮廓中,所述至少一组子轮廓中具有相邻关系的子轮廓的数量小于第一差异度阈值。
实施中,以相邻的纹理图案1和纹理图案2为例进行具体说明,纹理图案1对轨迹点1的笔画轮廓1进行像素填充,纹理图案2对轨迹点2的笔画轮廓2进行像素填充;笔画轮廓1包括顺序排列的8个子轮廓(分别是子轮廓1、子轮廓2、子轮廓3、子轮廓4、子轮廓5、子轮廓6、子轮廓7、子轮廓8),笔画轮廓2包括顺序排列的8个子轮廓;
若纹理图案1和纹理图案2填充的笔画轮廓包括位置相同且填充方式不同的至少一组子轮廓,如图3所示,本实施例提供一种纹理图案的填充对比示意图,例如纹理图案1对填充的笔画轮廓1中的子轮廓3采用实心填充,子轮廓4采用散点填充,纹理图案2对填充的笔画轮廓2中的子轮廓3采用散点填充,子轮廓4都采用实心填充,此时具有相邻关系的子轮廓的数量为2,即具有相邻关系的子轮廓(子轮廓3和子轮廓4)的数量应满足小于第一差异度阈值,例如具有相邻关系的子轮廓的数量应小于4。
如图4所示,本实施例提供一种纹理图案的填充对比示意图,当设置具有相邻关系的子轮廓的数量小于3时,纹理图案1对填充的笔画轮廓1中的子轮廓3采用实心填充,子轮廓4采用散点填充,子轮廓7采用实心填充, 子轮廓8采用散点填充;纹理图案2对填充的笔画轮廓2中的子轮廓3采用散点填充,子轮廓4都采用实心填充,子轮廓7采用散点填充,子轮廓8都采用实心填充;此时,具有相邻关系的子轮廓的数量为2,具有相邻关系的子轮廓(子轮廓3和子轮廓4)的数量小于3,具有相邻关系的子轮廓(子轮廓7和子轮廓8)的数量也小于3,满足纹理图案的变化要求。
规则2、相邻的纹理图案填充的笔画轮廓包括位置相同且一个子轮廓进行纹理填充,另一个子轮廓不填充的至少一组子轮廓,在相邻的纹理图案各自填充的笔画轮廓中,所述至少一组子轮廓中具有相邻关系的子轮廓的数量小于第二差异度阈值。
可选的,所述第一差异度阈值大于所述第二差异度阈值。
实施中,以相邻的纹理图案1和纹理图案2为例进行具体说明,纹理图案1对轨迹点1的笔画轮廓1进行像素填充,纹理图案2对轨迹点2的笔画轮廓2进行像素填充;笔画轮廓1包括顺序排列的8个子轮廓(分别是子轮廓1、子轮廓2、子轮廓3、子轮廓4、子轮廓5、子轮廓6、子轮廓7、子轮廓8),笔画轮廓2包括顺序排列的8个子轮廓;
若纹理图案1和纹理图案2填充的笔画轮廓包括位置相同且填充方式不同的至少一组子轮廓,如图5所示,本实施例提供一种纹理图案的填充对比示意图,例如纹理图案1对填充的笔画轮廓1中的子轮廓3采用实心填充,子轮廓4采用散点填充,纹理图案2对填充的笔画轮廓2中的子轮廓3和子轮廓4都不填充,此时具有相邻关系的子轮廓的数量为2,即具有相邻关系的子轮廓(子轮廓3和子轮廓4)的数量应满足小于第二差异度阈值,例如具有相邻关系的子轮廓的数量应小于3。当第二差异度阈值设置为2时,具有相邻关系的子轮廓的数量是一个,作为一种特殊情况,例如,纹理图案1对填充的笔画轮廓1中的子轮廓1采用实心填充,纹理图案2对填充的笔画轮廓2中的子轮廓1不填充,即具有相邻关系的子轮廓的数量(子轮廓3)是1个。
通过设置差异度阈值(第一差异度阈值或第二差异度阈值)的方式,避免相邻纹理图案中发生纹理断裂或突变的情况,提高仿真效果。
在一些实施例中,所述纹理图案填充的笔画轮廓的子轮廓中,合并子轮廓的数量小于设定值;其中所述合并子轮廓表示纹理填充的纹理类型相同且具有相邻关系的子轮廓;所述子轮廓在所述笔画轮廓中顺序排列,所述具有相邻关系的子轮廓的在所述笔画轮廓中的排列次序是连续的。
实施中,以纹理图案填充的笔画轮廓包括顺序排列的8个子轮廓(分别是子轮廓1、子轮廓2、子轮廓3、子轮廓4、子轮廓5、子轮廓6、子轮廓7、子轮廓8为例,若子轮廓2、子轮廓3采用散点填充,子轮廓4、子轮廓5采用实心填充、子轮廓7、子轮廓8采用散点填充,则将子轮廓2、子轮廓3合并,子轮廓4、子轮廓5合并,子轮廓7、子轮廓8合并,此时合并子轮廓的数量为3个,则3应小于设定值。
在一些实施例中,所述纹理图案包括第一纹理图案和第二纹理图案;所述第一纹理图案填充的笔画轮廓的子轮廓中,合并子轮廓的数量小于所述第二纹理图案。
实施中,第一纹理图案填充的笔画轮廓的子轮廓中,合并子轮廓的数量,应小于第二纹理图案填充的笔画轮廓的子轮廓中,合并子轮廓的数量。
由于第一纹理图案用于在全填充和飞白填充之间充当过渡的角色,为了很好地实现全填充和飞白填充之间的纹理过渡,设置第一纹理图案中合并子轮廓的数量小于第二纹理图案。
在一些实施例中,所述纹理图案包括第一纹理图案和第二纹理图案;所述第一纹理图案的飞白程度低于所述第二纹理图案,所述飞白程度表示所述笔画轮廓中未进行像素填充的子轮廓的数量;所述控制器具体被配置为执行:按照从第一纹理图案到第二纹理图案的顺序,依次对所述笔画轮廓进行像素填充。
实施中,按从第一纹理图案到第二纹理图案的顺序,依次对当前轨迹点的笔画轮廓和当前轨迹点之后的轨迹点的笔画轮廓进行像素填充。
在一些实施例中,所述纹理图案包括顺序排列的第一纹理图案和顺序排列的第二纹理图案;所述控制器具体被配置为执行:
(1)若未使用纹理图集对上一轨迹点对应的笔画轮廓进行像素填充,则根据所述第一纹理图案,对当前轨迹点对应的笔画轮廓进行像素填充;实施中,可以按照第一纹理图案的排列顺序,依次对当前轨迹点和当前轨迹点之后的轨迹点的笔画轮廓进行像素填充。
(2)若使用纹理图集对上一轨迹点对应的笔画轮廓进行像素填充,则根据使用的纹理图集的纹理图案的排列顺序,对当前轨迹点和当前轨迹点之后的轨迹点对应的笔画轮廓进行像素填充。
在一些实施例中,当利用纹理图集中的多个纹理图案进行像素填充时,间隔至少一个轨迹点更换一次对应的纹理图案。
在一些实施例中,当利用纹理图集中的多个纹理图案进行像素填充时,间隔N个轨迹点更换一次对应的第一纹理图案;和/或,间隔M个轨迹点更换一次对应的第二纹理图案。
可选的,所述N小于M。
可选的,所述N是预设值,或,所述N是利用所述纹理数组进行像素填充的第1个轨迹点的采样时间确定的。
可选的,所述M是预设值,或,所述M是利用所述纹理数组进行像素填充的第1个轨迹点的采样时间确定的。
在一些实施例中,所述纹理图案包括多个第二纹理图案,所述控制器具体被配置为执行:
当利用多个第二纹理图案进行像素填充时,按照第二纹理正向组和第二纹理反向组依次交替排列的顺序,选择第二纹理图案,对当前轨迹点和当前轨迹点之后的轨迹点进行像素填充;
所述第二纹理正向组包括多个顺序排列的第二纹理图案,所述第二纹理反向组包括多个倒序排列的第二纹理图案。
本实施例中的第二纹理正向组和第二纹理反向组包含的第二纹理图案是相同的,但是第二纹理图案的排列顺序是不同的,通过Z字型的顺序能够实现纹理渐变的效果,避免纹理断裂或突变的情况,而且只需要存储少量的纹 理图案就能实现更好的纹理渐变效果,有效节省了存储空间。
实施中,按照Z字型的顺序,以纹理图案包括5个顺序排列的第二纹理图案(分别是纹理图案1、纹理图案2、纹理图案3、纹理图案4、纹理图案5)为例,其中第一纹理正向组包括顺序排列的纹理图案1、纹理图案2、纹理图案3、纹理图案4、纹理图案5,第二纹理正向组包括倒序排列的纹理图案5、纹理图案4、纹理图案3、纹理图案2、纹理图案1;
则可以按照纹理图案1、纹理图案2、纹理图案3、纹理图案4、纹理图案5、纹理图案5、纹理图案4、纹理图案3、纹理图案2、纹理图案1、纹理图案1、纹理图案2、纹理图案3、纹理图案4、纹理图案5……的顺序依次选择纹理图案对各个轨迹点对应的笔画轮廓进行像素填充。
其中,本实施例中的纹理图案是基于纹理数组确定的。
在一些实施例中,所述纹理图集包括多个,不同的纹理图集用于表示不同的飞白特征,所述控制器具体被配置为执行:
存储所述多个纹理图集;从所述多个纹理图集中选择一个纹理图集,对所述笔画轮廓进行像素填充。
可选的,从多个纹理图集中任意选择一个纹理图集,对所述笔画轮廓进行像素填充;或,根据所述轨迹点的采样时间,从多个纹理图集中选择对应的纹理图集,对所述笔画轮廓进行像素填充。
在一些实施例中,当上一轨迹点采用全填充的方式,且当前轨迹点采用飞白填充的方式时,从所述多个纹理图集中选择一个纹理图集,对所述当前轨迹点的笔画轮廓进行像素填充;其中所述全填充用于对所述轨迹点的笔画轮廓进行像素填充,所述飞白填充用于对所述轨迹点的笔画轮廓的部分子轮廓进行像素填充。
需要说明的是,本实施例中的纹理图案是基于纹理数组确定的,所述纹理数组用于确定需填充的子轮廓的填充位置和填充方式。
可选的,本实施例通过如下方式对部分子轮廓进行像素填充:
从预先存储的纹理集合中选择一个纹理数组,所述纹理集合包括多个纹 理数组,所述纹理数组用于确定需填充的子轮廓的填充位置和填充方式;每个纹理数组用于对连续的多个轨迹点对应的笔画轮廓进行像素填充;根据选择的纹理数组,对所述部分子轮廓进行像素填充。
在一些实施例中,当所述仿真笔型为毛笔,且所述轨迹点的书写速度或书写压力满足预设要求时,对所述K个子轮廓的部分子轮廓进行像素填充,具体通过如下方式对部分子轮廓进行像素填充:
从预先存储的纹理集合中选择一个纹理数组,所述纹理集合包括多个纹理数组,所述纹理数组用于确定需填充的子轮廓的填充位置和填充方式;每个纹理数组用于对连续的多个轨迹点对应的笔画轮廓进行像素填充;根据选择的纹理数组,对所述部分子轮廓进行像素填充。
可选的,本实施例中的填充方式包括但不限于散点填充、实心填充和不填充。
本实施例中的纹理数组用于确定纹理图案,利用纹理图案对笔画轮廓进行填充。实施中,若设置K=20,如下所示给出一个包含8个纹理数组的纹理集合,以第一个纹理数组为例,该纹理数组的{0,2,1}中前两位表示从第1个到第3个子轮廓(不包含第3个)需进行填充,第三位数值为1表示采用实心填充方式;{2,3,2}中前两位表示从第3个到第4个子轮廓(不包含第4个)需进行填充,第三位数值为2表示采用随机散点填充方式;以第三个纹理数组为例,该纹理数组的{0,2,2}中前两位表示从第1个到第3个子轮廓(不包含第3个)需进行填充,第三位数值为2表示采用随机散点填充方式,{3,9,1}中前两位表示从第4个到第10个子轮廓(不包含第10个)需进行填充,第三位数值为1表示采用实心填充方式,{10,15,1}中前两位表示从第11个到第16个子轮廓(不包含第16个)需进行填充,第三位数值为1表示采用实心填充方式,{15,16,2}中前两位表示从第16个到第17个子轮廓(不包含第17个)需进行填充,第三位数值为2表示采用随机散点填充方式,{16,20,1}中前两位表示从第17个到第21个子轮廓(不包含第21个)需进行填充,第三位数值为1表示采用实心填充方式;以第五个纹理数组为例,该纹理数组 的{3,6,1}中前两位表示从第4个到第7个子轮廓(不包含第7个)需进行填充,第三位数值为1表示采用实心填充方式,{6,8,2}中前两位表示从第7个到第9个子轮廓(不包含第9个)需进行填充,第三位数值为2表示采用随机散点填充方式,{10,11,1}中前两位表示从第11个到第12个子轮廓(不包含第12个)需进行填充,第三位数值为1表示采用实心填充方式,{11,13,2}中前两位表示从第12个到第14个子轮廓(不包含第14个)需进行填充,第三位数值为2表示采用随机散点填充方式,{13,17,1}中前两位表示从第14个到第18个子轮廓(不包含第18个)需进行填充,第三位数值为1表示采用实心填充方式,{18,20,1}中前两位表示从第19个到第21个子轮廓(不包含第21个)需进行填充,第三位数值为1表示采用实心填充方式;以此类推。
{{{0,2,1},{2,3,2},{3,20,1}},
{{0,2,1},{3,20,1}},
{{0,2,2},{3,9,1},{10,15,1},{15,16,2},{16,20,1}},
{{0,1,2},{3,8,1},{8,9,2},{11,13,2},{13,16,1},{17,20,1}},
{{3,6,1},{6,8,2},{10,11,1},{11,13,2},{13,17,1},{18,20,1}},
{{2,6,1},{6,9,2},{10,13,2},{13,16,1},{17,20,1}},
{{2,6,1},{6,8,2},{8,9,1},{10,12,2},{12,13,1},{14,20,1}},
{{0,1,2},{2,6,1},{6,9,2},{10,12,2},{12,13,1},{14,20,1}}
}
在一些实施例中,所述纹理集合包括顺序排列的多个纹理数组;按多个纹理数组的顺序,依次对所述笔画轮廓进行像素填充。
实施中,按多个纹理数组的顺序,依次对所述轨迹点和所述轨迹点之后的轨迹点对应的笔画轮廓进行像素填充。
实施中,按照多个纹理数组的排列顺序,依次对各个轨迹点对应的笔画轮廓进行像素填充,为了使得纹理过渡更加自然,避免出现纹理断裂、突变等问题,本实施例对相邻纹理数组进行如下设计:
相邻的纹理数组填充的笔画轮廓包括位置相同且填充方式不同的至少一组子轮廓;
在相邻的纹理数组各自填充的笔画轮廓中,所述至少一组子轮廓中具有相邻关系的子轮廓的数量小于差异度阈值;
其中,所述子轮廓在所述笔画轮廓中顺序排列,所述具有相邻关系的子轮廓的在所述笔画轮廓中的排列次序是连续的。
实施中,以相邻的纹理数组1和纹理数组2为例进行具体说明,纹理数组1对笔画轮廓1进行像素填充,纹理数组2对笔画轮廓2进行像素填充;笔画轮廓1包括顺序排列的8个子轮廓(分别是子轮廓1、子轮廓2、子轮廓3、子轮廓4、子轮廓5、子轮廓6、子轮廓7、子轮廓8),笔画轮廓2包括顺序排列的8个子轮廓;
若纹理数组1和纹理数组2填充的笔画轮廓包括位置相同且填充方式不同的至少一组子轮廓,例如纹理数组1对填充的笔画轮廓1中的子轮廓3采用实心填充,子轮廓4采用散点填充,纹理数组2对填充的笔画轮廓2中的子轮廓3采用散点填充,子轮廓4都采用实心填充,即具有相邻关系的子轮廓(子轮廓3和子轮廓4)的数量应满足小于第一差异度阈值,例如具有相邻关系的子轮廓的数量应小于4。
又如,当设置具有相邻关系的子轮廓的数量小于3时,纹理数组1对填充的笔画轮廓1中的子轮廓3采用实心填充,子轮廓4采用散点填充,子轮廓7采用实心填充,子轮廓8采用散点填充;
纹理数组2对填充的笔画轮廓2中的子轮廓3采用散点填充,子轮廓4都采用实心填充,子轮廓7采用散点填充,子轮廓8都采用实心填充;
此时,具有相邻关系的子轮廓(子轮廓3和子轮廓4)的数量小于3,具有相邻关系的子轮廓(子轮廓7和子轮廓8)的数量也小于3,满足纹理数组的变化要求。
在一些实施例中,所述填充方式包括多种纹理类型的纹理填充和不填充中的至少一种;所述不填充表示不进行像素填充;需要说明的是,本实施例中的不填充,不代表相应的显示区域没有颜色显示,例如当显示屏是电子墨水屏时,不填充的显示区域可能没有颜色显示,但是当显示屏是液晶显示屏 时,不填充表示不根据用户选择的填充颜色进行像素填充,但是不填充对应的显示区域也可能显示其他背景颜色,例如在安装手写软件的情况下,可能在对应的显示区域显示该手写软件的背景颜色。
相邻纹理数组的设计规则如下:
规则1、相邻的纹理数组填充的笔画轮廓包括位置相同且纹理填充的纹理类型不同的至少一组子轮廓,在相邻的纹理数组各自填充的笔画轮廓中,所述至少一组子轮廓中具有相邻关系的子轮廓的数量小于第一差异度阈值。
实施中,以相邻的纹理数组1和纹理数组2为例进行具体说明,纹理数组1对轨迹点1的笔画轮廓1进行像素填充,纹理数组2对轨迹点2的笔画轮廓2进行像素填充;笔画轮廓1包括顺序排列的8个子轮廓(分别是子轮廓1、子轮廓2、子轮廓3、子轮廓4、子轮廓5、子轮廓6、子轮廓7、子轮廓8),笔画轮廓2包括顺序排列的8个子轮廓;
若纹理数组1和纹理数组2填充的笔画轮廓包括位置相同且填充方式不同的至少一组子轮廓,如图6所示,本实施例提供一种纹理图案的填充对比示意图,例如纹理数组1对填充的笔画轮廓1中的子轮廓3采用实心填充,子轮廓4和子轮廓5都采用散点填充,纹理数组2对填充的笔画轮廓2中的子轮廓3采用散点填充,子轮廓4和子轮廓5都采用实心填充,此时具有相邻关系的子轮廓的数量为3,即具有相邻关系的子轮廓(子轮廓3、子轮廓4和子轮廓5)的数量应满足小于第一差异度阈值,例如具有相邻关系的子轮廓的数量应小于4。
如图7所示,本实施例提供一种纹理图案的填充对比示意图,又如,当设置具有相邻关系的子轮廓的数量小于3时,纹理数组1对填充的笔画轮廓1中的子轮廓3采用实心填充,子轮廓4采用散点填充,子轮廓7采用实心填充,子轮廓8采用散点填充;纹理数组2对填充的笔画轮廓2中的子轮廓3采用散点填充,子轮廓4采用实心填充,子轮廓7采用散点填充,子轮廓8采用实心填充;此时,具有相邻关系的子轮廓的数量为2,具有相邻关系的子轮廓(子轮廓3和子轮廓4)的数量小于3,具有相邻关系的子轮廓(子轮廓 7和子轮廓8)的数量也小于3,满足纹理数组的变化要求。
例如,当第一差异度阈值为3时,纹理数组1最多存在两个子轮廓的填充方式为实心填充(全黑填充),纹理数组2最多存在两个子轮廓的填充方式为散点填充,并且纹理数组1中两个子轮廓的位置(如子轮廓3和子轮廓4)和纹理数组2中两个子轮廓的位置是相同的。即纹理数组1中子轮廓3和子轮廓4的填充方式为实心填充,纹理数组2中子轮廓3和子轮廓4的填充方式为散点填充。
规则2、相邻的纹理数组填充的笔画轮廓包括位置相同且一个子轮廓进行纹理填充,另一个子轮廓不填充的至少一组子轮廓,在相邻的纹理数组各自填充的笔画轮廓中,所述至少一组子轮廓中具有相邻关系的子轮廓的数量小于第二差异度阈值。
可选的,所述第一差异度阈值大于所述第二差异度阈值。
实施中,以相邻的纹理数组1和纹理数组2为例进行具体说明,纹理数组1对轨迹点1的笔画轮廓1进行像素填充,纹理数组2对轨迹点2的笔画轮廓2进行像素填充;笔画轮廓1包括顺序排列的8个子轮廓(分别是子轮廓1、子轮廓2、子轮廓3、子轮廓4、子轮廓5、子轮廓6、子轮廓7、子轮廓8),笔画轮廓2包括顺序排列的8个子轮廓;
若纹理数组1和纹理数组2填充的笔画轮廓包括位置相同且填充方式不同的至少一组子轮廓,如图8所示,本实施例提供一种纹理图案的填充对比示意图,例如纹理数组1对填充的笔画轮廓1中的子轮廓3采用实心填充,子轮廓4采用散点填充,纹理数组2对填充的笔画轮廓2中的子轮廓3和子轮廓4都不填充,此时具有相邻关系的子轮廓的数量为2,即具有相邻关系的子轮廓(子轮廓3和子轮廓4)的数量应满足小于第二差异度阈值,例如具有相邻关系的子轮廓的数量应小于3。当第二差异度阈值设置为2时,具有相邻关系的子轮廓的数量是一个,作为一种特殊情况,例如,纹理数组1对填充的笔画轮廓1中的子轮廓1采用实心填充,纹理数组2对填充的笔画轮廓2中的子轮廓1不填充,即具有相邻关系的子轮廓的数量(子轮廓3)是1个; 纹理数组1对填充的笔画轮廓1中的子轮廓7不填充,纹理数组2对填充的笔画轮廓2中的子轮廓7采用散点填充,即具有相邻关系的子轮廓的数量(子轮廓7)是1个。
通过设置差异度阈值(第一差异度阈值或第二差异度阈值)的方式,避免相邻纹理数组中发生纹理断裂或突变的情况,提高仿真效果。
在一些实施例中,所述纹理数组包括第一纹理数组和第二纹理数组,所述第一纹理数组进行像素填充的子轮廓的数量高于所述第二纹理数组;所述控制器具体被配置为按照从第一纹理数组到第二纹理数组的顺序,依次对所述笔画轮廓进行像素填充。
在一些实施例中,所述纹理数组填充的笔画轮廓的子轮廓中,合并子轮廓的数量小于设定值;其中所述合并子轮廓表示纹理填充的纹理类型相同且具有相邻关系的子轮廓;所述子轮廓在所述笔画轮廓中顺序排列,所述具有相邻关系的子轮廓的在所述笔画轮廓中的排列次序是连续的。
可选的,所述纹理数组包括第一纹理数组和第二纹理数组;
所述第一纹理数组填充的笔画轮廓的子轮廓中,合并子轮廓的数量小于所述第二纹理数组。
若所述第一纹理数组中存在连续的子轮廓采用相同的填充方式,则所述连续的子轮廓合并得到的合并子轮廓的数量小于设定值。所述设定值可以是基于笔画轮廓分裂得到的子轮廓的数量K确定的,例如设定值为K/4。
可选的,所述纹理数组包括顺序排列的第一纹理数组和顺序排列的第二纹理数组,所述第二纹理数组在所述第一纹理数组之后排列;所述控制器具体被配置为按照从第一纹理数组到第二纹理数组的顺序,依次对所述笔画轮廓进行像素填充。
实施中,当按照所述第一纹理数组的顺序,依次对多个轨迹点对应的笔画轮廓进行像素填充后,按照所述第二纹理数组的顺序,依次对多个轨迹点对应的笔画轮廓进行像素填充。
例如以一个包含8个纹理数组的纹理集合为例,其中,该纹理集合包含3 个第一纹理数组和5个第二纹理数组,各个纹理数组在纹理集合中顺序排列为纹理数组1、纹理数组2、纹理数组3、纹理数组4、纹理数组5、纹理数组6、纹理数组7、纹理数组8,其中,第一纹理数组包括顺序排列的纹理数组1、纹理数组2、纹理数组3;第二纹理数组包括顺序排列的纹理数组4、纹理数组5、纹理数组6、纹理数组7、纹理数组8,实施中,先按照纹理数组1、纹理数组2、纹理数组3的顺序对笔画轮廓进行像素填充后,再按照纹理数组4、纹理数组5、纹理数组6、纹理数组7、纹理数组8的顺序,对笔画轮廓进行像素填充。
本实施例中的第一纹理数组用于实现全部子轮廓填充与部分子轮廓填充之间的过渡,在设置第一纹理数组时,考虑到过渡的自然,设置合并子轮廓的数量小于设定值,如设置合并子轮廓的数量小于K/4。本实施例中的第二纹理数组用于实现不同的飞白纹理填充。
需要说明的是,本实施例中的第一纹理图案是基于第一纹理数组确定的,第二纹理图案是基于第二纹理数组确定的。第一纹理图案用于在全填充和飞白填充之间实现过渡填充,第二纹理图案用于进行飞白填充。
在一些实施例中,通过如下方式选择纹理数组:
方式1、若未使用纹理集合对上一轨迹点对应的笔画轮廓进行像素填充,则根据第一纹理数组,对当前轨迹点对应的笔画轮廓进行像素填充。
实施中,判断是否对上一个轨迹点进行全填充,即对笔画轮廓进行像素填充,其中笔画轮廓可以是未分裂成K个子轮廓的笔画轮廓,也可以是分裂成K个子轮廓的笔画轮廓,将笔画轮廓作为一个整体进行一次性填充;
在一些实施例中,所述纹理数组包括多个按顺序排列的第一纹理数组;若对上一个轨迹点对应的笔画轮廓进行像素填充,则利用第1个第一纹理数组对当前轨迹点对应的部分子轮廓进行像素填充。实施中,当首次从全填充到飞白填充变换时,按顺序依次选择用于过渡的第一纹理数组对各轨迹点对应的笔画轮廓进行像素填充。
方式2、若使用纹理集合对上一轨迹点对应的笔画轮廓进行像素填充,则 根据使用的纹理集合的纹理数组的排列顺序,对当前轨迹点和当前轨迹点之后的轨迹点对应的笔画轮廓进行像素填充。
可选的,若使用纹理集合对上一个轨迹点对应的笔画轮廓进行像素填充,则确定为上一个轨迹点选择的纹理数组的排列次序,以及利用所述排列次序的纹理数组进行像素填充的轨迹点的数量;根据所述排列次序和轨迹点的数量,从多个纹理数组中确定一个纹理数组,对当前轨迹点对应的部分子轮廓进行像素填充。
在一些实施例中,若所述轨迹点的数量达到所述排列次序的纹理数组对应的数量阈值,则将在所述排列次序的纹理数组之后排列的第1个纹理数组,确定为当前轨迹点对应的纹理数组;
若所述轨迹点的数量未达到所述排列次序的纹理数组对应的数量阈值,则将所述排列次序的纹理数组,确定为当前轨迹点对应的纹理数组;所述第一纹理数组对应的数量阈值小于所述第二纹理数组。
例如以一个包含8个纹理数组的纹理集合为例,其中,该纹理集合包含3个第一纹理数组和5个第二纹理数组,各个纹理数组在纹理集合中顺序排列为纹理数组1、纹理数组2、纹理数组3、纹理数组4、纹理数组5、纹理数组6、纹理数组7、纹理数组8,其中,第一纹理数组包括顺序排列的纹理数组1、纹理数组2、纹理数组3;第二纹理数组包括顺序排列的纹理数组4、纹理数组5、纹理数组6、纹理数组7、纹理数组8,实施中,先按照纹理数组1、纹理数组2、纹理数组3的顺序对笔画轮廓进行像素填充后,再按照纹理数组4、纹理数组5、纹理数组6、纹理数组7、纹理数组8的顺序,对笔画轮廓进行像素填充。
实施中,例如若该纹理数组1的数量阈值为3,当前已经对3个轨迹点完成对应的笔画轮廓的像素填充,则确定当前轨迹点对应的纹理数组为纹理数组2;若该纹理数组4的数量阈值为5,当前已经对5个轨迹点完成对应的笔画轮廓的像素填充,则确定当前轨迹点对应的纹理数组为纹理数组5。
若该纹理数组1的数量阈值为3,当前已经对2个轨迹点完成对应的笔画 轮廓的像素填充,则确定当前轨迹点对应的纹理数组为纹理数组1;若该纹理数组4的数量阈值为5,当前已经对3个轨迹点完成对应的笔画轮廓的像素填充,则确定当前轨迹点对应的纹理数组为纹理数组4。
可选的,当利用纹理集合中的多个纹理数组进行像素填充时,间隔N个轨迹点更换一次对应的第一纹理数组;和/或,间隔M个轨迹点更换一次对应的第二纹理数组。
可选的,所述N小于M。
可选的,所述N是预设值,或,所述N是利用所述纹理数组进行像素填充的第1个轨迹点的采样时间确定的。
可选的,所述M是预设值,或,所述M是利用所述纹理数组进行像素填充的第1个轨迹点的采样时间确定的。
实施中,选择一个纹理集合后,依次按照前N个第一纹理数组产生过渡区间的纹理,按照间隔M个第二纹理数组产生飞白效果的纹理。一般的,每一次改变纹理设置的间隔不宜太长,以保证能够快速从全填充过渡到飞白分裂。本实施例中,可以设置每间隔3个轨迹点更换一次过渡区间的纹理,即每间隔3个轨迹点更换一个第一纹理数组,每个第一纹理数组用于对连续的3个轨迹点对应的笔画轮廓进行像素填充。
在一些实施例中,所述纹理数组包括多个第二纹理数组,所述控制器具体被配置为执行如下步骤:
当利用多个第二纹理数组进行像素填充时,按照第二纹理正向数组和第二纹理反向数组依次交替排列的顺序,选择第二纹理数组,对当前轨迹点和当前轨迹点之后的轨迹点进行像素填充;
所述第二纹理正向数组包括多个顺序排列的第二纹理数组,所述第二纹理反向数组包括多个倒序排列的第二纹理数组。
实施中,可以按照Z字型的顺序选择第二纹理数组,用于产生飞白效果的纹理。实施中,第一纹理数组在第二纹理数组前排列,如纹理集合中包括纹理数组1、纹理数组2、纹理数组3、纹理数组4、纹理数组5、纹理数组6、 纹理数组7、纹理数组8,其中,纹理数组1、纹理数组2、纹理数组3为第一纹理数组,纹理数组4、纹理数组5、纹理数组6、纹理数组7、纹理数组8为第二纹理数组。可以按照纹理数组4、纹理数组5、纹理数组6、纹理数组7、纹理数组8、纹理数组8、纹理数组7、纹理数组6、纹理数组5、纹理数组4、纹理数组4、纹理数组5、纹理数组6、纹理数组7、纹理数组8……的顺序依次选择纹理数组对各个轨迹点对应的笔画轮廓进行像素填充。
可选的,可以设置每隔5个轨迹点更换一个第二纹理数组。每个第二纹理数组用于对5个轨迹点对应的笔画轮廓进行像素填充。
在一些实施例中,当绘图方式由飞白分裂向全填充变换时,可以按照倒序从当前抽取的纹理数组向第一个纹理数组依次进行抽取数组产生纹理。具体如下所示:
(1)若上一个轨迹点选择的纹理数组为顺序排列的第二纹理数组的最后一个,则按照倒序排列的第二纹理数组的排列次序,依次为当前轨迹点和当前轨迹点之后的轨迹点确定对应的第二纹理数组;
可选的,若上一个轨迹点选择的纹理数组为顺序排列的第二纹理数组的最后一个,且所述轨迹点的数量达到第二纹理数组对应的数量阈值,则按照倒序排列的第二纹理数组的排列次序,依次为当前轨迹点和当前轨迹点之后的轨迹点确定对应的第二纹理数组。
(2)若上一个轨迹点选择的纹理数组为倒序排列的第二纹理数组的最后一个,则按照顺序排列的第二纹理数组的排列次序,依次为当前轨迹点和当前轨迹点之后的轨迹点确定对应的第二纹理数组。
可选的,若上一个轨迹点选择的纹理数组为倒序排列的第二纹理数组的最后一个,且所述轨迹点的数量达到第二纹理数组对应的数量阈值,则按照顺序排列的第二纹理数组的排列次序,依次为当前轨迹点和当前轨迹点之后的轨迹点确定对应的第二纹理数组。
实施中,当选择稀疏飞白区间的第二纹理数组时,每隔5个轨迹点更换一次纹理数组;当选择过渡区间的第一纹理数组时,每隔3个轨迹点更换一 次纹理数组。
在一些实施例中,每个纹理数组进行像素填充的轨迹点的数量阈值是预设值;或,
每个纹理数组进行像素填充的轨迹点的数量阈值,是利用所述纹理数组进行像素填充的第1个轨迹点的采样时间确定的。
实施中,利用所述纹理数组进行像素填充的第1个轨迹点的采样时间作为随机种子,生成伪随机数,根据伪随机数确定每个纹理数组进行像素填充的轨迹点的数量阈值。
实施中,通过如下方式确定每个纹理数组进行像素填充的轨迹点的数量阈值:
若当前轨迹点和上一轨迹点对应的纹理数组不同,则根据当前轨迹点的采样时间确定持续数量T,T≥1;
根据所述当前轨迹点对应的纹理数组,对当前轨迹点和当前轨迹点之后的T-1个轨迹点对应的子轮廓进行像素填充。
实施中,为了进一步增加纹理变化的自然性,当处于过渡区间时,在每次更换第一纹理数组的第一个轨迹点处,将轨迹点的采样时间戳作为随机种子,产生2到4的伪随机数,作为本次纹理数组对应的轨迹点的数量阈值;当处于稀疏飞白区间时,在每次更换第二纹理数组的第一个轨迹点处,将轨迹点的采样时间戳作为随机种子,产生4到7的伪随机数,作为本次纹理数组对应的轨迹点的数量阈值。
在一些实施例中,所述纹理集合包括多个,不同的纹理集合用于表示不同的纹理填充特征,所述控制器具体被配置为:
存储多个所述纹理集合;从所述多个纹理集合中选择一个纹理集合,对所述笔画轮廓进行像素填充。
在一些实施例中,所述纹理集合包括多个,不同的纹理集合用于表示不同的纹理填充特征,通过如下方式选择一个纹理集合:
方式1、从多个纹理集合中任意选择一个纹理集合,从所述纹理集合中选 择一个纹理数组;
方式2、根据所述轨迹点的采样时间,从多个纹理集合中选择对应的纹理集合,从所述对应的纹理集合中选择一个纹理数组;其中一个纹理集合的索引号对应一个伪随机数。
实施中,利用所述轨迹点的采样时间作为随机种子,生成伪随机数,从多个纹理集合中选择与所述伪随机数对应的纹理集合,从所述伪随机数对应的纹理集合中选择一个纹理数组。
可选的,所述控制器具体被配置为执行:
当上一轨迹点采用全填充的方式,且当前轨迹点采用飞白填充的方式时,从所述多个纹理集合中选择一个纹理集合,对所述当前轨迹点的笔画轮廓进行像素填充。
其中所述全填充用于对所述轨迹点的笔画轮廓进行像素填充,所述飞白填充用于对所述轨迹点的笔画轮廓的部分子轮廓进行像素填充。
在一些实施例中,本实施例还可以存储所述轨迹点的轨迹点信息;利用所述轨迹点信息包含的所述轨迹点的采样时间生成伪随机数,从多个纹理集合中选择对应的纹理集合;利用所述对应的纹理集合,重新对所述轨迹点的部分子轮廓进行像素填充。
实施中,利用所述轨迹点信息包含的所述轨迹点的采样时间生成伪随机数,从多个纹理集合中选择与所述伪随机数对应的纹理集合;利用所述伪随机数对应的纹理集合,重新对所述轨迹点的部分子轮廓进行像素填充。
需要说明的是,本实施例对笔画轮廓中的部分子轮廓进行像素填充后,当满足重绘触发条件时,利用所述伪随机数对应的纹理集合,重新对所述轨迹点的部分子轮廓进行像素填充。
在一些实施例中,还可以存储所述轨迹点的轨迹点信息,以及所述轨迹点对应的纹理数组的排列次序;利用所述排列次序对应的纹理数组,重新对所述轨迹点的部分子轮廓进行像素填充。
需要说明的是,本实施例对笔画轮廓中的部分子轮廓进行像素填充后, 当满足重绘触发条件时,利用所述排列次序对应的纹理数组,重新对所述轨迹点的部分子轮廓进行像素填充。
可选的,本实施例中的重绘触发条件包括但不限于:用户关闭文档后再次打开文档、翻页操作、重新加载文档等。实施中,当用户在某个文档中进行手写,并对手写对应的轨迹点的笔画轮廓中的部分子轮廓或笔画轮廓进行像素填充后,当用户关闭该文档并再次打开文档时,利用所述伪随机数对应的纹理集合,重新对所述轨迹点的部分子轮廓进行像素填充;或者,利用所述排列次序对应的纹理数组,重新对所述轨迹点的部分子轮廓进行像素填充。
实施中,当绘图方式首次由全填充向飞白分裂进行变换时,从多个纹理集合中随机挑选一个纹理集合作为本次轨迹点飞白分裂时的纹理变化的依据。随机挑选时,将应用层传递给算法层的本次轨迹点的采样时间戳信息作为随机种子,产生1到M之间的伪随机数,抽取索引号为该伪随机数的纹理集合即可。当满足重绘触发条件时,应用层会将预先存储的所有轨迹点信息再次传递给算法进行调用。利用相同的采样时间戳,算法层能够产生与实时绘制流程相同的伪随机数,保证两次绘制的纹理效果一致。
实施中,本实施例的纹理集合的纹理数组按照过渡区间纹理(第一纹理数组)、稀疏飞白纹理(第二纹理数组)的顺序进行存放。以一个包含8个纹理数组的纹理集合为例,本实施例中将前3个纹理数组设置为过渡区间纹理,其他5个纹理数组设置为稀疏飞白区间纹理。
实施中,选择好纹理集合后,依次按照前3个第一纹理数组产生过渡区间的纹理,可以设置每间隔3个轨迹点更换一次过渡区间的第一纹理数组。完成过渡之后,按照Z字形的顺序从稀疏飞白区间抽取第二纹理数组。具体的,按照4→8、8→4、4→8、…的顺序依次进行抽取。在该区间上,设置每隔5个轨迹点更换一次第二纹理数组。
在一些实施例中,当所述仿真笔型为毛笔,且所述轨迹点的书写速度或书写压力不满足预设要求时,对所述K个子轮廓的全部子轮廓进行像素填充;或,当所述仿真笔型为非毛笔时,对所述K个子轮廓的全部子轮廓进行像素 填充;当绘图方式由飞白分裂向全填充进行变换时,在对所述K个子轮廓的全部子轮廓进行像素填充之前,按照倒序从当前抽取的纹理数组向第一个纹理数组依次进行抽取。
可选的,所述纹理集合包括顺序排列的纹理数组;所述对所述K个子轮廓的全部子轮廓进行像素填充之前,所述控制器具体还被配置为执行:
当上一轨迹点采用飞白填充的方式,且当前轨迹点的书写速度或书写压力不满足预设要求时,利用所述上一轨迹点采用的纹理数组,以及所述纹理集合中在所述纹理数组之前排列的纹理数组,对当前轨迹点的笔画轮廓进行像素填充。
可选的,所述控制器具体被配置为执行:
按照从所述飞白填充使用的纹理数组向所述纹理集合中的第一个纹理数组的倒序顺序,对当前轨迹点的笔画轮廓进行像素填充。
实施中,当选择稀疏飞白区间的第二纹理数组时,每隔5个轨迹点更换一次第二纹理数组;当选择过渡区间的第一纹理数组时,每隔3个轨迹点更换一次第一纹理数组。
在一些实施例中,当所述仿真笔型为非毛笔时,根据所述轨迹点的轨迹点信息包含的书写倾角,确定所述轨迹点对应的笔画的笔画轮廓宽度;所述书写倾角表示书写笔相对于书写平面的倾斜角;根据所述笔画轮廓宽度,确定笔画轮廓包含的子轮廓的数量。
实施中,根据书写倾角对笔画轮廓宽度进行调整,计算得到笔画轮廓宽度后,将该数值向下取整记为K,作为将整体轮廓进行分裂的子轮廓个数。
在一些实施例中,所述控制器具体被配置为通过如下方式对全部子轮廓进行像素填充:
对所述K个子轮廓的部分子轮廓按第一填充方式进行像素填充,另一部分子轮廓按第二填充方式进行像素填充,所述第一填充方式像素填充的密度低于所述第二填充方式。
在一些实施例中,按K个子轮廓的排列顺序,对第1个和第K个子轮廓 采用第一填充方式进行像素填充,对第2个到第K-1个子轮廓中的至少一个采用第二填充方式进行像素填充。
在一些实施例中,所述第一填充方式像素填充的密度为最小密度;和/或,
所述第二填充方式像素填充的密度是根据轨迹点的轨迹点信息包含的书写压力确定的;所述第二填充方式像素填充的密度随轨迹点的书写压力的增大而增大。
实施中,以散点填充为例,对于第1个和第K个子轮廓,采用最低密度的随机散点进行像素填充。对于从第2个到第K-1个子轮廓,根据书写压力调整所使用的随机散点的散点密度,对这些子轮廓进行像素填充。
在一些实施例中,将所述笔画轮廓划分成第1个子轮廓、第K个子轮廓和合并子轮廓,所述合并子轮廓是对第2个到第K-1个子轮廓进行合并得到的;对第1个和第K个子轮廓采用第一填充方式进行像素填充,对所述合并子轮廓采用第二填充方式进行像素填充。
实施中,为了降低绘制图形的数量从而减少手写延迟,本实施例将第2个到第K-1个子轮廓合并成一个大的合并子轮廓进行绘制。如图9所示,本实施例提供一种子轮廓的绘制方式,计算各点位置坐标,并按固定的顺时针(或逆时针)方向连接起来,组成一个大的合并子轮廓,在绘制时,只需要绘制三个子轮廓,一个第1个子轮廓、第K个子轮廓和一个合并子轮廓。
如图10所示,本实施例提供的一种铅笔笔型的仿真效果示意图,在实际仿真时,通过对第1个和第K个子轮廓,采用最低密度的随机散点进行填充,对合并子轮廓采用随书写压力变化的填充密度的随机散点进行填充,实现线条两侧有毛糙状效果。
如图11所示,本实施例还提供一种毛笔仿真效果的笔迹显示方法的实施流程图,具体实施流程如下所示:
步骤1100、获取并存储用户的书写轨迹包含的轨迹点的轨迹点信息,以及所述书写轨迹对应的仿真笔型;
步骤1101、根据所述轨迹点的轨迹点信息,确定所述轨迹点对应的笔画, 所述笔画包括笔画轮廓,所述笔画轮廓包括K个子轮廓;
步骤1102、所述仿真笔型为毛笔,判断所述轨迹点的书写速度或书写压力是否满足预设要求,若是执行步骤1103,否则执行步骤1110;
步骤1103、根据所述轨迹点的采样时间生成伪随机数,从多个纹理集合中选择与所述伪随机数对应的纹理集合;
步骤1104、判断是否对上一个轨迹点对应的全部子轮廓进行像素填充,若是执行步骤1105,否则执行步骤1106;
步骤1105、利用第1个第一纹理数组对当前轨迹点对应的笔画轮廓进行像素填充;
步骤1106、确定为上一个轨迹点选择的纹理数组的排列次序,以及利用所述排列次序的纹理数组进行像素填充的轨迹点的数量;
步骤1107、判断轨迹点的数量是否达到所述排列次序的纹理数组对应的数量阈值,若是执行步骤1108,否则执行步骤1109;
步骤1108、将在所述排列次序的纹理数组之后排列的第1个纹理数组,确定为当前轨迹点对应的纹理数组,对当前轨迹点对应的笔画轮廓进行像素填充;
步骤1109、将所述排列次序的纹理数组,确定为当前轨迹点对应的纹理数组,对当前轨迹点对应的笔画轮廓进行像素填充。
步骤1110、对当前轨迹点对应的全部子轮廓进行像素填充。
本实施例能够实现包括毛笔、铅笔等不同的笔触效果。能够实现实际书写时,铅笔两侧边缘的毛糙效果。通过书写速度、书写压力等因素来控制是否产生飞白效果;设计了实心填充与飞白效果之间的过渡区间,保证了笔形效果自然变换;设计了伪随机纹理数组的保存方案,以保证系统在进行重绘时,笔写效果的一致性。在实现不同笔触随机纹理的同时,对整体的绘制流程进行设计,保证关闭手写文档再重新进入,所绘制的笔形效果不会发生改变。
实施例2、基于相同的发明构思,本发明实施例还提供了一种笔迹显示方法,该方法解决问题的原理与该显示设备相似,因此该方法的实施可以参见显示设备的实施,重复之处不再赘述。
如图12所示,该方法的实施流程如下所示:
步骤1200、通过输入组件获取用户的书写轨迹包含的轨迹点的轨迹点信息;
步骤1201、根据所述轨迹点的轨迹点信息,确定所述轨迹点对应的笔画,所述笔画包括笔画轮廓,所述笔画轮廓包括K个子轮廓,所述笔画轮廓和所述子轮廓的延伸方向相同,所述K为大于1的整数;
步骤1202、对所述K个子轮廓的部分子轮廓进行像素填充;
步骤1203、控制所述显示屏显示所述笔画。
实施例3、基于相同的发明构思,本发明实施例还提供了一种笔迹显示装置,该装置解决问题的原理与该显示设备相似,因此该装置的实施可以参见显示设备的实施,重复之处不再赘述。
如图13所示,该装置包括:
获取信息笔型单元1300,用于通过输入组件获取用户的书写轨迹包含的轨迹点的轨迹点信息;
确定笔画轮廓单元1301,用于根据所述轨迹点的轨迹点信息,确定所述轨迹点对应的笔画,所述笔画包括笔画轮廓,所述笔画轮廓包括K个子轮廓,所述笔画轮廓和所述子轮廓的延伸方向相同,所述K为大于1的整数;
像素填充单元1302,用于对所述K个子轮廓的部分子轮廓进行像素填充;
笔画显示单元1303,用于控制所述显示屏显示所述笔画。
基于同一发明构思,本公开实施例提供一种计算机存储介质,计算机存储介质包括:计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行如前文论述任一的笔迹显示方法。由于上述计算机存储介质解决 问题的原理与笔迹显示方法相似,因此上述计算机存储介质的实施可以参见方法的实施,重复之处不再赘述。
在具体的实施过程中,计算机存储介质可以包括:通用串行总线闪存盘(USB,Universal Serial Bus Flash Drive)、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的存储介质。
基于同一发明构思,本公开实施例还提供了一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行如前文论述任一的笔迹显示方法。由于上述计算机程序产品解决问题的原理与笔迹显示方法相似,因此上述计算机程序产品的实施可以参见方法的实施,重复之处不再赘述。
计算机程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以是但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的设备。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令设备的制造品,该指令设备实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (51)

  1. 一种显示设备,其中,该设备包括显示屏、控制器和输入组件,其中:
    所述显示屏被配置为进行内容的显示;
    所述控制器被配置为执行:
    通过所述输入组件获取用户的书写轨迹包含的轨迹点的轨迹点信息;
    根据所述轨迹点的轨迹点信息,确定所述轨迹点对应的笔画,所述笔画包括笔画轮廓,所述笔画轮廓包括K个子轮廓,所述笔画轮廓和所述子轮廓的延伸方向相同,所述K为大于1的整数;
    对所述K个子轮廓的部分子轮廓进行像素填充;
    控制所述显示屏显示所述笔画。
  2. 根据权利要求1所述的设备,其中,所述控制器具体被配置为执行:
    至少两个进行像素填充的子轮廓之间存在不进行像素填充的子轮廓。
  3. 根据权利要求1所述的设备,其中,所述控制器具体被配置为执行:
    从所述K个子轮廓中随机选取部分子轮廓进行像素填充;或,
    从所述K个子轮廓中选取部分子轮廓随机进行像素填充。
  4. 根据权利要求1所述的设备,其中,所述控制器具体被配置为执行:
    利用具有飞白特征的纹理图集,对所述笔画轮廓进行像素填充,所述飞白特征的纹理图集用于对所述K个子轮廓的部分子轮廓进行像素填充。
  5. 根据权利要求4所述的设备,其中,所述飞白特征的纹理图集包括多个纹理图案,不同的纹理图案用于表示不同的飞白特征;
    所述控制器具体被配置为执行:
    根据所述多个纹理图案,依次对所述笔画轮廓进行像素填充。
  6. 根据权利要求5所述的设备,其中,
    当利用不同的纹理图案对所述笔画轮廓进行像素填充时,所述笔画轮廓中进行像素填充的子轮廓的数量、位置以及填充的纹理类型中的至少一种不同。
  7. 根据权利要求6所述的设备,其中,
    当利用不同的纹理图案对所述笔画轮廓进行像素填充时,所述笔画轮廓中未进行像素填充的子轮廓的数量或位置不同;或,
    当利用不同的纹理图案对所述笔画轮廓进行像素填充,且所述笔画轮廓中未进行像素填充的子轮廓的数量和位置相同时,所述笔画轮廓中进行像素填充的子轮廓填充的纹理类型不同。
  8. 根据权利要求4所述的设备,其中,所述纹理图集包括按顺序排列的多个纹理图案;
    所述控制器具体被配置为执行:
    根据所述多个纹理图案的排列顺序,依次对所述笔画轮廓进行像素填充。
  9. 根据权利要求8所述的设备,其中,相邻的纹理图案之间的飞白特征的差异度小于差异度阈值。
  10. 根据权利要求9所述的设备,其中,
    相邻的纹理图案填充的笔画轮廓包括位置相同且填充方式不同的至少一组子轮廓;
    在相邻的纹理图案各自填充的笔画轮廓中,所述至少一组子轮廓中具有相邻关系的子轮廓的数量小于差异度阈值;
    其中,所述子轮廓在所述笔画轮廓中顺序排列,所述具有相邻关系的子轮廓的在所述笔画轮廓中的排列次序是连续的。
  11. 根据权利要求10所述的设备,其中,所述填充方式包括多种纹理类型的纹理填充和不填充中的至少一种;所述不填充表示不进行像素填充;
    相邻的纹理图案填充的笔画轮廓包括位置相同且纹理填充的纹理类型不同的至少一组子轮廓,在相邻的纹理图案各自填充的笔画轮廓中,所述至少一组子轮廓中具有相邻关系的子轮廓的数量小于第一差异度阈值;或,
    相邻的纹理图案填充的笔画轮廓包括位置相同且一个子轮廓进行纹理填充,另一个子轮廓不填充的至少一组子轮廓,在相邻的纹理图案各自填充的笔画轮廓中,所述至少一组子轮廓中具有相邻关系的子轮廓的数量小于第二 差异度阈值。
  12. 根据权利要求11所述的设备,其中,所述第一差异度阈值大于所述第二差异度阈值。
  13. 根据权利要求9所述的设备,其中,
    所述纹理图案填充的笔画轮廓的子轮廓中,合并子轮廓的数量小于设定值;其中所述合并子轮廓表示纹理填充的纹理类型相同且具有相邻关系的子轮廓;所述子轮廓在所述笔画轮廓中顺序排列,所述具有相邻关系的子轮廓的在所述笔画轮廓中的排列次序是连续的。
  14. 根据权利要求13所述的设备,其中,所述纹理图案包括第一纹理图案和第二纹理图案;
    所述第一纹理图案填充的笔画轮廓的子轮廓中,合并子轮廓的数量小于所述第二纹理图案。
  15. 根据权利要求5所述的设备,其中,所述纹理图案包括第一纹理图案和第二纹理图案;所述第一纹理图案的飞白程度低于所述第二纹理图案,所述飞白程度表示所述笔画轮廓中未进行像素填充的子轮廓的数量;
    所述控制器具体被配置为执行:
    按照从第一纹理图案到第二纹理图案的顺序,依次对所述笔画轮廓进行像素填充。
  16. 根据权利要求15所述的设备,其中,所述纹理图案包括顺序排列的第一纹理图案和顺序排列的第二纹理图案;
    所述控制器具体被配置为执行:
    若未使用纹理图集对上一轨迹点对应的笔画轮廓进行像素填充,则根据所述第一纹理图案,对当前轨迹点对应的笔画轮廓进行像素填充;或,
    若使用纹理图集对上一轨迹点对应的笔画轮廓进行像素填充,则根据使用的纹理图集的纹理图案的排列顺序,对当前轨迹点和当前轨迹点之后的轨迹点对应的笔画轮廓进行像素填充。
  17. 根据权利要求8所述的设备,其中,所述控制器具体被配置为执行:
    当利用纹理图集中的多个纹理图案进行像素填充时,间隔至少一个轨迹点更换一次对应的纹理图案。
  18. 根据权利要求15所述的设备,其中,所述控制器具体被配置为执行:
    当利用纹理图集中的多个纹理图案进行像素填充时,间隔N个轨迹点更换一次对应的第一纹理图案;和/或,间隔M个轨迹点更换一次对应的第二纹理图案。
  19. 根据权利要求18所述的设备,其中,所述N小于M。
  20. 根据权利要求15所述的设备,其中,所述纹理图案包括多个第二纹理图案,所述控制器具体被配置为执行:
    当利用多个第二纹理图案进行像素填充时,按照第二纹理正向组和第二纹理反向组依次交替排列的顺序,选择第二纹理图案,对当前轨迹点和当前轨迹点之后的轨迹点进行像素填充;
    所述第二纹理正向组包括多个顺序排列的第二纹理图案,所述第二纹理反向组包括多个倒序排列的第二纹理图案。
  21. 根据权利要求4~20任一所述的设备,其中,所述纹理图集包括多个,不同的纹理图集用于表示不同的飞白特征,所述控制器具体被配置为执行:
    存储所述多个纹理图集;
    从所述多个纹理图集中选择一个纹理图集,对所述笔画轮廓进行像素填充。
  22. 根据权利要求21所述的设备,其中,所述控制器具体被配置为执行:
    从多个纹理图集中任意选择一个纹理图集,对所述笔画轮廓进行像素填充;或,
    根据所述轨迹点的采样时间,从多个纹理图集中选择对应的纹理图集,对所述笔画轮廓进行像素填充。
  23. 根据权利要求21所述的设备,其中,所述控制器具体被配置为执行:
    当上一轨迹点采用全填充的方式,且当前轨迹点采用飞白填充的方式时,从所述多个纹理图集中选择一个纹理图集,对所述当前轨迹点的笔画轮廓进 行像素填充;
    其中所述全填充用于对所述轨迹点的笔画轮廓进行像素填充,所述飞白填充用于对所述轨迹点的笔画轮廓的部分子轮廓进行像素填充。
  24. 根据权利要求5~20、22~23任一所述的设备,其中,
    所述纹理图案是基于纹理数组确定的,所述纹理数组用于确定需填充的子轮廓的填充位置和填充方式。
  25. 根据权利要求1~20任一所述的设备,其中,所述控制器具体被配置为通过如下方式对部分子轮廓进行像素填充:
    从预先存储的纹理集合中选择一个纹理数组,所述纹理集合包括多个纹理数组,所述纹理数组用于确定需填充的子轮廓的填充位置和填充方式;每个纹理数组用于对连续的多个轨迹点对应的笔画轮廓进行像素填充;
    根据选择的纹理数组,对所述部分子轮廓进行像素填充。
  26. 根据权利要求25所述的设备,其中,所述纹理集合包括顺序排列的多个纹理数组;所述控制器具体被配置为执行:
    按多个纹理数组的顺序,依次对所述笔画轮廓进行像素填充。
  27. 根据权利要求26所述的设备,其中,
    相邻的纹理数组填充的笔画轮廓包括位置相同且填充方式不同的至少一组子轮廓;
    在相邻的纹理数组各自填充的笔画轮廓中,所述至少一组子轮廓中具有相邻关系的子轮廓的数量小于差异度阈值;
    其中,所述子轮廓在所述笔画轮廓中顺序排列,所述具有相邻关系的子轮廓的在所述笔画轮廓中的排列次序是连续的。
  28. 根据权利要求27所述的设备,其中,所述填充方式包括多种纹理类型的纹理填充和不填充中的至少一种;所述不填充表示不进行像素填充;
    相邻的纹理数组填充的笔画轮廓包括位置相同且纹理填充的纹理类型不同的至少一组子轮廓,在相邻的纹理数组各自填充的笔画轮廓中,所述至少一组子轮廓中具有相邻关系的子轮廓的数量小于第一差异度阈值;或,
    相邻的纹理数组填充的笔画轮廓包括位置相同且一个子轮廓进行纹理填充,另一个子轮廓不填充的至少一组子轮廓,在相邻的纹理数组各自填充的笔画轮廓中,所述至少一组子轮廓中具有相邻关系的子轮廓的数量小于第二差异度阈值。
  29. 根据权利要求28所述的设备,其中,所述第一差异度阈值大于所述第二差异度阈值。
  30. 根据权利要求26所述的设备,其中,所述纹理数组包括第一纹理数组和第二纹理数组,所述第一纹理数组进行像素填充的笔画轮廓的子轮廓的数量高于所述第二纹理数组;
    所述控制器具体被配置为执行:
    按照从第一纹理数组到第二纹理数组的顺序,依次对所述笔画轮廓进行像素填充。
  31. 根据权利要求26所述的设备,其中,
    所述纹理数组填充的笔画轮廓的子轮廓中,合并子轮廓的数量小于设定值;其中所述合并子轮廓表示纹理填充的纹理类型相同且具有相邻关系的子轮廓;所述子轮廓在所述笔画轮廓中顺序排列,所述具有相邻关系的子轮廓的在所述笔画轮廓中的排列次序是连续的。
  32. 根据权利要求31所述的设备,其中,所述纹理数组包括第一纹理数组和第二纹理数组;
    所述第一纹理数组填充的笔画轮廓的子轮廓中,合并子轮廓的数量小于所述第二纹理数组。
  33. 根据权利要求30所述的设备,其中,所述纹理数组包括顺序排列的第一纹理数组和顺序排列的第二纹理数组,所述第二纹理数组在所述第一纹理数组之后排列;所述控制器具体被配置为执行:
    按照从第一纹理数组到第二纹理数组的顺序,依次对所述笔画轮廓进行像素填充。
  34. 根据权利要求33所述的设备,其中,所述控制器具体被配置为执行:
    若未使用纹理集合对上一轨迹点对应的笔画轮廓进行像素填充,则根据第一纹理数组,对当前轨迹点对应的笔画轮廓进行像素填充;或,
    若使用纹理集合对上一轨迹点对应的笔画轮廓进行像素填充,则根据使用的纹理集合的纹理数组的排列顺序,对当前轨迹点和当前轨迹点之后的轨迹点对应的笔画轮廓进行像素填充。
  35. 根据权利要求30所述的设备,其中,所述控制器具体被配置为执行:
    当利用纹理集合中的多个纹理数组进行像素填充时,间隔N个轨迹点更换一次对应的第一纹理数组;和/或,间隔M个轨迹点更换一次对应的第二纹理数组。
  36. 根据权利要求18或35所述的设备,其中,
    所述N小于M;或,
    所述N是预设值,或,所述N是利用所述纹理数组进行像素填充的第1个轨迹点的采样时间确定的;或,
    所述M是预设值,或,所述M是利用所述纹理数组进行像素填充的第1个轨迹点的采样时间确定的。
  37. 根据权利要求30所述的设备,其中,所述纹理数组包括多个第二纹理数组,所述控制器具体被配置为执行:
    当利用多个第二纹理数组进行像素填充时,按照第二纹理正向数组和第二纹理反向数组依次交替排列的顺序,选择第二纹理数组,对当前轨迹点和当前轨迹点之后的轨迹点进行像素填充;
    所述第二纹理正向数组包括多个顺序排列的第二纹理数组,所述第二纹理反向数组包括多个倒序排列的第二纹理数组。
  38. 根据权利要求25所述的设备,其中,所述纹理集合包括多个,不同的纹理集合用于表示不同的纹理填充特征,所述控制器具体被配置为:
    存储多个所述纹理集合;
    从所述多个纹理集合中选择一个纹理集合,对所述笔画轮廓进行像素填充。
  39. 根据权利要求38所述的设备,其中,所述控制器具体被配置为:
    从多个纹理集合中任意选择一个纹理集合,对所述笔画轮廓进行像素填充;或,
    根据所述轨迹点的采样时间,从多个纹理集合中选择对应的纹理集合,对所述笔画轮廓进行像素填充。
  40. 根据权利要求38所述的设备,其中,所述控制器具体被配置为执行:
    当上一轨迹点采用全填充的方式,且当前轨迹点采用飞白填充的方式时,从所述多个纹理集合中选择一个纹理集合,对所述当前轨迹点的笔画轮廓进行像素填充;
    其中所述全填充用于对所述轨迹点的笔画轮廓进行像素填充,所述飞白填充用于对所述轨迹点的笔画轮廓的部分子轮廓进行像素填充。
  41. 根据权利要求39所述的设备,其中,所述控制器具体还被配置为执行:
    存储所述轨迹点的轨迹点信息;
    利用所述轨迹点信息包含的所述轨迹点的采样时间生成伪随机数,从多个纹理集合中选择与所述伪随机数对应的纹理集合;其中一个纹理集合的索引号对应一个伪随机数;
    利用所述伪随机数对应的纹理集合,重新对所述轨迹点的部分子轮廓进行像素填充。
  42. 根据权利要求39所述的设备,其中,所述控制器具体还被配置为执行:
    存储所述轨迹点的轨迹点信息,以及所述轨迹点对应的纹理数组的排列次序;
    利用所述排列次序对应的纹理数组,重新对所述轨迹点的部分子轮廓进行像素填充。
  43. 根据权利要求1~20任一所述的设备,其中,所述控制器具体还被配置为执行:
    当所述仿真笔型为毛笔,且所述轨迹点的书写速度或书写压力不满足预设要求时,对所述K个子轮廓的全部子轮廓进行像素填充;或,
    当所述仿真笔型为非毛笔时,对所述K个子轮廓的全部子轮廓进行像素填充。
  44. 根据权利要求43所述的设备,其中,所述纹理集合包括顺序排列的纹理数组;所述对所述K个子轮廓的全部子轮廓进行像素填充之前,所述控制器具体还被配置为执行:
    当上一轨迹点采用飞白填充的方式,且当前轨迹点的书写速度或书写压力不满足预设要求时,利用所述上一轨迹点采用的纹理数组,以及所述纹理集合中在所述纹理数组之前排列的纹理数组,对当前轨迹点的笔画轮廓进行像素填充。
  45. 根据权利要求44所述的设备,其中,所述控制器具体被配置为执行:
    按照从所述飞白填充使用的纹理数组向所述纹理集合中的第一个纹理数组的倒序顺序,对当前轨迹点的笔画轮廓进行像素填充。
  46. 根据权利要求1所述的设备,其中,所述控制器具体还被配置为通过如下方式对所述笔画轮廓进行像素填充:
    对所述K个子轮廓的部分子轮廓按第一填充方式进行像素填充,另一部分子轮廓按第二填充方式进行像素填充,所述第一填充方式像素填充的密度低于所述第二填充方式。
  47. 根据权利要求46所述的设备,其中,所述控制器具体被配置为执行:
    按K个子轮廓的排列顺序,对第1个和第K个子轮廓采用第一填充方式进行像素填充,对第2个到第K-1个子轮廓中的至少一个采用第二填充方式进行像素填充。
  48. 根据权利要求46所述的设备,其中,
    所述第一填充方式像素填充的密度为最小密度;和/或,
    所述第二填充方式像素填充的密度是根据轨迹点的轨迹点信息包含的书写压力确定的;所述第二填充方式像素填充的密度随轨迹点的书写压力的增 大而增大。
  49. 根据权利要求1所述的设备,其中,所述控制器具体还被配置为执行:
    当所述仿真笔型为非毛笔时,根据所述轨迹点的轨迹点信息包含的书写倾角,确定所述轨迹点对应的笔画的笔画轮廓宽度;所述书写倾角表示书写笔相对于书写平面的倾斜角;
    根据所述笔画轮廓宽度,确定笔画轮廓包含的子轮廓的数量。
  50. 一种笔迹显示方法,其中,该方法包括:
    通过输入组件获取用户的书写轨迹包含的轨迹点的轨迹点信息;
    根据所述轨迹点的轨迹点信息,确定所述轨迹点对应的笔画,所述笔画包括笔画轮廓,所述笔画轮廓包括K个子轮廓,所述笔画轮廓和所述子轮廓的延伸方向相同,所述K为大于1的整数;
    对所述K个子轮廓的部分子轮廓进行像素填充;
    控制所述显示屏显示所述笔画。
  51. 一种计算机存储介质,其上存储有计算机程序,其中,该程序被处理器执行时实现如权利要求50所述方法的步骤。
PCT/CN2023/121435 2022-10-31 2023-09-26 一种显示设备及笔迹显示方法 WO2024093579A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
PCT/CN2022/128710 WO2024092432A1 (zh) 2022-10-31 2022-10-31 显示设备、笔迹显示及笔迹轮廓确定的方法
CNPCT/CN2022/128710 2022-10-31
CN202310637028.5 2023-05-31
CN202310637028.5A CN117950515A (zh) 2022-10-31 2023-05-31 一种显示设备及笔迹显示方法

Publications (1)

Publication Number Publication Date
WO2024093579A1 true WO2024093579A1 (zh) 2024-05-10

Family

ID=90799192

Family Applications (3)

Application Number Title Priority Date Filing Date
PCT/CN2022/128710 WO2024092432A1 (zh) 2022-10-31 2022-10-31 显示设备、笔迹显示及笔迹轮廓确定的方法
PCT/CN2023/097381 WO2024093223A1 (zh) 2022-10-31 2023-05-31 一种显示设备及笔迹显示方法
PCT/CN2023/121435 WO2024093579A1 (zh) 2022-10-31 2023-09-26 一种显示设备及笔迹显示方法

Family Applications Before (2)

Application Number Title Priority Date Filing Date
PCT/CN2022/128710 WO2024092432A1 (zh) 2022-10-31 2022-10-31 显示设备、笔迹显示及笔迹轮廓确定的方法
PCT/CN2023/097381 WO2024093223A1 (zh) 2022-10-31 2023-05-31 一种显示设备及笔迹显示方法

Country Status (2)

Country Link
CN (1) CN117950515A (zh)
WO (3) WO2024092432A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081803A (zh) * 2011-01-20 2011-06-01 周佳 一种手写原笔迹的笔锋实现方法
CN102306308A (zh) * 2011-08-26 2012-01-04 厦门大学 一种基于纹理学习的电子毛笔建模方法
CN102436348A (zh) * 2011-11-14 2012-05-02 中国科学院合肥物质科学研究院 一种基于力信息的毛笔书法表达方法
JP2017157174A (ja) * 2016-03-04 2017-09-07 大日本印刷株式会社 筆記ボード及び表示システム
CN109840034A (zh) * 2019-01-30 2019-06-04 郑州万特电气股份有限公司 一种基于触摸设备的毛笔字书写方法
CN112905102A (zh) * 2021-03-02 2021-06-04 北京文香信息技术有限公司 书写笔锋的实现方法、装置、电子设备及可读存储介质

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103310474B (zh) * 2013-06-08 2016-04-06 深圳市经纬科技有限公司 一种手写原笔迹的实现方法及系统
WO2015075931A1 (en) * 2013-11-19 2015-05-28 Wacom Co., Ltd. Method and system for ink data generation, ink data rendering, ink data manipulation and ink data communication
US9658704B2 (en) * 2015-06-10 2017-05-23 Apple Inc. Devices and methods for manipulating user interfaces with a stylus
US20170285774A1 (en) * 2016-04-01 2017-10-05 Kunjal Parikh Characterization and simulation of writing instruments
US20170357339A1 (en) * 2016-06-10 2017-12-14 Microsoft Technology Licensing, Llc Variable display properties as a function of input device type and input parameter values
CN106503756A (zh) * 2016-10-18 2017-03-15 上海子墨国际文化传播有限公司 基于图像轮廓化建立汉字笔迹模型的方法
CN111381754B (zh) * 2020-04-30 2021-10-22 京东方科技集团股份有限公司 笔迹处理方法、设备及介质
CN113448486B (zh) * 2021-09-01 2021-12-24 广州朗国电子科技股份有限公司 电子白板用笔笔锋实现方法、装置、存储介质及电子白板
CN115938244B (zh) * 2023-02-20 2023-06-02 深圳市英唐数码科技有限公司 一种适配多笔形的电纸书显示方法、系统和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081803A (zh) * 2011-01-20 2011-06-01 周佳 一种手写原笔迹的笔锋实现方法
CN102306308A (zh) * 2011-08-26 2012-01-04 厦门大学 一种基于纹理学习的电子毛笔建模方法
CN102436348A (zh) * 2011-11-14 2012-05-02 中国科学院合肥物质科学研究院 一种基于力信息的毛笔书法表达方法
JP2017157174A (ja) * 2016-03-04 2017-09-07 大日本印刷株式会社 筆記ボード及び表示システム
CN109840034A (zh) * 2019-01-30 2019-06-04 郑州万特电气股份有限公司 一种基于触摸设备的毛笔字书写方法
CN112905102A (zh) * 2021-03-02 2021-06-04 北京文香信息技术有限公司 书写笔锋的实现方法、装置、电子设备及可读存储介质

Also Published As

Publication number Publication date
WO2024093223A1 (zh) 2024-05-10
CN117950515A (zh) 2024-04-30
WO2024092432A1 (zh) 2024-05-10

Similar Documents

Publication Publication Date Title
US9268418B2 (en) Simulation of an erodible tip in a natural media drawing and/or painting simulation
US8854342B2 (en) Systems and methods for particle-based digital airbrushing
US8896579B2 (en) Methods and apparatus for deformation of virtual brush marks via texture projection
US10217253B2 (en) Methods and apparatus for simulation of a stateful brush tip in a natural media drawing and/or painting simulation
US9483138B2 (en) Natural media painting using a realistic brush and tablet stylus gestures
CN107526526B (zh) 确定压感笔迹区域的方法及装置
US20120200540A1 (en) Utilization of temporal and spatial parameters to enhance the writing capability of an electronic device
CN113448486B (zh) 电子白板用笔笔锋实现方法、装置、存储介质及电子白板
CN106502667B (zh) 一种渲染方法及装置
KR20120095852A (ko) 디스플레이 표면상에서 손글씨 잉크 객체를 그리기 및 지우기 하는 방법 및 장치
CN108628455B (zh) 一种基于触摸屏手势识别的虚拟沙画绘制方法
CN104391651B (zh) 基于光学原理的书法笔迹呈现方法
CN108334270A (zh) 触摸屏手写输入呈现为具有型笔特征笔迹的方法
CN103440101A (zh) 一种手写原笔迹数据的处理方法、系统及手机
CN103399629A (zh) 获取手势屏幕显示坐标的方法和装置
CN112558812A (zh) 笔锋生成方法、装置、智能设备及存储介质
CN102999321A (zh) 毛笔电子画刷设置装置和毛笔电子画刷
CN110633042A (zh) 一种电子白板笔迹擦除方法、装置及设备
WO2024093579A1 (zh) 一种显示设备及笔迹显示方法
CN108335340A (zh) 压力触摸屏手写输入呈现为具有型笔特征笔迹的方法
CN110471607A (zh) 手写笔迹显示方法、手写阅读设备及计算机存储介质
Su et al. Simulating artistic brushstrokes using interval splines
CN111984151A (zh) 一种提高处理效率的白板画布大小、位置漫游控制方法
CN113296616B (zh) 笔锋选择方法、装置以及智能终端
CN112183318A (zh) 笔锋笔迹实现方法、装置、存储介质及电子白板