CN107730571B - Method and apparatus for rendering an image - Google Patents

Method and apparatus for rendering an image Download PDF

Info

Publication number
CN107730571B
CN107730571B CN201610663557.2A CN201610663557A CN107730571B CN 107730571 B CN107730571 B CN 107730571B CN 201610663557 A CN201610663557 A CN 201610663557A CN 107730571 B CN107730571 B CN 107730571B
Authority
CN
China
Prior art keywords
radius
touch point
canvas
axis
coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610663557.2A
Other languages
Chinese (zh)
Other versions
CN107730571A (en
Inventor
王凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201610663557.2A priority Critical patent/CN107730571B/en
Publication of CN107730571A publication Critical patent/CN107730571A/en
Application granted granted Critical
Publication of CN107730571B publication Critical patent/CN107730571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • 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

Abstract

The application discloses a method and a device for drawing an image. One embodiment of the method comprises: acquiring a coordinate sequence in a canvas coordinate system when a touch point controlled by a user moves on the canvas; acquiring a first transverse axis radius, a first longitudinal axis radius and a first included angle of a first ellipse corresponding to each coordinate in the coordinate sequence; detecting whether the following conditions are met: the radiuses of the first transverse shafts are equal, the radiuses of the first longitudinal shafts are equal, and the first included angles are equal; in response to the above conditions being met, determining a second transverse axis radius, a second longitudinal axis radius and a second included angle of a second ellipse determined by every two adjacent coordinates; and drawing the image on the canvas based on the second transverse axis radiuses, the second longitudinal axis radiuses and the second included angles. The implementation mode changes the phenomenon that the strokes are consistent in thickness and stiff when the images are drawn in the past, realizes the simulation drawing of the images, and improves the writing experience of the user on the canvas.

Description

Method and apparatus for rendering an image
Technical Field
The present application relates to the field of computer technologies, and in particular, to the field of web page mapping, and in particular, to a method and an apparatus for mapping an image.
Background
The development of the internet has led to an increasing demand for Web applications, and the release of the HTML5(HyperText Markup Language 5, fifth edition) standard has led users to experience richer Web applications. HTML5 provides canvas markup elements to implement canvas functionality that can rely on the functional statements of the scripting language JavaScript required to edit Web pages to implement the rendering of images.
However, the traditional image drawing method based on HTML5 has the disadvantages of consistent and rigid drawn strokes and poor writing effect, and cannot meet the requirements of people on simulated writing.
Disclosure of Invention
The present application is directed to a method and apparatus for rendering an image, which solves the technical problems mentioned in the background section above.
In a first aspect, the present application provides a method for rendering an image, the method comprising: acquiring a coordinate sequence in a canvas coordinate system when a touch point controlled by a user moves on the canvas, wherein the coordinates of all the touch points in the coordinate sequence are sorted according to the generation time; acquiring a first transverse axis radius, a first longitudinal axis radius and a first included angle between a major axis of a first ellipse and a longitudinal axis of the canvas coordinate system, wherein the first transverse axis radius and the first longitudinal axis radius of the first ellipse correspond to each coordinate in the coordinate sequence, and the first ellipse is determined by a contact section between a touch point corresponding to each coordinate and the canvas; detecting whether the following conditions are met: the radiuses of the first transverse shafts are equal, the radiuses of the first longitudinal shafts are equal, and the first included angles are equal;
in response to the above conditions being met, determining a second transverse-axis radius, a second longitudinal-axis radius and a second included angle between the major axis of the second ellipse and the longitudinal axis of the canvas coordinate system, which are determined on the canvas by every two adjacent coordinates in the coordinate sequence; and drawing an image on the canvas based on each second transverse axis radius, each second longitudinal axis radius and each second included angle.
In some embodiments, the determining a second transverse-axis radius and a second longitudinal-axis radius of a second ellipse determined on the canvas by every two adjacent coordinates in the coordinate sequence includes: for every two adjacent coordinates in the coordinate sequence, determining a horizontal axis movement distance and a vertical axis movement distance of a second touch point relative to a first touch point, wherein the second touch point is a touch point corresponding to a coordinate with a later generation time in every two adjacent coordinates, and the first touch point is a touch point corresponding to a coordinate with an earlier generation time in every two adjacent coordinates; determining the second transverse-axis radius and the second longitudinal-axis radius according to the following formulas:
Figure BDA0001077123120000021
where ρ is1Is the second longitudinal axis radius, p2For the second abscissa radius, r is a preset maximum drawing radius, Δ x is the abscissa movement distance, Δ y is the ordinate movement distance, min represents taking the minimum value of Δ x and Δ y, max represents taking the maximum value of Δ x and Δ y, and
Δx=|x2-x1|;Δy=|y2-y1|;
wherein, y2Is the ordinate, y, of the second touch point1Is the ordinate, x, of the first touch point2Is the abscissa, x, of the second touch point1And the horizontal coordinate of the first touch point.
In some embodiments, determining a second angle between the major axis of the second ellipse and the longitudinal axis of the canvas coordinate system comprises: determining the second included angle according to the following formula:
Figure BDA0001077123120000022
wherein α is the second angle.
In some embodiments, the method further comprises: acquiring the generation time of each coordinate in the coordinate sequence; for every two adjacent coordinates in the coordinate sequence, determining the moving speed of the touch point controlled by the user from the first touch point to the second touch point based on the generation time and the every two adjacent coordinates; determining a speed influence coefficient based on the moving speed and the preset maximum drawing radius; taking the product of the velocity influence coefficient and the second abscissa radius as a plotted abscissa radius; and taking the product of the speed influence coefficient and the second longitudinal axis radius as a plotting longitudinal axis radius.
In some embodiments, said drawing an image on said canvas based on each of said second transverse-axis radii, each of said second longitudinal-axis radii, and each of said second included angles comprises: based on the drawing horizontal axis radius, the drawing vertical axis radius and the second included angle, drawing the image on the canvas.
In some embodiments, the determining the moving speed of the user-controlled touch point from the first touch point to the second touch point based on the generation time and the every two adjacent coordinates includes: determining the moving speed according to the following formula:
Figure BDA0001077123120000031
wherein v is the moving speed, a and b are both preset constants, and a<b,t1Generating a time, t, for the coordinates of the first touch point2And generating time for the coordinates of the second touch point.
In some embodiments, said determining a velocity influence coefficient based on said moving velocity and said preset maximum rendering radius comprises: determining the velocity impact coefficient according to the following equation:
k=1-v/r;
wherein k is the velocity influence coefficient.
In some embodiments, the method further comprises: in response to at least one of the above conditions not being met, drawing an image on the canvas based on each of the first transverse-axis radii, each of the first longitudinal-axis radii, and each of the first included angles.
In some embodiments, said drawing an image on said canvas based on each of said second transverse-axis radii, each of said second longitudinal-axis radii, and each of said second included angles comprises: drawing each ellipse on the canvas based on each second transverse axis radius and each second longitudinal axis radius; filling drawing colors in each ellipse obtained by drawing; and clockwise rotating each ellipse filled with the drawing color by the second included angle to generate the drawing image.
In a second aspect, the present application provides an apparatus for rendering an image, the apparatus comprising: the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring a coordinate sequence in a canvas coordinate system when a touch point controlled by a user moves on a canvas, and coordinates of all touch points in the coordinate sequence are sorted according to a generation time; the second acquisition unit is used for acquiring a first transverse axis radius, a first longitudinal axis radius and a first included angle between a major axis of a first ellipse and a longitudinal axis of the canvas coordinate system, which correspond to each coordinate in the coordinate sequence, wherein the first ellipse is determined by a contact section between a touch point corresponding to each coordinate and the canvas; a detection unit for detecting whether the following conditions are satisfied: the radiuses of the first transverse shafts are equal, the radiuses of the first longitudinal shafts are equal, and the first included angles are equal; the first drawing unit is used for responding to the condition that the conditions are met, and determining a second transverse axis radius, a second longitudinal axis radius and a second included angle between the major axis of a second ellipse and the longitudinal axis of the canvas coordinate system, wherein the second transverse axis radius, the second longitudinal axis radius and the second included angle are determined by every two adjacent coordinates in the coordinate sequence on the canvas; and drawing an image on the canvas based on each second transverse axis radius, each second longitudinal axis radius and each second included angle.
In some embodiments, the first drawing unit comprises: a moving distance determining module, configured to determine, for every two adjacent coordinates in the coordinate sequence, a horizontal axis moving distance and a vertical axis moving distance of a second touch point relative to a first touch point, where the second touch point is a touch point corresponding to a coordinate with a later generation time in every two adjacent coordinates, and the first touch point is a touch point corresponding to a coordinate with an earlier generation time in every two adjacent coordinates; a first radius determination module to determine the second transverse axis radius and the second longitudinal axis radius according to the following formula:
Figure BDA0001077123120000041
where ρ is1Is half of said second longitudinal axisDiameter, rho2For the second abscissa radius, r is a preset maximum drawing radius, Δ x is the abscissa movement distance, Δ y is the ordinate movement distance, min represents taking the minimum value of Δ x and Δ y, max represents taking the maximum value of Δ x and Δ y, and
Δx=|x2-x1|;Δy=|y2-y1|;
wherein, y2Is the ordinate, y, of the second touch point1Is the ordinate, x, of the first touch point2Is the abscissa, x, of the second touch point1And the horizontal coordinate of the first touch point.
In some embodiments, the first drawing unit comprises: an included angle determining module, configured to determine the second included angle according to the following formula:
Figure BDA0001077123120000051
wherein α is the second angle.
In some embodiments, the apparatus further comprises: a third obtaining unit, configured to obtain a generation time of each coordinate in the coordinate sequence; a moving speed determining unit, configured to determine, for every two adjacent coordinates in the coordinate sequence, a moving speed of the user-controlled touch point from the first touch point to the second touch point based on the generation time and the every two adjacent coordinates; an influence coefficient determination unit configured to determine a speed influence coefficient based on the moving speed and the preset maximum drawing radius; a drawing radius determination unit configured to take a product of the velocity influence coefficient and the second abscissa radius as a drawing abscissa radius; and taking the product of the speed influence coefficient and the second longitudinal axis radius as a plotting longitudinal axis radius.
In some embodiments, the first drawing unit comprises: and the drawing module is used for drawing an image on the canvas based on the radius of the drawing transverse axis, the radius of the drawing longitudinal axis and the second included angle.
In some embodiments, the movement speed determination unit is further configured to: determining the moving speed according to the following formula:
Figure BDA0001077123120000052
wherein v is the moving speed, a and b are both preset constants, and a<b,t1Generating a time, t, for the coordinates of the first touch point2And generating time for the coordinates of the second touch point.
In some embodiments, the influence coefficient determination unit is further configured to: determining the velocity impact coefficient according to the following equation:
k=1-v/r;
wherein k is the velocity influence coefficient.
In some embodiments, the apparatus further comprises: a second drawing unit operable to draw an image on the canvas based on each of the first transverse axis radii, each of the first longitudinal axis radii, and each of the first included angles in response to at least one of the above conditions not being satisfied.
In some embodiments, the first drawing unit comprises: an ellipse drawing module, configured to draw each ellipse on the canvas based on each second transverse axis radius and each second longitudinal axis radius; the filling color module is used for filling drawing colors in each ellipse obtained by drawing; and the rotating module is used for clockwise rotating the ellipses filled with the drawing colors by the second included angle to generate the drawing image.
The method and the device for drawing the image, provided by the application, are characterized in that a coordinate sequence of a touch point controlled by a user relative to a canvas coordinate system is obtained when the touch point moves on a canvas, then a first transverse axis radius, a first longitudinal axis radius of a first ellipse corresponding to each coordinate and a first included angle between a long axis of the first ellipse and a longitudinal axis of the canvas coordinate system are obtained, whether the same parameter value of each obtained coordinate is equal or not is determined, under the condition of equal values, a second transverse axis radius, a second longitudinal axis radius of a second ellipse determined by every two adjacent coordinates in the coordinate sequence and a second included angle between a long axis of the second ellipse and the longitudinal axis of the canvas coordinate system are calculated, the image is drawn on the canvas based on the parameters obtained by calculation, so that the phenomenon that strokes are consistent in thickness and stiff in the past when the image is drawn is changed, and the simulation drawing of the image is realized, the writing experience of the user on the canvas is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a flow diagram of one embodiment of a method for rendering an image according to the present application;
FIG. 2 is a schematic illustration of an application scenario of a method for rendering an image according to the present application;
FIG. 3 is a flow diagram of yet another embodiment of rendering an image with fixed parameter values according to a method of the present application;
FIG. 4 is a schematic block diagram of one embodiment of an apparatus for rendering an image according to the present application;
fig. 5 is a schematic structural diagram of a computer system suitable for implementing the apparatus for drawing an image according to the embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
With continued reference to FIG. 1, a flow 100 of one embodiment of a method for rendering an image according to the present application is shown. The method for drawing an image of the present embodiment includes the steps of:
step 101, acquiring a coordinate sequence in a canvas coordinate system when a touch point controlled by a user moves on the canvas.
In this embodiment, a user may use a touch screen device installed with a canvas application to implement image drawing, where the touch screen device may be a tablet computer, a mobile phone, an intelligent drawing board, or the like. The user can contact the touch screen device through a finger, a touch pen or other touch objects, and the contact position is a touch point. The canvas may be any electronic canvas used to draw images, such as a canvas based on HTML5, or may be a canvas provided in other drawing applications. When the touch points controlled by the user move on the canvas, the touch screen equipment acquires the coordinates of each touch point to form a coordinate sequence. It is understood that the coordinates in the coordinate series are sorted according to the generation time.
When the distance of the touch point controlled by the user moving on the canvas is longer, more coordinates in the obtained coordinate sequence are obtained; when the moving distance is shorter, correspondingly, fewer coordinates in the obtained coordinate sequence are obtained.
Step 102, a first transverse axis radius, a first longitudinal axis radius and a first included angle between a major axis of the first ellipse and a longitudinal axis of the canvas coordinate system, which correspond to each coordinate in the coordinate sequence, are obtained.
In this embodiment, the user represents the thickness of the stroke in the drawing or writing process by controlling the contact force or the contact area between the touch point and the canvas. That is, when the user draws a thicker part of the stroke, the contact area between the touch point and the canvas is properly increased; when the thinner part of the stroke is drawn, the contact area between the touch point and the canvas is properly reduced. The contact surface of the touch point and the canvas may be approximated to an ellipse, for example, the area of the touch screen device contacted by the user's finger may be regarded as an ellipse.
In this embodiment, the canvas may obtain a first cross-axis radius and a first longitudinal-axis radius of the first ellipse, which are approximate to the contact surface corresponding to each coordinate, and a first included angle between the major axis of the first ellipse and the longitudinal axis of the canvas coordinate system. For example, when the canvas is a canvas, the first horizontal-axis radius, the first vertical-axis radius and the first included angle may be obtained through a touch object in the canvas, where the touch object includes various parameters of the canvas when a user touches a screen.
Step 103, detecting whether the following conditions are met: the radiuses of the first transverse shafts are equal, the radiuses of the first longitudinal shafts are equal, and the first included angles are equal.
After the three parameters are obtained, because some browsers do not support the canvas, the values of the three obtained parameters are fixed in this case, that is, the values of the first horizontal axis radii of different touch points are all equal. In this embodiment, when drawing an image, it is first determined whether the current canvas used by the user supports automatic identification and recording of different parameters of the user while writing.
Step 104, responding to the satisfaction of the above conditions, determining the second transverse axis radius, the second longitudinal axis radius and the second included angle between the major axis of the second ellipse and the longitudinal axis of the canvas coordinate system of each two adjacent coordinates in the coordinate sequence on the canvas; and drawing the image on the canvas based on the second transverse axis radiuses, the second longitudinal axis radiuses and the second included angles.
When the currently used canvas of the user does not support automatic identification and recording of different parameters of the user during writing, calculation of the acquired coordinates is required, and the radius of the transverse axis and the radius of the longitudinal axis of the ellipse determined by every two adjacent coordinates in the coordinate sequence and a second included angle between the major axis of the ellipse and the longitudinal axis of the canvas coordinate system are determined.
In this embodiment, the ellipse determined by every two adjacent coordinates may be an ellipse in which two adjacent coordinates are located, or may be an ellipse in which the two coordinates are located at the boundary of the ellipse.
After the second transverse-axis radius, the second longitudinal-axis radius and the second included angle of the second ellipse are determined, the size and the direction of the ellipse determined by every two adjacent coordinates can be determined, and therefore an image can be drawn.
With continued reference to fig. 2, fig. 2 is a schematic diagram 200 of an application scenario of the method for rendering an image according to the present embodiment. In the application scenario of fig. 2, a canvas 201 is created in the HTML5 environment, and the canvas 201 sets an "pressed/not pressed" flag to record whether the user's finger 202 is pressed on the canvas 201, and then listens for a touch screen start event, a touch screen move event, and a touch screen end event. When the user's finger 202 presses on canvas 201, a touch screen start event is triggered; when the user moves on the canvas 201 by using the finger 202, a touch screen movement event is triggered, and the canvas 201 acquires 5 coordinates of the user finger 202 in the moving process; when the user's finger 202 is lifted, a touch screen end event is triggered.
The 5 coordinates are ordered in sequence according to the time of generation, defining an ellipse between the 1 st coordinate and the 2 nd coordinate, another ellipse … … between the 2 nd coordinate and the 3 rd coordinate, and the outline of the user's writing (shown as 203) based on the 4 ellipses between the 5 coordinates. It can be understood that in the application scenario, for the sake of simplicity and clarity, only 5 coordinates are shown, and when the coordinates collected by the canvas are dense enough, a more accurate drawing image can be obtained (as shown in 204).
In some optional implementations of the present embodiment, when the at least one condition in step 203 is not satisfied, the image is drawn on the canvas based on the respective first transverse-axis radii, the respective first longitudinal-axis radii, and the respective first included angles.
When at least one condition in step 203 is not met, it indicates that the current canvas used by the user supports automatic identification and recording of different parameters of the user during writing, so that the image can be drawn on the canvas by directly using the parameters recorded by the canvas.
In the method for drawing an image according to the above embodiment of the present application, a coordinate sequence of a touch point controlled by a user relative to a canvas coordinate system is obtained when the touch point moves on the canvas, then a first transverse axis radius, a first longitudinal axis radius, and a first included angle between a major axis of the first ellipse and a longitudinal axis of the canvas coordinate system corresponding to each coordinate are obtained, and whether the same parameter value of each obtained coordinate is equal or not is determined, and under the condition that the first transverse axis radius, the second longitudinal axis radius, and a second included angle between a major axis of the second ellipse and a longitudinal axis of the canvas coordinate system determined by every two adjacent coordinates in the coordinate sequence are calculated, and the image is drawn on the canvas based on the parameters obtained by the calculation, so that a phenomenon that strokes are consistent in thickness and stiff in the past when the image is drawn is changed, and the simulation drawing of the image is realized, the writing experience of the user on the canvas is improved.
FIG. 3 illustrates a flow chart 300 of yet another embodiment of a method for rendering an image when parameter values are fixed according to the present application. The embodiment shown in fig. 3 comprises the following steps:
step 301, for every two adjacent coordinates in the coordinate sequence, determining a horizontal axis movement distance and a vertical axis movement distance of the second touch point relative to the first touch point.
In this embodiment, the second touch point is a touch point corresponding to a coordinate with a later generation time in each two adjacent coordinates, and the first touch point is a touch point corresponding to a coordinate with an earlier generation time in each two adjacent coordinates. The horizontal axis moving distance can be calculated by the horizontal axis of the second touch point and the horizontal axis of the first touch point; the vertical axis moving distance can be calculated by the vertical coordinate of the second touch point and the vertical coordinate of the first touch point. That is, the horizontal axis movement distance and the vertical axis movement distance can be expressed by the following equation:
Δx=|x2-x1|;Δy=|y2-y1|;
wherein, y2Is the ordinate, y, of the second touch point1Is the ordinate, x, of the first touch point2Is the abscissa, x, of the second touch point1Is the abscissa of the first touch point.
Step 302, determining a second included angle between the longitudinal axis of the second ellipse and the longitudinal axis of the canvas coordinate system according to each two adjacent coordinates.
In this embodiment, the second included angle is used to represent a direction of the second ellipse in the canvas coordinate system. It can be specifically calculated by the following formula:
Figure BDA0001077123120000101
wherein alpha is a second included angle.
Step 303, determining a second transverse axis radius and a second longitudinal axis radius of the second ellipse according to the transverse axis movement distance and the longitudinal axis movement distance.
In this embodiment, a maximum stroke radius may be preset to prevent an image drawing error caused by a user's control touch point error when drawing an image.
When determining the second transverse axis radius and the second longitudinal axis radius of the second ellipse, firstly comparing the transverse axis movement distance and the longitudinal axis movement distance obtained in step 301 with a preset maximum drawing radius, and when both are not greater than the preset maximum drawing radius, setting the larger value of the two as the second transverse axis radius and the smaller value of the two as the second longitudinal axis radius; when one of the two is larger than the preset maximum drawing radius, setting the preset maximum drawing radius as a second transverse axis radius, and setting a value smaller than the preset maximum drawing radius as a second longitudinal axis radius; and when both are larger than or equal to the preset maximum drawing radius, setting the preset maximum drawing radius as a second horizontal axis radius and a second vertical axis radius, respectively.
The second transverse-axis radius and the second longitudinal-axis radius may be determined by:
Figure BDA0001077123120000111
where ρ is1Is the second longitudinal axis radius, p2And the radius is a second horizontal axis radius, r is a preset maximum drawing radius, Δ x is a horizontal axis moving distance, Δ y is a vertical axis moving distance, min represents taking the minimum value of Δ x and Δ y, and max represents taking the maximum value of Δ x and Δ y.
Meanwhile, the method for drawing an image of the present embodiment may also simultaneously perform the following steps:
step 301', the generation time of each coordinate in the coordinate sequence is obtained.
In this embodiment, the generation time of each coordinate is the time when the touch point controlled by the user moves to the coordinate. In particular practice, the canvas application may record the time of generation for each coordinate.
Step 302', for every two adjacent coordinates in the coordinate sequence, determining the moving speed of the touch point controlled by the user from the first touch point to the second touch point based on the generation time and every two adjacent coordinates.
In this embodiment, the distance between the touch points corresponding to the two adjacent coordinates can be calculated according to the two adjacent coordinates. In conjunction with the generation time of each coordinate, the movement speed at which the user-controlled touch point moves from the first touch point to the second touch point may be determined. When the moving speed is determined, a speed interval (a, b) can be preset to prevent the touch point controlled by the user from moving too fast to generate errors when drawing the image.
When the moving speed is outside the speed range, the moving speed is considered to be too fast or too slow, and an error may occur. When the moving speed is less than a, setting the value of the moving speed as a; and when the moving speed is greater than b, setting the value of the moving speed as b.
The moving speed can be specifically calculated by the following formula:
Figure BDA0001077123120000121
wherein v is the moving speed, a and b are both preset constants, and a<b,t1Generating a time, t, for the coordinates of the first touch point2And generating time for the coordinates of the second touch point.
Step 303', determining a velocity influence coefficient based on the moving velocity and a preset maximum drawing radius.
In this embodiment, the speed influence coefficient is used as an influence parameter for determining the second ellipse, considering that the user may influence the thickness of the stroke when drawing the image when controlling the touch point to move.
The velocity influence coefficient can be calculated by the following formula:
k=1-v/r;
where k is the velocity influence coefficient.
The drawing horizontal axis radius and the drawing vertical axis radius at the time of drawing the image are determined based on the second horizontal axis radius and the second vertical axis radius obtained in step 303 and the velocity influence coefficient obtained in step 303'.
Step 304, taking the product of the speed influence coefficient and the second horizontal axis radius as a drawing horizontal axis radius; the product of the velocity influence coefficient and the second vertical axis radius is taken as the plotted vertical axis radius.
In this embodiment, the moving speed of the touch point controlled by the user is used as an influence factor for image drawing. Taking the product of the second horizontal axis radius and the speed influence coefficient as the drawing horizontal axis radius in actual drawing; and taking the product of the second vertical axis radius and the speed influence coefficient as the drawing vertical axis radius when the drawing is actually carried out.
Step 305, drawing each ellipse on the canvas based on each second horizontal axis radius and each second vertical axis radius.
According to the radius of the drawing horizontal axis and the radius of the drawing vertical axis between each two adjacent coordinates, the drawing ellipse between each two adjacent coordinates can be determined. For a coordinate sequence generated in the process of moving a touch point controlled by a user on a canvas, a plurality of drawing ellipses can be obtained.
And step 306, filling drawing colors in each ellipse obtained by drawing.
And filling a drawing color for each obtained drawing ellipse, wherein the drawing color can be a default color of the canvas or a custom color of a user.
And 307, clockwise rotating each ellipse filled with the drawing color by a second included angle to generate a drawing image.
In this embodiment, after the drawn ellipses are filled with the drawing colors, the ellipses are rotated clockwise by the second angle, so that the drawn image can be obtained.
It can be understood that when the image drawn by the user is complex and cannot be completed by one touch movement, the image drawing may be completed by multiple touch movements, and at this time, only the scheme for drawing the image according to the embodiment needs to be repeatedly executed.
According to the method for drawing the image, the moving speed of the touch point controlled by the user in the moving process is used as a factor influencing the thickness of the stroke when the image is drawn, so that drawing errors caused by too fast or too slow movement of the user are avoided; by setting the maximum drawing radius, drawing errors caused by errors in the moving process of a user are avoided, and the drawn image is automatically corrected; therefore, the strokes generated by the user through touch are more vivid, and the drawing effect is improved.
With further reference to fig. 4, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an apparatus for drawing an image, which corresponds to the method embodiment shown in fig. 1, and which is particularly applicable in various electronic devices.
As shown in fig. 4, the apparatus 400 for drawing an image according to the present embodiment includes: a first acquisition unit 401, a second acquisition unit 402, a detection unit 403, and a first rendering unit 404.
The first obtaining unit 401 is configured to obtain a coordinate sequence in a coordinate system of a canvas when a touch point controlled by a user moves on the canvas. And the coordinates of each touch point in the coordinate sequence are sorted according to the generation time.
A second obtaining unit 402, configured to obtain a first transverse axis radius, a first longitudinal axis radius, and a first included angle between a major axis of the first ellipse and a longitudinal axis of the canvas coordinate system, which correspond to each coordinate in the coordinate sequence obtained by the first obtaining unit 401. The first ellipse is determined by the contact section of the touch point corresponding to each coordinate and the canvas.
A detecting unit 403, configured to detect whether the parameter acquired by the second acquiring unit 402 satisfies the following condition: the radiuses of the first transverse shafts are equal, the radiuses of the first longitudinal shafts are equal, and the first included angles are equal.
A first drawing unit 404, configured to determine, in response to the above conditions being satisfied, a second transverse-axis radius, a second longitudinal-axis radius, and a second included angle between a major axis of a second ellipse and a longitudinal axis of the canvas coordinate system, where the second transverse-axis radius, the second longitudinal-axis radius, and the second included angle are determined by every two adjacent coordinates in the coordinate sequence on the canvas; and drawing the image on the canvas based on the second transverse axis radiuses, the second longitudinal axis radiuses and the second included angles.
In some optional implementations of this embodiment, the first drawing unit 404 may further include a moving distance determining module and a first radius determining module, which are not shown in fig. 4.
And the movement distance determining module is used for determining the movement distance of the second touch point relative to the horizontal axis and the movement distance of the vertical axis of the first touch point for every two adjacent coordinates in the coordinate sequence.
The second touch point is a touch point corresponding to a coordinate with a later generation time in every two adjacent coordinates, and the first touch point is a touch point corresponding to a coordinate with an earlier generation time in every two adjacent coordinates.
A first radius determination module to determine the second transverse axis radius and the second longitudinal axis radius according to the following formula:
Figure BDA0001077123120000141
where ρ is1Is the second longitudinal axis radius, p2Is a second abscissa radius, r is a preset maximum plotted radius, Δ x is an abscissa moving distance, Δ y is an ordinate moving distance, min represents taking the minimum value of Δ x and Δ y, max represents taking the maximum value of Δ x and Δ y, and
Δx=|x2-x1|;Δy=|y2-y1|;
wherein, y2Is the ordinate, y, of the second touch point1Is the ordinate, x, of the first touch point2Is the abscissa, x, of the second touch point1Is the abscissa of the first touch point.
In some optional implementations of this embodiment, the first drawing unit 404 may further include an included angle determining module, not shown in fig. 4, configured to determine the second included angle according to the following formula:
Figure BDA0001077123120000142
wherein alpha is a second included angle.
In some optional implementations of the present embodiment, the first drawing unit 404 may further include an ellipse drawing module, a color filling module, and a rotation module, which are not shown in fig. 4.
And the ellipse drawing module is used for drawing each ellipse on the canvas based on each second transverse axis radius and each second longitudinal axis radius.
And the filling color module is used for filling drawing colors in each ellipse obtained by drawing of the ellipse drawing module.
And the rotating module is used for clockwise rotating each ellipse filled with the drawing color by the color filling module by a second included angle to generate a drawing image.
In some optional implementations of the present embodiment, the apparatus 400 for drawing an image may further include a third acquiring unit, a moving speed determining unit, an influence coefficient determining unit, and a drawing radius determining unit, which are not shown in fig. 4.
And the third acquisition unit is used for acquiring the generation time of each coordinate in the coordinate sequence.
And the moving speed determining unit is used for determining the moving speed of the touch point controlled by the user from the first touch point to the second touch point based on the generation time and every two adjacent coordinates acquired by the third acquiring unit for every two adjacent coordinates in the coordinate sequence.
And the influence coefficient determining unit is used for determining the speed influence coefficient based on the moving speed determined by the moving speed determining unit and the preset maximum drawing radius.
A drawing radius determination unit configured to take a product of the velocity influence coefficient determined by the influence coefficient determination unit and the second abscissa radius determined by the first drawing unit 404 as a drawing abscissa radius; the product of the velocity influence coefficient and the second vertical axis radius determined by the first rendering unit 404 is taken as the rendering vertical axis radius.
In some optional implementation manners of this embodiment, the first drawing unit 404 may further include a drawing module, not shown in fig. 4, configured to draw the image on the canvas based on the radius of the drawing horizontal axis, the radius of the drawing vertical axis, and the second included angle determined by the included angle determining module, which are determined by the drawing radius determining unit.
In some optional implementations of this embodiment, the moving speed determining unit may be further configured to:
the moving speed is determined according to the following formula:
Figure BDA0001077123120000151
wherein v is the moving speed, a and b are both preset constants, and a<b,t1Generating a time, t, for the coordinates of the first touch point2And generating time for the coordinates of the second touch point.
In some optional implementations of this embodiment, the influence coefficient determining unit may be further configured to:
determining a velocity influence coefficient according to the following formula:
k=1-v/r;
where k is the velocity influence coefficient.
In some optional implementations of the embodiment, the apparatus 400 for drawing an image may further include a second drawing unit, not shown in fig. 4, for drawing an image on the canvas based on the first transverse-axis radii, the first longitudinal-axis radii, and the first included angles in response to at least one of the above conditions not being satisfied.
The apparatus for drawing an image according to the above embodiment of the present application obtains, by the first obtaining unit, a coordinate sequence of a touch point controlled by a user with respect to a canvas coordinate system when the touch point moves on the canvas, then obtains, by the second obtaining unit, a first transverse axis radius, a first longitudinal axis radius of a first ellipse corresponding to each coordinate, and a first included angle between a major axis of the first ellipse and a longitudinal axis of the canvas coordinate system, and then determines whether the same parameter value of each obtained coordinate is equal, and in the case of the same parameter value, the first drawing unit calculates, by the first drawing unit, a second transverse axis radius, a second longitudinal axis radius of a second ellipse determined by every two adjacent coordinates in the coordinate sequence, and a second included angle between a major axis of the second ellipse and a longitudinal axis of the canvas coordinate system, and draws an image on a stroke based on the parameter obtained by the above calculation, thereby changing a phenomenon that a thickness of the image is consistent and hard in the past, the simulation drawing of the image is realized, and the writing experience of the user on the canvas is improved.
Referring now to fig. 5, a block diagram of a computer system 500 suitable for implementing the apparatus for drawing an image according to the embodiment of the present application is shown.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the method of the present application when executed by the Central Processing Unit (CPU) 501.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a first acquisition unit, a second acquisition unit, a detection unit, and a first rendering unit. Where the names of the cells do not in some cases constitute a limitation on the cell itself, for example, the first acquisition cell may also be described as a "cell that acquires a coordinate sequence in a coordinate system of a canvas when a touch point controlled by a user moves on the canvas".
As another aspect, the present application also provides a non-volatile computer storage medium, which may be the non-volatile computer storage medium included in the apparatus in the above-described embodiments; or it may be a non-volatile computer storage medium that exists separately and is not incorporated into the terminal. The non-transitory computer storage medium stores one or more programs that, when executed by a device, cause the device to: acquiring a coordinate sequence in a canvas coordinate system when a touch point controlled by a user moves on the canvas, wherein the coordinates of all the touch points in the coordinate sequence are sorted according to the generation time; acquiring a first transverse axis radius, a first longitudinal axis radius and a first included angle between a major axis of a first ellipse and a longitudinal axis of the canvas coordinate system, wherein the first transverse axis radius and the first longitudinal axis radius of the first ellipse correspond to each coordinate in the coordinate sequence, and the first ellipse is determined by a contact section between a touch point corresponding to each coordinate and the canvas; detecting whether the following conditions are met: the radiuses of the first transverse shafts are equal, the radiuses of the first longitudinal shafts are equal, and the first included angles are equal; in response to the above conditions being met, determining a second transverse-axis radius, a second longitudinal-axis radius and a second included angle between the major axis of the second ellipse and the longitudinal axis of the canvas coordinate system, which are determined on the canvas by every two adjacent coordinates in the coordinate sequence; and drawing an image on the canvas based on each second transverse axis radius, each second longitudinal axis radius and each second included angle.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (18)

1. A method for rendering an image, the method comprising:
acquiring a coordinate sequence in a canvas coordinate system when a touch point controlled by a user moves on the canvas, wherein the coordinates of all the touch points in the coordinate sequence are sorted according to the generation time;
acquiring a first transverse axis radius, a first longitudinal axis radius and a first included angle between a major axis of a first ellipse and a longitudinal axis of the canvas coordinate system, wherein the first transverse axis radius and the first longitudinal axis radius of the first ellipse correspond to each coordinate in the coordinate sequence, and the first ellipse is determined by a contact section between a touch point corresponding to each coordinate and the canvas;
detecting whether the following conditions are met: the radiuses of the first transverse shafts are equal, the radiuses of the first longitudinal shafts are equal, and the first included angles are equal;
in response to the above conditions being met, determining a second transverse-axis radius, a second longitudinal-axis radius of a second ellipse determined on the canvas by a transverse-axis movement distance and a longitudinal-axis movement distance between every two adjacent coordinates in the coordinate sequence, and a second included angle between a major axis of the second ellipse and a longitudinal axis of the canvas coordinate system; and drawing an image on the canvas based on each second transverse axis radius, each second longitudinal axis radius and each second included angle.
2. The method of claim 1, wherein determining a second transverse-axis radius and a second longitudinal-axis radius of a second ellipse determined on the canvas for each two adjacent coordinates in the sequence of coordinates comprises:
for every two adjacent coordinates in the coordinate sequence, determining a horizontal axis movement distance and a vertical axis movement distance of a second touch point relative to a first touch point, wherein the second touch point is a touch point corresponding to a coordinate with a later generation time in every two adjacent coordinates, and the first touch point is a touch point corresponding to a coordinate with an earlier generation time in every two adjacent coordinates;
determining the second transverse-axis radius and the second longitudinal-axis radius according to the following formulas:
Figure FDA0003021881300000011
where ρ is1Is the second longitudinal axis radius, p2For the second abscissa radius, r is a preset maximum drawing radius, Δ x is the abscissa movement distance, Δ y is the ordinate movement distance, min represents taking the minimum value of Δ x and Δ y, max represents taking the maximum value of Δ x and Δ y, and
Δx=|x2-x1|;Δy=|y2-y1|;
wherein, y2Is the ordinate, y, of the second touch point1Is the ordinate, x, of the first touch point2Is the abscissa, x, of the second touch point1And the horizontal coordinate of the first touch point.
3. The method of claim 2, wherein determining a second angle between the major axis of the second ellipse and the longitudinal axis of the canvas coordinate system comprises:
determining the second included angle according to the following formula:
Figure FDA0003021881300000021
wherein α is the second angle.
4. The method of claim 2, further comprising:
acquiring the generation time of each coordinate in the coordinate sequence;
for every two adjacent coordinates in the coordinate sequence, determining the moving speed of the touch point controlled by the user from the first touch point to the second touch point based on the generation time and the every two adjacent coordinates;
determining a speed influence coefficient based on the moving speed and the preset maximum drawing radius;
taking the product of the velocity influence coefficient and the second abscissa radius as a plotted abscissa radius;
and taking the product of the speed influence coefficient and the second longitudinal axis radius as a plotting longitudinal axis radius.
5. The method of claim 4, wherein drawing the image on the canvas based on each of the second transverse-axis radii, each of the second longitudinal-axis radii, and each of the second included angles comprises:
based on the drawing horizontal axis radius, the drawing vertical axis radius and the second included angle, drawing the image on the canvas.
6. The method of claim 4, wherein determining the moving speed of the user-controlled touch point from the first touch point to the second touch point based on the generation time and the every two adjacent coordinates comprises:
determining the moving speed according to the following formula:
Figure FDA0003021881300000031
wherein v is the moving speed, a and b are both preset constants, and a<b,t1Generating a time, t, for the coordinates of the first touch point2And generating time for the coordinates of the second touch point.
7. The method of claim 6, wherein determining a velocity impact factor based on the moving velocity and the preset maximum rendering radius comprises:
determining the velocity impact coefficient according to the following equation:
k=1-v/r;
wherein k is the velocity influence coefficient.
8. The method of claim 1, further comprising:
in response to at least one of the above conditions not being met, drawing an image on the canvas based on each of the first transverse-axis radii, each of the first longitudinal-axis radii, and each of the first included angles.
9. The method of any of claims 1-8, wherein said drawing an image on said canvas based on each of said second transverse-axis radii, each of said second longitudinal-axis radii, and each of said second included angles comprises:
drawing each ellipse on the canvas based on each second transverse axis radius and each second longitudinal axis radius;
filling drawing colors in each ellipse obtained by drawing;
and clockwise rotating each ellipse filled with the drawing color by the second included angle to generate the drawing image.
10. An apparatus for rendering an image, the apparatus comprising:
the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring a coordinate sequence in a canvas coordinate system when a touch point controlled by a user moves on a canvas, and coordinates of all touch points in the coordinate sequence are sorted according to a generation time;
the second acquisition unit is used for acquiring a first transverse axis radius, a first longitudinal axis radius and a first included angle between a major axis of a first ellipse and a longitudinal axis of the canvas coordinate system, which correspond to each coordinate in the coordinate sequence, wherein the first ellipse is determined by a contact section between a touch point corresponding to each coordinate and the canvas;
a detection unit for detecting whether the following conditions are satisfied: the radiuses of the first transverse shafts are equal, the radiuses of the first longitudinal shafts are equal, and the first included angles are equal;
a first drawing unit, configured to determine, in response to the above conditions being satisfied, a second transverse-axis radius, a second longitudinal-axis radius, and a second included angle between a major axis of the second ellipse and a longitudinal axis of the canvas coordinate system, where the second transverse-axis radius and the second longitudinal-axis radius are determined on the canvas by a transverse-axis movement distance and a longitudinal-axis movement distance between every two adjacent coordinates in the coordinate sequence; and drawing an image on the canvas based on each second transverse axis radius, each second longitudinal axis radius and each second included angle.
11. The apparatus of claim 10, wherein the first rendering unit comprises:
a moving distance determining module, configured to determine, for every two adjacent coordinates in the coordinate sequence, a horizontal axis moving distance and a vertical axis moving distance of a second touch point relative to a first touch point, where the second touch point is a touch point corresponding to a coordinate with a later generation time in every two adjacent coordinates, and the first touch point is a touch point corresponding to a coordinate with an earlier generation time in every two adjacent coordinates;
a first radius determination module to determine the second transverse axis radius and the second longitudinal axis radius according to the following formula:
Figure FDA0003021881300000041
where ρ is1Is the second longitudinal axis radius, p2For the second abscissa radius, r is a preset maximum drawing radius, Δ x is the abscissa movement distance, Δ y is the ordinate movement distance, min represents taking the minimum value of Δ x and Δ y, max represents taking the maximum value of Δ x and Δ y, and
Δx=|x2-x1|;Δy=|y2-y1|;
wherein, y2Is the ordinate, y, of the second touch point1Is the ordinate, x, of the first touch point2Is the second touchAbscissa of point, x1And the horizontal coordinate of the first touch point.
12. The apparatus of claim 11, wherein the first rendering unit comprises:
an included angle determining module, configured to determine the second included angle according to the following formula:
Figure FDA0003021881300000051
wherein α is the second angle.
13. The apparatus of claim 11, further comprising:
a third obtaining unit, configured to obtain a generation time of each coordinate in the coordinate sequence;
a moving speed determining unit, configured to determine, for every two adjacent coordinates in the coordinate sequence, a moving speed of the user-controlled touch point from the first touch point to the second touch point based on the generation time and the every two adjacent coordinates;
an influence coefficient determination unit configured to determine a speed influence coefficient based on the moving speed and the preset maximum drawing radius;
a drawing radius determination unit configured to take a product of the velocity influence coefficient and the second abscissa radius as a drawing abscissa radius; and taking the product of the speed influence coefficient and the second longitudinal axis radius as a plotting longitudinal axis radius.
14. The apparatus of claim 13, wherein the first rendering unit comprises:
and the drawing module is used for drawing an image on the canvas based on the radius of the drawing transverse axis, the radius of the drawing longitudinal axis and the second included angle.
15. The apparatus of claim 13, wherein the movement speed determination unit is further configured to:
determining the moving speed according to the following formula:
Figure FDA0003021881300000061
wherein v is the moving speed, a and b are both preset constants, and a<b,t1Generating a time, t, for the coordinates of the first touch point2And generating time for the coordinates of the second touch point.
16. The apparatus of claim 15, wherein the influence coefficient determining unit is further configured to:
determining the velocity impact coefficient according to the following equation:
k=1-v/r;
wherein k is the velocity influence coefficient.
17. The apparatus of claim 10, further comprising:
a second drawing unit operable to draw an image on the canvas based on each of the first transverse axis radii, each of the first longitudinal axis radii, and each of the first included angles in response to at least one of the above conditions not being satisfied.
18. The apparatus according to any of claims 10-17, wherein the first rendering unit comprises:
an ellipse drawing module, configured to draw each ellipse on the canvas based on each second transverse axis radius and each second longitudinal axis radius;
the filling color module is used for filling drawing colors in each ellipse obtained by drawing;
and the rotating module is used for clockwise rotating the ellipses filled with the drawing colors by the second included angle to generate the drawing image.
CN201610663557.2A 2016-08-12 2016-08-12 Method and apparatus for rendering an image Active CN107730571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610663557.2A CN107730571B (en) 2016-08-12 2016-08-12 Method and apparatus for rendering an image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610663557.2A CN107730571B (en) 2016-08-12 2016-08-12 Method and apparatus for rendering an image

Publications (2)

Publication Number Publication Date
CN107730571A CN107730571A (en) 2018-02-23
CN107730571B true CN107730571B (en) 2021-07-20

Family

ID=61199942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610663557.2A Active CN107730571B (en) 2016-08-12 2016-08-12 Method and apparatus for rendering an image

Country Status (1)

Country Link
CN (1) CN107730571B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109544661B (en) * 2018-10-23 2023-06-16 金蝶软件(中国)有限公司 Area map drawing method, apparatus, computer device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699518A (en) * 2009-10-30 2010-04-28 华南理工大学 Method for beautifying handwritten Chinese character based on trajectory analysis
CN102945557A (en) * 2012-10-12 2013-02-27 北京海鑫科金高科技股份有限公司 Vector site map drawing method based on mobile terminal
CN105405159A (en) * 2015-10-27 2016-03-16 深圳市东向同人科技有限公司 Handwriting display method and device
CN105814531A (en) * 2013-12-03 2016-07-27 微软技术许可有限责任公司 User interface adaptation from an input source identifier change

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BRPI1003655B1 (en) * 2010-09-22 2020-11-10 Centro De Tecnologia Da Informação Renato Archer (Cti) electronic brush

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699518A (en) * 2009-10-30 2010-04-28 华南理工大学 Method for beautifying handwritten Chinese character based on trajectory analysis
CN102945557A (en) * 2012-10-12 2013-02-27 北京海鑫科金高科技股份有限公司 Vector site map drawing method based on mobile terminal
CN105814531A (en) * 2013-12-03 2016-07-27 微软技术许可有限责任公司 User interface adaptation from an input source identifier change
CN105405159A (en) * 2015-10-27 2016-03-16 深圳市东向同人科技有限公司 Handwriting display method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Web GIS 平台上矢量图形可视化的JVGL 方法;石旭,边馥苓,江聪世;《武汉大学学报·信息科学版》;20061031;第31卷(第10期);第928-931页 *
基于模糊理论的在线手绘图识别;王淑侠,高满屯,齐乐华;《模式识别与人工智能》;20080630;第317-325页 *

Also Published As

Publication number Publication date
CN107730571A (en) 2018-02-23

Similar Documents

Publication Publication Date Title
US20180232135A1 (en) Method for window displaying on a mobile terminal and mobile terminal
CN106055446B (en) A kind of test method and device of mobile terminal
KR102271285B1 (en) Image processing apparatus and method for processing image
US9880721B2 (en) Information processing device, non-transitory computer-readable recording medium storing an information processing program, and information processing method
US9734591B2 (en) Image data processing method and electronic device supporting the same
CN107273000B (en) Screen multi-resolution adaptation method of intelligent oscilloscope
KR102442449B1 (en) Image processing apparatus, method for processing image and computer-readable recording medium
CN108733296B (en) Method, device and equipment for erasing handwriting
CN111078035B (en) Drawing method based on HTML5Canvas
CN106373455B (en) Micro-projection copying display device and display method
EP3610361B1 (en) Multi-stroke smart ink gesture language
CN111782131A (en) Pen point implementation method, device, equipment and readable storage medium
US20180286089A1 (en) Electronic device and method for providing colorable content
CN107730571B (en) Method and apparatus for rendering an image
KR102444054B1 (en) Image processing apparatus, method for processing image and computer-readable recording medium
CN116774877B (en) Method and device for erasing graffiti handwriting in OFD document page
US20160357395A1 (en) Information processing device, non-transitory computer-readable recording medium storing an information processing program, and information processing method
KR102384234B1 (en) Image processing apparatus, method for processing image and computer-readable recording medium
CN110197459B (en) Image stylization generation method and device and electronic equipment
US9483171B1 (en) Low latency touch input rendering
US20190347840A1 (en) Image processing system, image processing apparatus, image processing method, and program
WO2020056619A1 (en) Method for error detection in text writing, terminal device, and storage medium
CN104050692A (en) Frame display method and frame display device in photograph beautifying process
CN109358799A (en) The method of the hand annotation information of user&#39;s input is added on handwriting equipment
CN112036268B (en) Component identification method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant