CN101833744B - Method and device for efficiently drawing graphics - Google Patents

Method and device for efficiently drawing graphics Download PDF

Info

Publication number
CN101833744B
CN101833744B CN 201010138215 CN201010138215A CN101833744B CN 101833744 B CN101833744 B CN 101833744B CN 201010138215 CN201010138215 CN 201010138215 CN 201010138215 A CN201010138215 A CN 201010138215A CN 101833744 B CN101833744 B CN 101833744B
Authority
CN
China
Prior art keywords
empty frame
divergent
convergent
thread
point
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.)
Expired - Fee Related
Application number
CN 201010138215
Other languages
Chinese (zh)
Other versions
CN101833744A (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.)
Vtron Group Co Ltd
Original Assignee
Vtron Technologies 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 Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CN 201010138215 priority Critical patent/CN101833744B/en
Publication of CN101833744A publication Critical patent/CN101833744A/en
Application granted granted Critical
Publication of CN101833744B publication Critical patent/CN101833744B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention relates to a method and device for efficiently drawing graphics. The method comprises the following steps: receiving a command for establishing a graphic; receiving the graphic data of the graphic established in the selected effective area; establishing gridlines according to the size of the graphic, displaying the gridlines on a screen; establishing graphic-creating work threads for processing the graphic data, after the processing of the graphic-creating work threads, displaying the established graphic in the gridlines, and finishing the graphic-creating work threads. The method of the invention establishes the gridlines according to the size of the graphic and displays the gridlines on the screen so as to prompt that a graphic object is established in the gridline range for the user; then the graphic-creating work threads are established, the work threads processes the graphic data; and after the processing of graphic-creating work threads, the obtained graphic is displayed in the gridlines. The application mode using work threads for processing can increase the drawing efficiency of the system and the consistent and smooth effects when the graphic is drawn.

Description

