Summary of the invention
At the defective that exists in the prior art, the invention provides a kind of edit methods of color gradient attributes, this method can be presented at color gradient attributes on the color gradient edit object intuitively, and the function of interactive modification color gradient attributes is provided.
A kind of edit methods of color gradient attributes may further comprise the steps:
(1) selects the color gradient edit object, obtain the current color gradient attributes of this color gradient edit object, described color gradient attributes comprises gradual change type, gradual change starting point coordinate, gradual change rotation angle, gradual change length, node location parameter and colour mixture intermediate point location parameter; Described gradual change type is linear, circular or revolution;
(2) according to color gradient attributes, generate major-minor index contour, node boost line and the colour mixture intermediate point boost line of color gradient edit object, wherein:
Described major-minor index contour is meant that the head-end coordinate is the gradual change starting point coordinate, and according to the boost line of gradual change type, swivel point coordinate, gradual change rotation angle and the definition of gradual change length attribute;
Described node boost line and major-minor index contour meet at node P, and the ratio of the length of the length of major-minor index contour and whole major-minor index contour is this node location parameter between the initial point-to-point P of gradual change;
Described colour mixture intermediate point boost line and major-minor index contour meet at colour mixture intermediate point Q, the length of the major-minor index contour between node boost line that gradual change starting point direction is adjacent and some Q is D1, the length of major-minor index contour is D2 between two node boost lines adjacent with this colour mixture intermediate point boost line, and the ratio of D1/D2 is this colour mixture intermediate point location parameter;
(3) if the gradual change type is linear or circular, by translation, flexible or rotate major-minor index contour, or translation node boost line and colour mixture intermediate point boost line, realize editor to the color gradient attributes of color gradient edit object; If the gradual change type is revolution, by the major-minor index contour of translation, or translation node boost line and colour mixture intermediate point boost line, realize editor to the color gradient attributes of color gradient edit object.
Further, in step (2), in step (2), if the gradual change type is linear, described major-minor index contour is a line segment, and line segment length is a gradual change length, and line segment is the gradual change rotation angle to the clockwise steering angle of horizontal line; If the gradual change type is circular, described major-minor index contour is a horizontal line section, and the coordinate of its left end point is the gradual change starting point coordinate, and line segment length is a gradual change length; If the gradual change type is revolution, described major-minor index contour is circular, and its central coordinate of circle is the swivel point coordinate, and the right intersection point that this circle and horizontal line intersect is major-minor index contour head-end, and its coordinate is the gradual change starting point coordinate;
If the gradual change type is linear, then described node boost line is the line segment perpendicular to major-minor index contour; If the gradual change type is circular, the then described node boost line that is positioned at the gradual change starting point is the line segment perpendicular to major-minor index contour, described other node boost line is that the process node and the center of circle are the circle of gradual change starting point, if the gradual change type is revolution, then described node boost line is a line segment, and its extended line is through swivel point;
If the gradual change type is linear and circular, described colour mixture intermediate point boost line is the line segment perpendicular to major-minor index contour, if the gradual change type is revolution, described colour mixture intermediate point boost line is a line segment, and its extended line is through swivel point.
Further, in step (3), the major-minor index contour of described translation is meant by dragging major-minor index contour and changes the position of major-minor index contour.
Change gradual change length by flexible major-minor index contour, concrete grammar is as follows: dragging major-minor index contour one side point, is that point of fixity carries out the flexible of major-minor index contour with the opposite side end points, keeps each node and colour mixture intermediate point location parameter constant simultaneously.
Change the gradual change rotation angle by rotating major-minor index contour, concrete grammar is as follows: dragging major-minor index contour one side point, is the rotation that point of fixity carries out major-minor index contour with the opposite side end points.
Further, in step (3), described translation node boost line is achieved in that and drags the node boost line and keep its node P to be positioned on the major-minor index contour, change node location, after the translation colour mixture intermediate point boost line position of adjacent both sides thereupon translation to keep adjacent colour mixture intermediate point location parameter constant.
Further again, in step (3), if crossed over other node boost line during translation node boost line, then the attached colour mixture intermediate point of this node is crossed over thereupon, this adjacent both sides of node boost line colour mixture intermediate point boost line of translation then, to keep its colour mixture intermediate point location parameter constant, described attached colour mixture intermediate point is meant the adjacent colour mixture intermediate point of gradual change distal point direction of this node.
Further again, in step (3), described translation colour mixture intermediate point boost line is achieved in that and drags colour mixture intermediate point boost line and keep its colour mixture intermediate point Q to be positioned on the major-minor index contour, changes the location parameter of colour mixture intermediate point.
Effect of the present invention is: by solution provided by the invention, not only can see the state of color gradient parameter on design layout intuitively, and can scan the space of a whole page overall situation and carry out parameter regulation, and provide convenient regulatory function for the color gradient edit object of specific type.
Embodiment
The present invention is described in further detail below in conjunction with Figure of description and specific embodiment.
Embodiment 1
A kind of edit methods of linear color gradient attributes, flow process comprise the steps: as shown in Figure 1
(1) selects the color gradient edit object, obtain its current color gradient attributes S11;
In the present embodiment, the color gradient attributes described in the step (1) comprises gradual change type, gradual change starting point coordinate, gradual change rotation angle, gradual change length, node location parameter and colour mixture intermediate point location parameter.
As shown in Figure 2, in the present embodiment, the color gradient edit object of selection is a rectangle 21, and its gradual change type is linear gradual change.
(2), generate major-minor index contour, node boost line and the colour mixture intermediate point boost line S12 of color gradient edit object according to color gradient attributes;
As shown in Figure 2, according to the linear gradual change type of the color gradient edit object of selecting, generating major-minor index contour is line segment; The node boost line is a line segment, and the intersection point of node boost line and major-minor index contour is a node; Colour mixture intermediate point boost line is a line segment, and the intersection point of colour mixture intermediate point boost line and major-minor index contour is the colour mixture intermediate point.
Major-minor index contour is a line segment 23 in the present embodiment step (2), and the coordinate of its head-end 22 is the gradual change starting point coordinate, and line segment 23 length are gradual change length, and line segment 23 is the gradual change rotation angle to horizontal line 24 clockwise steering angles; The node boost line is perpendicular to major-minor index contour and meet at node P, and the ratio of the length of the length of major-minor index contour and major-minor index contour is the node location parameter between gradual change starting point and the some P; Described colour mixture intermediate point boost line is perpendicular to major-minor index contour and meet at colour mixture intermediate point Q, the length of the major-minor index contour between node boost line that its gradual change starting point direction is adjacent and the some Q is D1, the length of major-minor index contour is D2 between the adjacent node boost line of colour mixture intermediate point boost line, and the ratio of D1/D2 is colour mixture intermediate point location parameter.
Among Fig. 2, line segment 25, line segment 26 and line segment 27 are the node boost line, and itself and major-minor index contour 23 intersects and obtain node 22,260,30 respectively, and the location parameter of node 22,260,30 is respectively 0%, 50% and 100%; Line segment 28 and line segment 29 are colour mixture intermediate point boost line, and itself and major-minor index contour 23 intersects and obtain colour mixture intermediate point 280,290 respectively, and the location parameter of colour mixture intermediate point 280,290 is 50%.
(3) by translation, flexible or rotate major-minor index contour or translation node boost line and colour mixture intermediate point boost line, realize the editor S13 of color gradient attributes;
As shown in Figure 2,30 flexible major-minor index contours 23 of the end points by dragging major-minor index contour 23 at first, wherein flexible major-minor index contour is meant by flexible major-minor index contour 23 and changes gradual change length, if drag major-minor index contour 23 1 sides point, be that point of fixity carries out the flexible of major-minor index contour then, keep each node and colour mixture intermediate point location parameter constant simultaneously with the opposite side end points; The end points 30 that drags major-minor index contour 23 then is rotated counterclockwise major-minor index contour 23, the anglec of rotation is 10 degree, wherein rotating major-minor index contour 23 is meant by rotating major-minor index contour 23 change gradual change rotation angle, if drag major-minor index contour 23 1 sides point, be the rotation that point of fixity carries out major-minor index contour 23 then with the opposite side end points; Finally, obtain the gradual change edit object 31 behind the editor as shown in Figure 3, its middle conductor 35, line segment 36 and line segment 37 are adjusted node boost line, and line segment 38 and line segment 39 are adjusted colour mixture intermediate point boost line.
As shown in Figure 3, the major-minor index contour 33 of translation at first, the intermediate point of translation colour mixture then boost line 38, this colour mixture intermediate point location parameter is 25% after the translation, color gradient edit object 41 after being edited as shown in Figure 4, line segment 45, line segment 46 and line segment 47 are adjusted node boost line, and line segment 48 and line segment 49 are adjusted colour mixture intermediate point boost line; Wherein the major-minor index contour of translation is meant by dragging major-minor index contour and changes the position of major-minor index contour, translation colour mixture intermediate point boost line is meant by dragging colour mixture intermediate point boost line and keeping colour mixture intermediate point Q to be positioned on the major-minor index contour, changes the location parameter of colour mixture intermediate point.
Translation node boost line 46 among Fig. 4 is adjusted to this node location parameter and is 25% position, after the translation gradual change boost line 46, in order to keep adjacent colour mixture intermediate point location parameter constant, needs translation to adjust colour mixture intermediate point boost line 48 and 49; Wherein the translation node is meant by dragging the node boost line and keep its node P to be positioned on the major-minor index contour, changes node location, after the translation colour mixture intermediate point boost line position of adjacent both sides thereupon translation to keep adjacent colour mixture intermediate point location parameter constant.
As shown in Figure 5, color gradient edit object 51 middle conductors 55 behind the editor, line segment 56 and line segment 57 are respectively 0%, 25% and 100% for adjusting the posterior nodal point boost line; Line segment 58 and line segment 59 are for adjusting back colour mixture intermediate point boost line, and its colour mixture intermediate point location parameter remains unchanged, and is respectively 25% and 50%.
If crossed over other node boost line when carrying out the translation of node boost line, then the attached colour mixture intermediate point of this node (the colour mixture intermediate point that the gradual change end direction of this node is adjacent) is crossed over thereupon, this adjacent both sides of node boost line colour mixture intermediate point boost line of translation then is to keep its colour mixture intermediate point location parameter constant.Translation node boost line 55 is to gradual change boost line 56 and 57 among Fig. 5, then that this node boost line is attached colour mixture intermediate point boost line 58 moves between adjusted node boost line 55 and 57, the attached colour mixture intermediate point 50 of this node is also crossed over thereupon, the colour mixture intermediate point boost line 58 and 59 of translation node boost line both sides then, make its colour mixture intermediate point location parameter be adjusted into 25% and 50% respectively, with the holding position parameter constant.As shown in Figure 6, the gradual change edit object 61 after editor finishes, the node boost line 55,56 and 57 among Fig. 5 is adjusted into gradual change boost line 65,66 and 67, and colour mixture intermediate point boost line 58 and 59 is adjusted into colour mixture intermediate point boost line 68 and 69.
Embodiment 2
A kind of edit methods of circular color gradient attributes, flow process comprise the steps: as shown in Figure 1
(1) selects the color gradient edit object, obtain its gradient attributes S11;
Present embodiment, as shown in Figure 7, the gradual change edit object of selection is a rectangle 71, the gradual change type is circular gradual change.
(2), generate major-minor index contour, gradual change node boost line node boost line and the colour mixture intermediate point boost line S12 of gradual change edit object according to gradient attributes;
Present embodiment, as shown in Figure 7, according to circular color gradient attributes, major-minor index contour 73 is a horizontal line section, the coordinate 72 of its left end point is the gradual change starting point coordinate, line segment length is a gradual change length, node boost line and major-minor index contour meet at node P, and the ratio of the length of the length of major-minor index contour and whole major-minor index contour is this node location parameter between the initial point-to-point P of gradual change, the node boost line that wherein is positioned at the gradual change starting point is the line segment perpendicular to major-minor index contour, other node boost line is that the process node and the center of circle are the circle of gradual change starting point, the vertical major-minor index contour of colour mixture intermediate point boost line also meets at colour mixture intermediate point Q, the length of the major-minor index contour between node boost line that gradual change starting point direction is adjacent and some Q is D1, the length of major-minor index contour is D2 between two node boost lines adjacent with this colour mixture intermediate point boost line, and the ratio of D1/D2 is this colour mixture intermediate point location parameter.The node boost line is 75,76 and 77 among the figure, and line segment 78 and 79 is a colour mixture intermediate point boost line.
(3) by translation, flexible or rotate major-minor index contour or translation gradual change node boost line node boost line and colour mixture intermediate point boost line, realize the editor S13 of color gradient attributes;
The color gradient edit object of circular gradual change shown in Figure 7 is realized that the edit methods of color gradient attributes is similar to the step among the embodiment 1.
Embodiment 3
A kind of edit methods that turns round color gradient attributes, flow process comprises the steps: as shown in Figure 1
(1) selects the color gradient edit object, obtain its gradient attributes S11;
Present embodiment, as shown in Figure 8, the gradual change edit object of selection is a rectangle 81, the gradual change type is the revolution gradual change, wherein turns round gradual change and is meant with the swivel point to be that the horizontal positive axis of initial point is that the center of circle rotates the filling of carrying out color gradient in the counterclockwise direction with the swivel point.
(2), generate major-minor index contour, gradual change node boost line node boost line and the colour mixture intermediate point boost line S12 of gradual change edit object according to gradient attributes;
Present embodiment, as shown in Figure 8, according to the revolution color gradient attributes, major-minor index contour is circle 83, and its central coordinate of circle 80 is the swivel point coordinate, and this circle is major-minor index contour head-end with the right intersection point 82 that horizontal line intersects, and its coordinate is the gradual change starting point coordinate; Node boost line 85 and 86 is a line segment, meets at node P with major-minor index contour, and the ratio of the length of the length of major-minor index contour and whole major-minor index contour is this node location parameter between the initial point-to-point P of gradual change, and its extended line is through swivel point; Colour mixture intermediate point boost line 88 and 89 is a line segment, its vertical major-minor index contour also meets at colour mixture intermediate point Q, the length of the major-minor index contour between node boost line that gradual change starting point direction is adjacent and some Q is D1, the length of major-minor index contour is D2 between two node boost lines adjacent with this colour mixture intermediate point boost line, the ratio of D1/D2 is its extended line process swivel point of this colour mixture intermediate point location parameter, and its extended line is through swivel point.
(3) by the major-minor index contour of translation, or translation gradual change node boost line node boost line and colour mixture intermediate point boost line, the editor S13 of realization color gradient attributes;
The color gradient edit object of revolution gradual change shown in Figure 8 is realized that the edit methods of color gradient attributes is similar to the step among the embodiment 1.
The edit methods of a kind of color gradient attributes disclosed by the invention, at first select the color gradient edit object, obtain the current color gradient attributes of this color gradient edit object, secondly according to the color gradient attributes setting, generate major-minor index contour, node boost line and the colour mixture intermediate point boost line of color gradient edit object, at last by translation, flexible or rotate the operation of major-minor index contour or translation node boost line and colour mixture intermediate point boost line, realize editor and modification to the color gradient attributes of this color gradient editor's object.The inventive method has realized on the color gradient edit object by gradual change parameter boost line Show Color gradient attributes intuitively, and has revised the color gradient attributes parameter by visualized operations such as drag and drop boost lines.
Consider the description of this invention disclosed herein and special embodiment, other embodiment of the present invention are conspicuous for a person skilled in the art.These explanations and embodiment only consider as an example that they all belong to by within the indicated protection scope of the present invention and spirit of claims.