Embodiment
Be described in detail below in conjunction with the main realization principle and the concrete performance thereof of each accompanying drawing the embodiment of the invention.
Please refer to Fig. 3, this figure is the principle flow chart based on the pel fill method of atlas splicing that the present invention proposes, and its main implementation procedure is as follows:
In step 10, dimension information according to atlas unit and target pages, here dimension information is finger widths or elevation information, and the width of determining the atlas unit carry out step 20 greater than the height of the width of target pages or the atlas unit height greater than target pages;
In step 20, each intersection area that exists with target pages respectively when determining described atlas unit expection the shop being gone into to target pages successively carry out step 30;
In step 30, each intersection area according to step 20 is determined is partitioned into the sub collective drawing unit that comprises intersection area respectively in described atlas unit;
Step 40 is carried out the dot matrix processing to the sub collective drawing unit that obtains in the step 30 respectively;
Step 50 by the dot array data based on resulting each sub collective drawing unit of step 40, realizes the filling to pel in the described target pages.
Embodiment one: please refer to Fig. 4 a, this figure be to use method that the present invention proposes with pattern cell be divided into a plurality of width, highly all less than the synoptic diagram of the sub-pattern cell of target pages width, height, rectangle shadow region wherein is a target pages, and the diamond-shaped area in the target pages is by the determined target of rhombus pel fill area.
Explain the relevant information of the pattern cell obtained according to front end, can determine the width of the determined rectangular area of pattern cell and, so definitely need carry out dividing processing patterncell highly all greater than the width and the height of target pages.
Comprise the desired location the when information of lower left corner location parameter, width parameter, height parameter on this pattern cell border of mark and current transition matrix information determine that pattern cell dot array data is spread into target pages again in the relevant information according to pattern cell, shown in key pattern cell.In order to realize filling to target pages, need be on the level of pattern cell coordinate system and vertical direction be that benchmark respectively carries out a translation with key pattern cell lower left corner coordinate, the translation spacing distance is respectively step value dX, the dY on level and the vertical direction, and the situation after the translation of expection is shown in the pattern cell1 among Fig. 4 a, pattern cell2, pattern cell3.
The intersection area into regional key pattern cell, pattern cell1, pattern cell2, pattern cell3 and target pages is spread in the expection of definite pattern cell on this basis, be respectively shadow region 0,1,2,3, be 4 sub-patterncell that will in pattern cell, be partitioned into respectively thereby determine shadow region 0,1,2,3.
Need to prove that pattern cell is not rasterized into dot array data in aforesaid operations, the relevant information of sub-patterncell, as the parameter information that identifies sub-pattern cell lower left corner position coordinates, width, height can obtain according to relevant information and the target pages information via numerical evaluation of pattern cell.Sub-pattern cell has coordinate transition matrix CTM peaceful the move one's steps long value identical with pattern cell.
Through the position of a plurality of sub-pattern cell in former pattern cell that above-mentioned processing obtains shown in the shadow region among Fig. 4 b, relevant information according to above-mentioned sub-pattern cell, the dot array data of the sub-pattern cell that generates after follow-up rasterization process is compared with the dot array data that generates according to the pattern cell information before cutting apart, effectively reduced for the quantity of filling the invalid dot array data in target fill area, thereby the dot array data quantity of having lacked the required generation of rasterization process, the required amount of ram that expends when therefore having reduced rasterization process generation dot array data has reduced the failure probability when generating dot array data.
According to above-mentioned expection after the pattern cell translation is spread into zone and the intersection area of the target pages method as sub-pattern cell, may there be overlapping situation in each that the obtains position of sub-pattern cell in pattern cell, therefore need handle there being overlapping sub collective drawing unit, not comprise the dot array data that does not comprise repetition in all sub-pattern cell dot array datas of repeat region, follow-up generation with all the sub-pattern cell after guaranteeing to handle.
Below introduce the process that the sub-pattern cell that has the overlapping region is handled, purpose is to avoid may comprising identical dot matrix data conditions in the dot array data of a plurality of sub-pattern cell that obtains after follow-up rasterisation dot matrix operation.
The direction of displacement during according to pattern cell dot array data tiling target fill area can be divided into following 2 classes with the mode of patterncell dot array data tiling target fill area:
The first tiling type: during pattern cell dot array data tiling target fill area, the direction (being the level and vertical direction of pattern coordinate system) of duplicating displacement is identical with the level or the vertical direction of target pages;
The second tiling type: during pattern cell dot array data tiling target fill area, the direction (being the level and vertical direction of pattern coordinate system) of duplicating displacement is different with the level or the vertical direction of target pages.
Among the sub-pattern cell that method obtains in using embodiment one, if exist the rectangular area, border of the first sub-patterncell to comprise the situation of rectangular area, the second sub-pattern cell border fully, the first sub-pattern cell and the second sub-pattern cell can be merged into the first sub-pattern cell, with the first sub-pattern cell as the sub-pattern cell after handling, specifically shown in embodiment two.This method can be applicable to the above-mentioned first tiling type and the second tiling type simultaneously.
Embodiment two: please refer to Fig. 5 a, this figure is under the first tiling type cases, generate the process synoptic diagram of sub-Pattern cell, the coordinate axis among Fig. 5 a is the direction that pattern cell dot array data duplicates displacement, and is identical with the level and the vertical direction of target pages.
Key patterncell is the desired location of pattern cell dot array data when spreading into target pages without translation, and the shaded rectangle zone among the figure is a target pages.In order to realize the filling to target pages, patterncell needs in vertical direction with step value dY translation 3 times, and specific operation process is identical with last embodiment.Pattern cell after basis atlas unit key pattern cell and the translation is shadow region 1,2,3,4 with the zone that target pages intersects respectively, the zone 1,2,4 in the position among the pattern cell shown in Fig. 5 b, zone 1,4 is all in the scope in zone 2, it is the subclass in zone 2, zone 2 and zone 3 are equal to, and therefore only need border of generation to get final product as the sub-pattern cell in zone 2.
Do not exist for the rectangular area, border in pattern cell to comprise situation mutually, but have the sub-pattern cell in overlapped zone,, use the method that proposes among embodiment three, the embodiment four to handle respectively according to different tiling types:
Embodiment three: please refer to Fig. 6 a, pattern cell is divided into 4 sub-patterncell, promptly behind the shadow region among the figure 1,2,3,4, sub-pattern cell in the position among the pattern cell shown in the shadow region among Fig. 6 b, wherein shadow region 1,2 is separate, and do not comprise mutually, but still shadow region 1,2 can be merged into a sub-pattern cell.This sub-pattern cell is the union of shadow region 1,2, highly is the height of target pages, and width is the width of shadow region 1,2.Said method is promoted as can be known, when the direction of carrying out translation when pattern cell spreads into target pages is consistent with the level in space, target pages place and vertical direction (the first tiling type), the union of sub-pattern cell that all can be existed overlapped zone in pattern cell is as the sub-pattern cell after handling.
Embodiment four: please refer to Fig. 7 a, this figure is under the second tiling type cases, the process synoptic diagram that sub-pattern cell with overlapping region is handled, shaded rectangle is a target pages among Fig. 7 a, coordinate axis is the direction that pattern cell dot array data duplicates displacement, and is different with the level and the vertical direction of target pages.
According to embodiment one, the similar method of embodiment two-phase, expection behind pattern cell dot array data translation is successively spread into zone and the determined rectangular area of intersection area of target pages as sub-patterncell, shown in 3 dashed rectangle among Fig. 7 a, obtain 3 sub-pattern cell, be respectively sub-patterncell0, sub-pattern cell1, sub-pattern cell2, shown in the shadow region among Fig. 7 b, there is overlapped zone in the position among the pattern cell in above-mentioned sub-pattern cell.
Have two kinds of schemes to realize in the second tiling type the sub-pattern cell with overlapping region being handled, the sub-pattern cell that is generated after handling does not comprise repeat region:
Scheme one:
Determine that all have the common rectangular zone of sub-pattern cell in pattern cell of overlapping region, the union rectangular area of promptly above-mentioned sub-pattern cell is shown in the shaded rectangle among Fig. 7 c;
Width dW and the union rectangular area of height dH to the border rectangle of above-mentioned all sub-pattern cell in pattern cell according to target pages carry out dividing processing, shown in Fig. 7 d;
Rectangular area a, the b that will obtain through above-mentioned dividing processing, c, d are as the sub-pattern cell after handling.
Scheme two:
Determine to have the cutting information of each sub-pattern cell of overlapping region respectively, to guarantee in having the sub-pattern cell of same overlapping region, to have only to keep among the sub-pattern cell this overlapping region.
The concrete grammar of determining each sub-pattern cell cutting information is as follows:
Determine that each sub-pattern cell and other sub-pattern cell have the quantity that common factor overlaps the zone, overlap the quantity in zone with the common factor of other sub-pattern cell according to each sub-pattern cell, according to order from less to more, all sub-pattern cell are sorted, please refer to Fig. 7 b, in the present embodiment, sub-patterncell0 overlaps the zone with the common factor of other sub-pattern cell quantity is 2, pattern cell1 overlaps the zone with the common factor of other sub-pattern cell quantity is 1, pattern cell2 overlaps the zone with the common factor of other sub-pattern cell quantity is 1, and therefore the sub-pattern cell sequence that obtains after the ordering is { pattern cell1, pattern cell2, pattern cell0}.
At each the sub-pattern cell in the above-mentioned ordering, with the relevant information of the intersection area of other the sub-pattern cell behind this sub-pattern cell in this sub-pattern cell and the above-mentioned ordering cutting information as this sub-pattern cell.Please refer to Fig. 7 e, the cutting information of sub-pattern cell1 is that it overlaps zone, the i.e. information of rectangular area e respectively with the common factor of sub-pattern cell2, sub-pattern cell0.The cutting information of sub-pattern cell2 is that its common factor with sub-pattern cell0 overlaps zone, the i.e. information of rectangular area f.Sub-patterncell0 does not have cutting information, and the state of each sub-pattern cell after information is cut out is shown in Fig. 7 f.
In the dot array data that obtains after rasterization process, the dot array data of each pixel comprises two parts content: first is the color content data, uses 8bit or this color of pixel information of 24bit data description; Second portion is mask (Mask) data, use the 1bit data to indicate and when using this pixel color information to fill target pages, whether substitute this locational original information in the target pages, if mask data is 0, then indicate and do not substitute this locational original information in the target pages, indicate with this locational original information in this color of pixel information substitution target pages on the pattern cell if mask data is 1.
Above-mentioned cutting information is used for when follow-up rasterization process generates sub-pattern cell dot array data, mask data in the dot array data of all pixels in this described zone of cutting information is changed to 0, therefore after follow-up rasterization process, all sub-pattern cell do not contain the dot array data of repetition.After Fig. 7 f has described the employing said method and has merged, the dot array data zone of mask data non-0 in the sub-pattern cell dot array data that after follow-up rasterization process, generates.
In this example, after the method antithetical phrase pattern cell of employing scheme one and scheme two handled, the sub-pattern cell of all that are generated did not comprise the pattern cell dot array data of repetition.
Below by introducing embodiment five, to pattern cell being divided into a plurality of sub-pattern cell, and using the dot array data of sub-pattern cell to carry out the target fill area and fill the process of drawing and describe:
Should draw cyan, magenta, yellow, four versions of black respectively when color page is drawn usually, simple and clear in order to describe at this, the black version of only choosing wherein describes.
Existing atlas unit pattern cell shown in Fig. 8 a, shared pixel size are 672 * 653 (width * highly).Parallelogram shadow region wherein is that mask data is the borderline region of 1 dot array data, use pattern cell to carry out the filling of target fill area, being actually and using mask data among the pattern cell is that 1 dot array data carries out the filling of target fill area.
Accompanying drawing 8b has described the expection tiling effect of pattern cell dot array data.Wherein, the light shaded areas of middle part is a target pages, and the shared pixel size of target pages is 384 * 448 (width * highly).In the present embodiment, the coordinate direction of pattern coordinate system is that translation direction and level and the vertical direction of target pages of pattern cell dot array data when spreading into target pages is inconsistent.
Step 1 is divided into experimental process pattern cell with pattern cell.The position coordinates in the target pages lower left corner shown in the 8b with reference to the accompanying drawings, highly, the tile intersection area of the Pattern cell to the page of expection situation when width information and pattern cell spread into target pages, the upper right corner of determining target pages and expection is P1, and the position coordinates of rectangular area, border in the target pages coordinate system at P1 place is [163,199,383,447] ([horizontal ordinate in the lower left corner, the ordinate in the lower left corner, the horizontal ordinate in the upper right corner, the ordinate in the upper right corner]), in like manner determine the target pages upper left corner, center section, the lower right corner, the lower left corner and expection are tiled the common factor of the patterncell borderline region to the page partly for P2~P5, the position coordinates of border rectangle in the target pages coordinate system at P2~P5 place is respectively [163,199,383,447], [0,239,181,447], [0,0,383,447], [123,0,383,198], [0,0,141,383].
According to CTM, the position coordinates of above-mentioned P1~P5 in the target pages coordinate system carried out coordinate transform, obtaining above-mentioned position coordinates corresponding in the pattern coordinate system is the position coordinates of initial point with the patterncell lower left corner in the rectangle of pattern cell border, is respectively [480,0,671,208], [160,107,575,554], [0,454,287,652], [512,454,671,652].Fig. 8 c has described sub-pattern cell P1, P2, P4, the position of P5 in rectangular area, pattern cell border, and Fig. 8 d has described the position of sub-patterncell P3 in rectangular area, pattern cell border.
Please refer to Fig. 8 c, 8d, the rectangular area of sub-pattern cell P1~P5 in rectangular area, patterncell border exists overlapped but do not have situation about comprising mutually, therefore can use two kinds of schemes among the embodiment four to handle.Be to use first kind of detailed process that scheme is handled the sub-patterncell P1~P5 with overlapping region among the embodiment four below, shown in Fig. 8 e, determine that the rectangular area of union zone in pattern cell borderline region of sub-pattern cell P1~P5 is [0,0,671,652], because the width in union zone and width and the height of height greater than target pages, therefore width D W and the height DH according to target pages divides the union zone, obtain 4 sub-pattern cell P11~P14, its rectangular area position coordinates in pattern cell borderline region is respectively [0,0,383,447], [384,0,671,447], [0,448,383,652], [384,448,671,652].
The translation step value of sub-pattern cell, CTM information and cut apart before pattern cell identical, the above-mentioned information of sub-pattern cell P11~P14 is deposited in the Pattern manager.
Below be to use second kind of process that scheme is handled the sub-patterncell P1~P5 that has the overlapping region among the embodiment four.For the ease of with adopt first kind of scheme to sub-pattern cell distinguish, here with the P1~sub-pattern cell of P5 RNTO P21~P25.P21, P22, P24, P25 have intersection area with P23 respectively, and according to the intersection area quantity order from less to more of sub-pattern cell and other sub-pattern cell, the sequence after the ordering is { P21, P22, P24, P25, P23}.
The border rectangle position coordinates of the intersection area of P21 and P23 is [160,107,223,248]; The border rectangle position coordinates of the intersection area of P22 and P23 is [480,107,575,208]; The border rectangle position coordinates of the intersection area of P24 and P23 is [160,454,287,554]; The border rectangle position coordinates of the intersection area of P25 and P23 is [512,414,575,554], thus the cutting information of P21, P22, P24, P25 be respectively [160,107,223,248], [480,107,575,208], [160,454,287,554], [512,414,575,554], P3 does not have cutting information.
In follow-up rasterisation operation, the borderline region of the dot array data of mask data non-0 has not had identical dot array data in the dot array data of the sub-pattern cell that obtains according to relevant information and the cutting information of above-mentioned sub-pattern cell among P21~P25 shown in Fig. 8 f.
And deposit the relevant information of sub-pattern cell P21~P25 and corresponding cutting information thereof in the Pattern manager.
Step 2 according to the relevant information of pattern cell manager neutron pattern cell, through rasterization process, obtains the dot array data of sub-pattern cell.
Before carrying out rasterization process, need to adjust the CTM of each sub-pattern cell, on level or vertical direction, carry out translation, make the lower left corner coordinate of each sub-pattern cell be (0,0).At this moment, relevant information according to sub-pattern cell, the required amount of ram that takies when determine generating sub-pattern cell dot array data, if the required amount of ram that takies can further be cut apart by antithetical phrase pattern cell greater than the amount of ram that system distributed when generating sub-pattern cell dot array data.
For example, the assignable amount of ram of system is 4,000,000 (M), among sub-pattern cell P11~P14 that first kind of scheme of employing obtains in step 1, the required amount of ram that takies of dot array data that generates P12, P13, P14 is all less than 4M, and when generating the dot array data of P11 the required memory headroom that takies greater than 4M.In vertical direction, P11 is divided into two sub-pattern cell of S1, S2, the position coordinates in the square boundary zone of S1, S2 is respectively [0,336,383,447], [0,0,383,335], shown in Fig. 8 g.
Among sub-pattern cell P21~P25 that second kind of scheme that the sub-pattern cell with overlapping region is handled of employing obtains in step 1, the required amount of ram that takies of dot array data that generates P21, P22, P24, P25 is all less than 4M, and when generating the dot array data of P23 the required memory headroom that takies greater than 4M.In vertical direction, P23 further is divided into two sub-pattern cell of S1, S2, the position coordinates in the square boundary zone of S1, S2 is respectively [0,304,383,447], [0,0,383,303], shown in Fig. 8 h.
Step 3: from the Pattern manager, read relevant information and the dot array data of sub-pattern cell,, use the dot array data of sub-patterncell to carry out the filling drafting operation of target fill area according to pattern cell relevant information.
Before carrying out sub-pattern cell dot array data tiling operation, determine earlier the expection of sub-pattern cell spreads into zone and target fill area whether common factor is arranged, if, then in the target fill area with the dot array data tiling of sub-pattern cell; Otherwise, do not carry out tiling operation.When group pattern cell further is divided into a plurality of sub-pattern cell, determine in all sub-pattern cell that sub-patterncell by this is divided into, whether each sub-pattern cell and target fill area have common factor, if, in the target fill area of dot array data tiling that then will this sub-pattern cell; Otherwise, do not carry out tiling operation.
In the present embodiment, when the sub-pattern cell that uses first kind of scheme that the sub-pattern cell with overlapping region is handled to generate carries out the drafting of target fill area, determine one by one whether P11~P14 and target fill area have common factor, if, then the dot array data of sub-pattern cell is spread into the target fill area, when judging whether P11 and target fill area have common factor, judge respectively whether S11, S12 and target fill area have common factor, if then the dot array data of S11 or S12 is spread into the target fill area; If above judged result is not then spread into operation for not.
When the sub-patterncell that uses second kind of scheme that the sub-pattern cell with overlapping region is handled to generate carries out the drafting of target fill area, determine one by one whether P21~P25 and target fill area have common factor, if, then the dot array data of sub-pattern cell is spread into the target fill area, when judging whether P23 and target fill area have common factor, judge respectively whether S21, S22 and target fill area have common factor, if then the dot array data of S21 or S22 is spread into the target fill area; If above judged result is not then spread into operation for not.
The method that the embodiment of the invention proposes is when drawing pel, excessive pattern cell is cut apart step by step, earlier pattern cell is divided into several sub-pattern cell, the sub-pattern cell that the committed memory amount is bigger during again to the dot matrix processing is cut apart once more.Shared memory source when effectively having reduced rasterization process and generate pattern cell dot array data by said method, solved when printing and desktop are printed and often to have caused because of the borderline region of pattern cell description is excessive, and caused the problem that can not normally generate pattern cell dot array data because of the memory source deficiency.Also save the time of duplicating invalid dot array data and consuming actual carrying out when pel is filled, thereby also accelerated the speed that pel is drawn.
Correspondingly, the embodiment of the invention also provides a kind of pel filling device based on the atlas splicing.Please refer to accompanying drawing 9, this device comprises:
First determining unit 910 is used for determining that highly whether the atlas unit at the width of target pages coordinate system or greater than the width or the height of target pages;
Second determining unit 920 is used in definite result of first determining unit when being, each intersection area that exists with target pages respectively when determining the expection of described atlas unit the shop being gone into to target pages successively;
First cutting unit 930, each intersection area that is used for determining according to second determining unit is partitioned into the sub collective drawing unit that comprises intersection area respectively in described atlas unit;
Dot matrix processing unit 940, each sub collective drawing unit that is used for respectively first cutting unit being partitioned into is carried out the dot matrix processing;
Pel filler cells 950, the dot array data that is used for each sub collective drawing unit of obtaining by the processing based on dot matrix processing unit dot matrix is realized the filling to described target pages pel.
Further, this device also comprises the overlapping region processing unit, when there is the overlapping region in each sub collective drawing unit that is used for being partitioned at first cutting unit, the sub collective drawing unit that has the overlapping region that is partitioned into is processed into the sub collective drawing unit that does not have the overlapping region; And
Judging unit is used for width and elevation information according to each sub collective drawing unit of being partitioned into, judge each sub collective drawing unit in the dot matrix processing procedure the required amount of ram that takies whether greater than pre-assigned amount of ram;
Second cutting unit, be used in the judged result of judging unit when being, required committed memory amount in the dot matrix processing procedure is cut apart once more greater than the sub collective drawing unit of pre-assigned amount of ram, each sub collective drawing unit that obtains after wherein cutting apart once more in the dot matrix processing procedure the required amount of ram that takies less than pre-assigned amount of ram.
Below provided two kinds of implementations of overlapping region processing unit:
Please refer to accompanying drawing 10, the overlapping region processing unit specifically comprises:
Subelement 101 is determined in common rectangular zone, is used in described atlas unit, determines to exist the common rectangular zone at least two sub collective drawing unit places of overlapping region;
Judgment sub-unit 102 is used to judge that the common rectangular zone determines that whether all less than the width of target pages and highly the height in the common rectangular zone that subelement is determined and width;
Cut apart subelement 103, be used in the judged result of judgment sub-unit for not the time, common rectangular zone determined that common rectangular zone that subelement is determined is divided into width and highly all less than target pages width and sub-rectangular area highly, and each sub-rectangular area that division is obtained is respectively as the sub collective drawing unit that is partitioned into again.
In addition, the overlapping region processing unit also can remain unchanged by a sub collective drawing unit at least two sub collective drawing unit that will have the overlapping region, and the described overlapping region in other sub collective drawing unit is set to cut out areas respectively, realizes that the sub collective drawing unit that has the overlapping region that will be partitioned into is processed into the sub collective drawing unit that does not have the overlapping region.
Method of the present invention is not limited to the embodiment described in the embodiment, and those skilled in the art's technical scheme according to the present invention combines with the known technology of this area and draws other embodiment, belongs to technological innovation scope of the present invention equally.