The method of graphing and device
Technical field
The present invention relates to the graph technology field, particularly the device of a kind of method of graphing and efficiently drawing graphics.
Background technology
Because GDI can provide abundant graphic plotting interface, exploitation is simple, and therefore, when graphing, more is to carry out with GDI/GDI+ at present.But GDI/GDI+ can not utilize the performance of video card fully, draws inefficiency, and especially when drawing larger figure (resolution is greater than 1024*768), drawing efficient can significantly decrease.For these problems, wherein a kind of better mode that compares is to create figure with GDI+, and then convert texture among the Direct to, the drafting and the brush that are implemented on the screen by Direct at last shield, effectively use the characteristics of video card resource to take full advantage of Direct, improve the efficient of graphic plotting with this.Yet, even if drawing, texture has the advantage of above-mentioned effective use video card resource, but a fatal shortcoming is arranged also, namely when texture is larger, system's spent time when creating texture is longer, the consumption of system resource is also just larger, can't reach coherent, smooth drafting effect, and drafting efficient is also just lower.In addition, no matter be that GDI+ or Direct draw, all need graph data is processed and carried out the calculating of mathematical formulae, in this process, will consume a large amount of system resource and processing time, thereby can cause inevitably decline and the card screen phenomenon of system performance, but in the process of the processing graphics of reality, the resource of computing machine and time is all by real or whole using, thereby causes resource and time waste, and so that the processing power of computing machine is low.
Summary of the invention
For above-mentioned problems of the prior art, the object of the present invention is to provide a kind of method and device of graphing, it can take full advantage of the resource of computer system and the mistiming of computer processing data, and can improve with this efficient of graphing.
For achieving the above object, the present invention by the following technical solutions:
A kind of method of graphing comprises step:
Receive and create graphics command;
Be received in the graph data of the figure that creates in the selected effective coverage;
Dimension of picture size according to described figure creates empty frame, and should show at screen by the void frame;
Set up the figure building work thread of processing for to described graph data, the figure that creates after the described figure building work thread process is shown in described empty frame, and finish described figure building work thread;
After finishing described figure building work thread, be hidden state with the status modifier of described empty frame.
A kind of device of graphing comprises the command reception module, graph data receiver module, empty frame processing module, the worker thread module that are connected successively;
Described graph data receiver module is received in the graph data of the figure that creates in the effective coverage when described command reception module receives the establishment graphics command;
The dimension of picture size that described empty frame processing module is determined according to described graph data is set up empty frame, and should show at screen by the void frame;
Described worker thread module is used for creating the figure building work thread for described graph data being processed to create figure, and the figure that the image creation worker thread is created shows in described empty frame, and the power cut-off thread;
Described empty frame processing module, also at figure that described worker thread module will create or handle well after described empty frame or the empty frame of Mobile Termination or convergent-divergent stop showing in the empty frame, the status modifier that described empty frame or the empty frame of described Mobile Termination or described convergent-divergent is stopped empty frame is hidden state.
According to the solution of the present invention, it is receiving the establishment graphics command, and received after the graph data relevant for certain figure that in the effective coverage, creates, directly do not enter so far process graphical data, create out the step of figure, but create an empty frame by the dimension of picture size that graph data is determined, and should create a Drawing Object in the screen demonstration to have pointed out in this void frame scope to the user by the void frame, then set up figure building work thread, carry out processing procedure to the graph data of figure by figure building work thread, then the figure that obtains after the figure building work thread process is shown in empty frame, because in system, thread all is idling-resource and the free time of utilizing system when carrying out, take full advantage of idling-resource and the mistiming of system, and when drawing a plurality of figure, to set up respectively figure building work thread for each figure, work between each thread is separate, can carry out simultaneously, thus drawing efficiency and system's linking up in the graphing process of greatly having improved system, the effect of fluency.
Description of drawings
Fig. 1 is the schematic flow sheet of the embodiment of the method one of efficiently drawing graphics of the present invention;
Fig. 2 is the schematic flow sheet of the embodiment of the method two of efficiently drawing graphics of the present invention;
Fig. 3 is the schematic flow sheet of the embodiment of the method three of efficiently drawing graphics of the present invention;
Fig. 4 is the structural representation of the device of efficiently drawing graphics of the present invention.
Embodiment
Embodiment one:
As shown in Figure 1, be the schematic flow sheet of the embodiment of the method one of efficiently drawing graphics of the present invention.In the present embodiment, the method for efficiently drawing graphics of the present invention comprises step:
Step S101: receive and create graphics command, enter step S102;
Step S 102: receive selected effective coverage, and be received in the graph data of the figure that creates in this effective coverage, enter step S103;
Step S103: the dimension of picture size according to the figure of described establishment creates empty frame, and should show at screen by the void frame, to have created an object in this void frame scope to user's prompting, enters step S104;
Step S104: set up figure building work thread, this figure building work thread is used for creating the figure process to the processing of graph data, the processing here can be existing processing to graph data commonly used, for example can comprise: extract graph data, decompressed data, establishment texture, create the reserve data buffering, buffered data is brushed display screen to show, to create the object properties window, value is assigned to window shows etc., enter step S105;
Step S105: the figure that creates after the figure building work thread process is presented in the empty frame of above-mentioned establishment, and finishes this figure building work thread.
Scheme according to the invention described above, when receiving figure building work instruction, it is the empty frame of size establishment by the definite figure of graph data, and should create a Drawing Object in the screen demonstration to have pointed out in this void frame scope to the user by the void frame, then by setting up figure building work thread, carry out processing procedure to the graph data of figure by figure building work thread, then the figure that obtains after the figure building work thread process is shown in empty frame, because the tetragonal function interface of picture that can directly call among the GDI when creating empty frame is realized, there are not extra data to process and calculate, therefore can create out rapidly an empty frame, in addition, job specification according to thread, thread does not affect the work of other threads when carrying out, do not affect simultaneously the work of main thread yet, do not affect the processing procedure that main thread goes to carry out other, so that entire system looks relatively more smooth, stuck phenomenon can not appear, thread all is idling-resource and the free time of utilizing system when carrying out, take full advantage of idling-resource and the mistiming of system, and when drawing a plurality of figure, to set up respectively figure building work thread for each figure, work between each thread is separate, can carry out simultaneously, thus drawing efficiency and system's linking up in the graphing process of greatly having improved system, the effect of fluency.
In addition, after the figure establishment was finished and shown in empty frame, the outer empty frame of figure may affect user's visual effect, so that the user thinks the part that this void frame also is figure by mistake, therefore, after above-mentioned steps S105, can also comprise:
Step S1052: status modifier that should the void frame is hidden state.
Wherein, the effective coverage that receives among the above-mentioned steps S102 is determined by the coordinate data of user's input, can be four coordinate datas usually, can certainly be the coordinate data of other numbers, this moment this effective coverage regional extent that these coordinate datas are determined of serving as reasons.When adopting this mode, the scope that these coordinates regionals are determined should be an effective regional extent, for example take four coordinate datas as example, these four coordinate datas can not be all identical, and the determined scope of coordinate data can not drop on outside the screen display scope etc.Certainly, the effective coverage here also can be that the mode that adopts mouse commonly used to draw is determined, perhaps also can be the mode that adopts other, can be different according to the difference that practical application is selected, do not repeat them here.
In addition, the graph data of the figure of the establishment of identifying among the above-mentioned steps S102, can be that the user is according to file datas such as selected certain picture of needs or certain videos, also can be some graph datas that user oneself draws in this effective coverage, the user who for example identifies is once clicking some coordinate points data of identifying to the moving process of mouse-up etc. from mouse, when the graph data of the figure that creates is file data, dimension of picture size among the step S103 is determined according to the size of those file datas, when the graph data of the figure that creates was some graph datas of user oneself drafting, the dimension of picture size among the step S103 was determined according to the bounds of the coordinate of those graph datas.
When needs are drawn a plurality of figure, the process that need not to wait until the establishment of a figure finishes, can be simultaneously a plurality of figures to be created, variant figure be set up respectively figure building work thread separately, as long as can effectively distinguish the graph data of each figure.
Embodiment two:
As shown in Figure 2, be the schematic flow sheet of the embodiment of the method two of efficiently drawing graphics of the present invention, in the present embodiment, mainly be to move to illustrate for the figure that has created.
As shown in Figure 2, the method in the present embodiment comprises step:
Step S201: recognize the initial coordinate point that mouse is clicked, enter step S202;
Step S202: judge that this initial coordinate point is whether in the first area coordinate range of the empty frame of figure, if enter step S203;
Step S203: be judged to be and receive the mobile graphics instruction that this figure is moved, and record the position coordinates of this initial coordinate point, enter step S204;
Step S204: the Mobile Termination point that the identification mouse moves enters step S205;
Step S205: move to Mobile Termination point region according to the name a person for a particular job empty frame of figure of initial coordinate point, Mobile Termination, the empty frame that moves to behind the Mobile Termination point region is referred to as the empty frame of Mobile Termination with it, and the empty frame of Mobile Termination shown at screen, the particular location of the empty frame of Mobile Termination can be determined with respect to the particular location of the empty frame before mobile according to initial coordinate point, initial coordinate point should be corresponding with respect to the position of the empty frame before mobile and Mobile Termination point with respect to the position of the empty frame of Mobile Termination, enters subsequently step S206;
Step S206: create figure mobile working thread, this figure mobile working thread is used for the processing to the graph data of figure moving process, the processing here can be existing processing to graph data commonly used, such as being to comprise processes such as creating corresponding dialog box property box, assignment respective attributes data, establishment texture, calculating, enter step S207;
Step S207: the figure that obtains after the figure mobile working thread process is shown in the empty frame of Mobile Termination, finish figure mobile working thread.
As mentioned above, the present invention program is when moving figure, also be first empty frame to be moved, then create figure mobile working thread and realize processing procedure to graph data, the combination of empty frame and thread has greatly improved the drawing efficiency of system and system to the effect of coherent, the fluency in the figure moving process.
In addition, in the moving process to figure, for the user, the position that may need the real time inspection Drawing Object to move to determines specifically need which position this Drawing Object is moved to this, therefore, between above-mentioned steps S203 and step S204, also include step:
Step S2031: the moving coordinate point in the identification mouse moving process, the moving coordinate point here refer at identification initial coordinate point and identify the coordinate points of identifying between the Mobile Termination point process, enter step S2032;
Step S2032: the empty frame of figure is moved to moving coordinate point region, and the empty frame (it is referred to as empty frame in the movement) that will move to moving coordinate point region shows at screen, the particular location of empty frame can be determined with respect to the particular location of the empty frame before mobile according to initial coordinate point in the movement, and initial coordinate point should be corresponding with respect to the position of the empty frame before mobile and moving coordinate point with respect to the position of empty frame in the movement.
In addition, as mentioned above, in order effectively to avoid the impact on user's visual effect when showing of empty frame, after the figure establishment is finished, be status modifier with empty frame for hidden state, therefore, in the time will moving Drawing Object, in order to make the user have one to get information about to the shift position of Drawing Object, also needing the status modifier with empty frame is show state, for operation, namely, after step S203, before the step 2031, also include step S2030:
Step S2030: be show state with the status modifier of the empty frame of this figure.
Correspondingly, for the impact of empty frame after effectively avoiding the figure establishment to finish on user's visual effect, after above-mentioned steps S207, can also include step:
Step S2072: be hidden state with the status modifier of the empty frame of described Mobile Termination.
Wherein, the first area coordinate range that above-mentioned initial coordinate point is clicked, free setting according to actual needs, for example, this first area coordinate range can be the set that forms except other all coordinate points on four borders of empty frame in the empty frame region, also can be the set that forms except other all coordinate points of four apex coordinates of empty frame in the empty frame region, perhaps also can be the setting of carrying out other.
Embodiment three:
Shown in Figure 3 is the schematic flow sheet of efficiently drawing graphics embodiment three of the present invention, in the present embodiment, mainly be for figure created finish after, the explanation when this figure is carried out convergent-divergent.
As shown in Figure 3, the method for efficiently drawing graphics of the present invention comprises step:
Step S301: recognize the initial coordinate point that mouse is clicked, enter step S302;
Step S302: judge that this initial coordinate point is whether in the second area coordinate range of the empty frame of figure, if enter step S303;
Step S303: be judged to be and receive the convergent-divergent graphics command that this figure is carried out convergent-divergent, and record the position coordinates of this initial coordinate point, enter step S304;
Step S304: the convergent-divergent terminating point that the identification mouse moves enters step S305;
Step S305: according to initial coordinate point, convergent-divergent terminating point the empty frame of figure is carried out convergent-divergent, the empty frame behind the convergent-divergent is referred to as convergent-divergent and stops empty frame, and convergent-divergent is stopped empty frame shows at screen, enters step S306;
Step S306: create the pantography worker thread, this pantography worker thread is used for the processing to the graph data of pantography process, the processing here can be existing processing to graph data commonly used, such as being to comprise processes such as creating corresponding dialog box property box, assignment respective attributes data, establishment texture, calculating, enter step S307;
Step S307: the pantography worker thread is processed the figure that obtains afterwards in convergent-divergent stops empty frame, show, finish the pantography worker thread.
As mentioned above, the present invention program is when carrying out convergent-divergent to figure, also be first empty frame to be carried out convergent-divergent, then create the pantography worker thread and realize processing procedure to graph data, the combination of empty frame and thread has greatly improved the drawing efficiency of system and system to the effect of coherent, the fluency in the pantography process.
In addition, in the convergent-divergent process to figure, for the user, may need the convergent-divergent size of real time inspection Drawing Object, determine specifically this object to be zoomed to which kind of size with this, therefore, between above-mentioned steps S303 and step S304, also include step:
Step S3031: the convergent-divergent coordinate points in the identification mouse moving process, the convergent-divergent coordinate points here refer at identification initial coordinate point and identify the coordinate points of identifying between the convergent-divergent terminating point process, enter step S3032;
Step S3032: according to initial coordinate point, convergent-divergent coordinate points the empty frame of figure is carried out convergent-divergent, we are referred to as empty frame in the convergent-divergent the empty frame behind the convergent-divergent, and empty frame in the convergent-divergent is shown at screen.
In addition, as mentioned above, in order effectively to avoid the impact on user's visual effect when showing of empty frame, after the figure establishment is finished, be status modifier with empty frame for hidden state, therefore, in the time will carrying out convergent-divergent to Drawing Object, for the size after making the user to the convergent-divergent of Drawing Object has one to get information about, also needing the status modifier with empty frame is show state, for operation, namely, after step S303, before the step 3031, also include step S3030:
Step S3030: be show state with the status modifier of the empty frame of this figure.
Correspondingly, for the impact of empty frame after effectively avoiding pantography to finish on user's visual effect, after above-mentioned steps S307, can also include step:
Step S3072: the status modifier that described convergent-divergent is stopped empty frame is hidden state.
Wherein, the second area coordinate range that above-mentioned initial coordinate point is clicked, free setting according to actual needs, for example, this second area coordinate range can be four set that the border forms of empty frame region, also can be four set that apex coordinate forms of empty frame, perhaps also can be the setting of carrying out other.In addition, second area coordinate range and first area coordinate range are less than occuring simultaneously, to avoid the chaotic situation of operation when the user clicks this intersection point.
In addition, at above-described embodiment two, among the embodiment three figure is moved, in the explanation of convergent-divergent, all be to identify the initial coordinate point, moving coordinate point or convergent-divergent coordinate points, Mobile Termination point or convergent-divergent terminating point describe, this is the convenience for to user's operating mouse the time and habitually considers, the user presses the mouse position and can be considered the initial coordinate point, to can be considered be Mobile Termination point or convergent-divergent terminating point in the position when pressing mouse and unclamping mouse after moving, after pressing mouse, unclamp the point of identifying before the mouse and then be moving coordinate point or convergent-divergent coordinate points.According to actual needs, also can be to adopt other modes to realize movement, the beginning of convergent-divergent and the identification of end are judged, for example, mobile graphics instruction or convergent-divergent graphics command, can be that option by direct movement or convergent-divergent provides, rather than judge by identification initial coordinate point, in addition, the coordinate of the initial point when movement or convergent-divergent, can be to determine by manual input, the Mobile Termination point, the convergent-divergent terminating point also can be to determine etc. that by the mode of manual input the concrete processing procedure that needs only graph data is to finish by creating corresponding worker thread, does not repeat them here.
In addition, in the above description, mainly be that the process of movement, convergent-divergent for figure is when describing, in the time need to carrying out other processing operation to figure, also can be to realize by the mode of setting up corresponding worker thread, with resource and the mistiming of effectively utilizing system, concrete implementation does not repeat them here.
According to the method for the efficiently drawing graphics of the invention described above, the present invention also provides a kind of device of efficiently drawing graphics, as shown in Figure 4, is the structural representation of the device of efficiently drawing graphics of the present invention.
As shown in Figure 4, the device of efficiently drawing graphics of the present invention includes command reception module 401, graphic processing data module 402, empty frame processing module 403, the worker thread module 404 that connects successively,
Wherein, command reception module 401 is used for receiving the instruction that creates figure;
Described graph data receiver module 402 is used for receiving selected effective coverage when described command reception module 401 receives the establishment graphics command, and is received in the graph data of the figure that creates in this effective coverage;
The dimension of picture size that described empty frame processing module 403 is determined according to described graph data is set up empty frame, and should show at screen by the void frame;
Described worker thread module 404 is used for creating the figure building work thread for described graph data being processed to create figure, and the figure that the image creation worker thread is created shows in described empty frame, and the power cut-off thread.
In the process of the establishment figure of a reality, the workflow of the device of above-mentioned efficiently drawing graphics can be as described below:
After command reception module 401 receives and creates graphics command, receive selected effective coverage by graph data receiver module 402, and be received in this effective coverage the graph data of the figure that creates, the dimension of picture size of the figure that is created according to the graph data receiver module by empty frame processing module subsequently creates empty frame, and should show at screen by the void frame, in this void frame scope, to have created a Drawing Object to user's prompting, then worker thread module 404 is set up figure building work thread, this figure building work thread is used for creating the figure process to the processing of graph data, the processing here can be existing processing to graph data commonly used, for example can comprise: extract graph data, decompressed data, create texture, create the reserve data buffering, buffered data is brushed display screen to show, create the object properties window, value is assigned to window to be shown etc., worker thread module 404 is presented at the figure that creates after the figure building work thread process in the empty frame of above-mentioned empty frame processing module 403 establishments, and finishes this figure building work thread.
In addition, after the figure establishment is finished and is shown in empty frame, the outer empty frame of figure may affect user's visual effect, so that the user thinks the part that this void frame also is figure by mistake, therefore, after above-mentioned worker thread module 404 was through with this figure building work thread, empty frame processing module 403 can also be hidden state with status modifier that should the void frame.
Wherein, the effective coverage that above-mentioned graph data receiver module 402 receives is determined by the coordinate data of user's input, can be four coordinate datas usually, can certainly be the coordinate data of other numbers, this moment this effective coverage regional extent that these coordinate datas are determined of serving as reasons.When adopting this mode, the scope that these coordinates regionals are determined should be an effective regional extent, for example take four coordinate datas as example, these four coordinate datas can not be all identical, and the determined scope of coordinate data can not drop on outside the screen display scope etc.Certainly, the effective coverage here also can be that the mode that adopts mouse commonly used to draw is determined, perhaps also can be the mode that adopts other, can be different according to the difference that practical application is selected, do not repeat them here.
In addition, the graph data of the figure of the establishment that above-mentioned graph data receiver module 402 receives, can be that the user is according to file datas such as selected certain picture of needs or certain videos, also can be some graph datas that user oneself draws in this effective coverage, the user who for example identifies is once clicking some coordinate points data of identifying to the moving process of mouse-up etc. from mouse, when the graph data of the figure that creates is file data, the dimension of picture size that empty frame processing module 403 creates empty frame time institute foundation is determined according to the size of those file datas, when the graph data of the figure that creates was some graph datas of user oneself drafting, the dimension of picture size that empty frame processing module 403 creates empty frame time institute foundation was determined according to the bounds of the coordinate of those graph datas.
Figure is created finish and show after, for the convenient use that realizes easily figure, may also need to figure move, the processing procedure such as convergent-divergent.
When figure being moved processing, command reception module 401 also is connected with empty frame processing module 403 at this moment, can receive the mobile graphics instruction by command reception module 401, empty frame processing module 403 is when command reception module 401 receives the mobile graphics instruction, the empty frame of figure is moved to the Mobile Termination point region of identifying, and the empty frame of the Mobile Termination that will move to Mobile Termination point region shows at screen, subsequent working thread module 404 creates the figure mobile working thread of processing for the graph data of moving process, and the image after the figure mobile working thread process is shown in the empty frame of described Mobile Termination.
Wherein, in the moving process to figure, for the user, the position that may need the real time inspection Drawing Object to move to, determine specifically need which position this Drawing Object is moved to this, therefore, above-mentioned empty frame processing module 403 also is used for when command reception module 401 receives the mobile graphics instruction, the empty frame of figure is moved to the moving coordinate point region of identifying, and will move to that empty frame shows at screen in the movement of moving coordinate point region, wherein, the moving coordinate point here refers at identification initial coordinate point and identifies the coordinate points of identifying between the Mobile Termination point process.
In addition, as mentioned above, in order effectively to avoid the impact on user's visual effect when showing of empty frame, after the figure establishment is finished, that status modifier with empty frame is for hidden state, therefore, in the time will moving Drawing Object, in order to make the user have one to get information about to the shift position of Drawing Object, also needing the status modifier with empty frame is show state, for operation, after command reception module 401 received the mobile graphics instruction, it was show state that empty frame processing module 403 also needs the status modifier with the empty frame of this figure.
Correspondingly, for the impact of empty frame after effectively avoiding the figure establishment to finish on user's visual effect, worker thread module 404 shows the graph data of handling well in the empty frame of Mobile Termination after, empty frame processing module 403 can also be hidden state with the status modifier of the empty frame of described Mobile Termination.
When figure being carried out the convergent-divergent processing, command reception module 401 also is connected with empty frame processing module 403 at this moment, can receive the convergent-divergent graphics command by command reception module 401, described empty frame processing module 403 is when command reception module 401 receives the convergent-divergent graphics command, according to the initial coordinate point, the convergent-divergent terminating point carries out convergent-divergent to the empty frame of figure, and the convergent-divergent behind the convergent-divergent is stopped empty frame show at screen, subsequently, worker thread module 404 creates the pantography worker thread of processing for the graph data of convergent-divergent process, and the image after the processing of pantography worker thread is shown in described convergent-divergent stops empty frame.
Wherein, in the convergent-divergent process to figure, for the user, the convergent-divergent size that may need the real time inspection Drawing Object, determine specifically this object will be zoomed to which kind of size with this, therefore, above-mentioned empty frame processing module 403 also is used for when described command reception module receives the convergent-divergent graphics command, according to the initial coordinate point, the convergent-divergent coordinate points is carried out convergent-divergent to the empty frame of figure, and empty frame in the convergent-divergent behind the convergent-divergent shown at screen, wherein, the convergent-divergent coordinate points here refers at identification initial coordinate point and identifies the coordinate points of identifying between the convergent-divergent terminating point process.
As mentioned above, in order effectively to avoid the impact on user's visual effect when showing of empty frame, after the figure establishment is finished, that status modifier with empty frame is for hidden state, therefore, in the time will carrying out convergent-divergent to Drawing Object, in order to make the user have one to get information about to the convergent-divergent size of Drawing Object, also needing the status modifier with empty frame is show state, for operation, after command reception module 401 received the convergent-divergent graphics command, it was show state that empty frame processing module 403 also needs the status modifier with the empty frame of this figure.
Correspondingly, for the impact of empty frame after effectively avoiding the figure establishment to finish on user's visual effect, worker thread module 404 shows the graph data of handling well in convergent-divergent stops empty frame after, the status modifier that empty frame processing module 403 can also stop described convergent-divergent empty frame is hidden state.
In addition, above-mentioned figure is moved, in the explanation of convergent-divergent, initial coordinate point, moving coordinate point, convergent-divergent coordinate points, Mobile Termination point, convergent-divergent terminating point etc., can be the convenience for to user's operating mouse the time and habitually consider, the user is pressed the mouse position can be considered the initial coordinate point, to can be considered be Mobile Termination point or convergent-divergent terminating point in the position when pressing mouse and unclamping mouse after moving, and pressing after the mouse, unclamping that some points between the mouse are considered as is moving coordinate point or convergent-divergent coordinate points.According to actual needs, also can be to adopt other modes to realize movement, the beginning of convergent-divergent and the identification of end are judged, for example, mobile graphics instruction or convergent-divergent graphics command, can be that option by direct movement or convergent-divergent provides, rather than judge by identification initial coordinate point, in addition, the coordinate of the initial point when movement or convergent-divergent, can be to determine by manual input, the Mobile Termination point, the convergent-divergent terminating point also can be to determine etc. by the mode of manual input, as long as the concrete processing procedure to graph data is to finish by creating corresponding worker thread, does not repeat them here.
According to above-mentioned figure is moved, the judgement of convergent-divergent etc., can to be the initial coordinate point clicked according to the user determine the end with respect to the particular location of empty frame is that figure is moved or carries out convergent-divergent, when initial coordinate points during at the first area of empty frame coordinate range, then be judged to be is to receive the mobile graphics instruction, when the second area coordinate range of initial coordinate points at empty frame, then be judged to be is to receive the convergent-divergent graphics command, this first area coordinate range and second area coordinate range be free setting according to actual needs, for example, this first area coordinate range can be the set that forms except other all coordinate points on four borders of empty frame in the empty frame region, it also can be the set that forms except other all coordinate points of four apex coordinates of empty frame in the empty frame region, it perhaps also can be the setting of carrying out other, this second area coordinate range can be empty frame four set that the border forms, also can be four set that apex coordinate forms of empty frame, perhaps also can be the setting of carrying out other.In addition, second area coordinate range and first area coordinate range are less than occuring simultaneously, to avoid the chaotic situation of operation when the user clicks intersection point.
Above-described embodiment of the present invention does not consist of the restriction to protection domain of the present invention.Any modification of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within the claim protection domain of the present invention.

Claims (10)

1. the method for a graphing is characterized in that, comprises step:
Receive and create graphics command;
Be received in the graph data of the figure that creates in the selected effective coverage;
Dimension of picture size according to described figure creates empty frame, and should show at screen by the void frame;
Set up the figure building work thread of processing for to described graph data, the figure that creates after the described figure building work thread process is shown in described empty frame, and finish described figure building work thread;
After finishing described figure building work thread, be hidden state with the status modifier of described empty frame.
2. the method for graphing according to claim 1 is characterized in that, also comprises step:
The initial coordinate point that the identification mouse is clicked, and judge this initial coordinate point whether in the first area coordinate range of the empty frame of figure, described first area coordinate range comprises in the empty frame region in set that other all coordinate points except four borders of empty frame form or the empty frame region set that other all coordinate points except four apex coordinates of empty frame form;
If, judge to receive the mobile graphics instruction that this figure is moved, record the position coordinates of described initial coordinate point;
The Mobile Termination point of identification mouse moves to described Mobile Termination point region with the empty frame of described figure, and the Mobile Termination void frame that will move to behind the described Mobile Termination point region shows at screen;
Create the figure mobile working thread of processing for to the graph data of mobile graphics process, the figure after the described figure mobile working thread process is shown in the empty frame of described Mobile Termination, and finish described figure mobile working thread.
3. the method for graphing according to claim 2 is characterized in that, after the position coordinates of the described initial coordinate point of record, identify before the Mobile Termination point of mouse, also comprises step:
Moving coordinate point in the identification mouse moving process moves to described moving coordinate point region with the empty frame of described figure, and will move to that empty frame shows at screen in the movement behind the described moving coordinate point zone.
4. the method for graphing according to claim 1 is characterized in that:
The initial coordinate point that the identification mouse is clicked, and judge this initial coordinate point whether in the second area coordinate range of the empty frame of figure, described second area coordinate range is the set that forms of four borders of empty frame region or four set that apex coordinate forms of empty frame;
If, judge to receive the convergent-divergent graphics command that this figure is carried out convergent-divergent, record the position coordinates of described initial coordinate point;
The convergent-divergent terminating point of identification mouse according to the empty frame of described initial coordinate point, the described figure of convergent-divergent terminating point convergent-divergent, and stops empty frame with the convergent-divergent behind the convergent-divergent and shows at screen;
Create the pantography worker thread of graph data being processed in convergent-divergent figure process, the figure after described pantography worker thread is processed shows in described convergent-divergent stops empty frame, and finishes described pantography worker thread.
5. the method for graphing according to claim 4 is characterized in that, after the position coordinates of the described initial coordinate point of record, identify before the convergent-divergent terminating point of mouse, also comprises step:
Convergent-divergent coordinate points in the identification mouse moving process according to the empty frame of described initial coordinate point, the described figure of convergent-divergent coordinate points convergent-divergent, and shows empty frame in the convergent-divergent behind the convergent-divergent at screen.
6. it is characterized in that according to claim 2 or the method for 3 described graphings:
After the position coordinates of the described initial coordinate point of record, identify before the Mobile Termination point of mouse, also comprise step: be show state with the status modifier of the empty frame of this figure;
After finishing described figure mobile working thread, also comprise step: be hidden state with the status modifier of the empty frame of described Mobile Termination.
7. it is characterized in that according to claim 4 or the method for 5 described graphings:
After the position coordinates of the described initial coordinate point of record, identify before the convergent-divergent terminating point of mouse, also comprise step: be show state with the status modifier of the empty frame of this figure;
After finishing described pantography worker thread, also comprise step: the status modifier that described convergent-divergent is stopped empty frame is hidden state.
8. the device of a graphing is characterized in that, comprises the command reception module, graph data receiver module, empty frame processing module, the worker thread module that are connected successively;
Described graph data receiver module is received in the graph data of the figure that creates in the effective coverage when described command reception module receives the establishment graphics command;
The dimension of picture size that described empty frame processing module is determined according to described graph data is set up empty frame, and should show at screen by the void frame;
Described worker thread module is used for creating the figure building work thread for described graph data being processed to create figure, and the figure that the image creation worker thread is created shows in described empty frame, and the power cut-off thread;
Described empty frame processing module, also at figure that described worker thread module will create or handle well after described empty frame or the empty frame of Mobile Termination or convergent-divergent stop showing in the empty frame, the status modifier that described empty frame or the empty frame of described Mobile Termination or described convergent-divergent is stopped empty frame is hidden state.
9. the device of graphing according to claim 8 is characterized in that, described empty frame processing module also is connected with described command reception module:
Described empty frame processing module, also be used for when described command reception module receives the mobile graphics instruction, the empty frame of figure is moved to the Mobile Termination point region of identifying, and the empty frame of Mobile Termination that will move to Mobile Termination point region shows at screen; Described worker thread module also is used for creating the figure mobile working thread of processing for the graph data of moving process, and the image after the figure mobile working thread process is shown in the empty frame of described Mobile Termination;
And/or
Described empty frame processing module also is used for according to initial coordinate point, convergent-divergent terminating point the empty frame of figure being carried out convergent-divergent when described command reception module receives the convergent-divergent graphics command, and the convergent-divergent behind the convergent-divergent is stopped empty frame shows at screen; Described worker thread module also is used for creating the pantography worker thread of processing for the graph data of convergent-divergent process, and the image after the processing of pantography worker thread is shown in described convergent-divergent stops empty frame.
10. the device of graphing according to claim 9 is characterized in that:
Described empty frame processing module, also be used for when described command reception module receives the mobile graphics instruction, the empty frame of figure is moved to the moving coordinate point region of identifying, and will move to that empty frame shows at screen in the movement of moving coordinate point region;
And/or
Described empty frame processing module also is used for according to initial coordinate point, convergent-divergent coordinate points the empty frame of figure being carried out convergent-divergent, and empty frame in the convergent-divergent behind the convergent-divergent being shown at screen when described command reception module receives the convergent-divergent graphics command.
CN 201010138215 2010-03-29 2010-03-29 Method and device for efficiently drawing graphics Expired - Fee Related CN101833744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010138215 CN101833744B (en) 2010-03-29 2010-03-29 Method and device for efficiently drawing graphics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010138215 CN101833744B (en) 2010-03-29 2010-03-29 Method and device for efficiently drawing graphics

Publications (2)

Publication Number Publication Date
CN101833744A CN101833744A (en) 2010-09-15
CN101833744B true CN101833744B (en) 2013-01-23

Family

ID=42717805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010138215 Expired - Fee Related CN101833744B (en) 2010-03-29 2010-03-29 Method and device for efficiently drawing graphics

Country Status (1)

Country Link
CN (1) CN101833744B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104281308A (en) * 2013-07-11 2015-01-14 深圳富泰宏精密工业有限公司 Touch electronic device and drawing method thereof
CN103491147B (en) * 2013-09-11 2017-02-15 天脉聚源(北京)传媒科技有限公司 Method and system for transmitting graphs
CN106802963A (en) * 2015-11-26 2017-06-06 北京华大九天软件有限公司 A kind of method of the arbitrarily angled figure that Fast Drawing is fixed
CN110956024A (en) * 2018-09-07 2020-04-03 珠海横琴盛达兆业科技投资有限公司 Method for automatically drawing custom graph in PDF (Portable document Format) based on WEB
CN109508229A (en) * 2018-09-19 2019-03-22 安徽慧视金瞳科技有限公司 A kind of matching process that multiple spot is drawn simultaneously
CN112270153B (en) * 2020-12-15 2021-04-16 鹏城实验室 Waveform acquisition method and device, test equipment and computer readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003076546A (en) * 2001-09-03 2003-03-14 Minoru Kano Method for plotting graphic, method for plotting flow chart and method for generating computer program from flow chart
US7086013B2 (en) * 2002-03-22 2006-08-01 Xerox Corporation Method and system for overloading loop selection commands in a system for selecting and arranging visible material in document images
JP2006277056A (en) * 2005-03-28 2006-10-12 Brother Ind Ltd Information processor and program
JP2007310577A (en) * 2006-05-17 2007-11-29 Toshiba Corp Device, method, and program for extracting drawing-data

Also Published As

Publication number Publication date
CN101833744A (en) 2010-09-15

Similar Documents

Publication Publication Date Title
CN101833744B (en) Method and device for efficiently drawing graphics
CN106527892B (en) Screen capturing method and system of electronic equipment
JP4301842B2 (en) How to use the user interface
US9529463B1 (en) Method and device for reducing latency for rendering and displaying stylus strokes
CN105807999B (en) Method for inputting handwritten information to display device through handwriting device
CN102810043A (en) Method, system and information terminal for displaying weather information of mobile terminal
CN106681586A (en) Placement position adjusting method and device
CN102262528A (en) Instant messaging client and method for dragging on embedded webpage thereof
CN104301788A (en) Method and device for providing video interaction
CN110634171A (en) Device and method for drawing map
CN107870795B (en) Method and device for displaying electronic map
CN102693089A (en) Method for achieving amplifying function by screenshot and client side
CN102541358A (en) 3D visual angle converting system and method for sliding click response
CN112416332B (en) Graphical programming interface display method, device, equipment and medium
CN110347318A (en) A kind of method, apparatus, equipment and storage medium that person's handwriting is drawn
CN104049846A (en) Information processing method and electronic device
CN101984402A (en) Image acquisition and compression method and related device
US8887073B2 (en) Reshaping interfaces using content-preserving warps
CN102073376B (en) Portable wireless operation system and method
DE102016204692A1 (en) Control of multiple selection on touch-sensitive surfaces
CN102740025B (en) The processing method of menu color of screen and device
CN107391125A (en) It is used for the user-interface design scheme of man-machine interaction under VxWorks system
CN107329654A (en) Draw method, device and the computer-readable recording medium of element floating layer
CN104216711B (en) The rendering intent and device of control
CN106648634A (en) Screen shot method and screen shot device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Kezhu road high tech Industrial Development Zone, Guangzhou city of Guangdong Province, No. 233 510670

Patentee after: VTRON GROUP Co.,Ltd.

Address before: 510663 Guangzhou province high tech Industrial Development Zone, Guangdong, Cai road, No. 6, No.

Patentee before: VTRON TECHNOLOGIES Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130123