CN101408989B - Method and apparatus for filling primitive base on graphics set split joint - Google Patents

Method and apparatus for filling primitive base on graphics set split joint Download PDF

Info

Publication number
CN101408989B
CN101408989B CN2008102243375A CN200810224337A CN101408989B CN 101408989 B CN101408989 B CN 101408989B CN 2008102243375 A CN2008102243375 A CN 2008102243375A CN 200810224337 A CN200810224337 A CN 200810224337A CN 101408989 B CN101408989 B CN 101408989B
Authority
CN
China
Prior art keywords
sub
unit
drawing unit
collective drawing
target pages
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
CN2008102243375A
Other languages
Chinese (zh)
Other versions
CN101408989A (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.)
New Founder Holdings Development Co ltd
Peking University
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University, Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University
Priority to CN2008102243375A priority Critical patent/CN101408989B/en
Publication of CN101408989A publication Critical patent/CN101408989A/en
Application granted granted Critical
Publication of CN101408989B publication Critical patent/CN101408989B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

The invention discloses a graphics primitive padding method based on collective drawing splicing and a method thereof, so as to avoid the problem that system memory resource can be wasted by collective drawing unit lattice data generated and stored ineffectively. According to size information of the collective drawing unit and objective page, and ensuring that the size of the collective drawing unit is larger than that of the objective page, each intersection area of the collective drawing unit and the objective page is ensured when the collective drawing unit is spread to the objective page in sequence; a sub collective drawing unit containing the intersection area is divided from the collective drawing unit respectively according to each intersection area which is ensured; rasterizing treatment is carried out on the each divided sub collective drawing unit; based on lattice data of each sub collective drawing unit which is processed, the padding of primitives in the objective page is realized.

Description

Pel fill method and device based on the atlas splicing
Technical field
The present invention relates to the graph and image processing field, relate in particular to a kind of pel fill method and device based on the atlas splicing.
Background technology
The special color space same clan is the color space same clan that obtains after atlas (patterns), color table (color mapping), special look (Separations), high-fidelity (high-fidelity) or the multitone color characteristics such as (multi-tone color) of adding on the basic color space basis as repetition and gradual change.
In the same clan of special color space, comprise atlas (Pattern) color space family, index (Index) color space family, special look (Separation) color space family, color space families such as many device channels (DeviceN) color space family.When wherein the characteristics of Pattern color space family are the drafting operation of pel in carrying out target pages (line segment, character outline, figure, bitmap etc.), can splice the mode of (Tiling pattern) or atlas gradual change (Shading pattern) with atlas rather than fill the determined target of this pel fill area with solid color.
Wherein, the atlas splicing is on the level and vertical direction of the coordinate system at pattern cell place, respectively same atlas unit (pattern cell) duplicated with the fixed intervals distance, in the target pages coordinate system, show as same atlas unit is offset according to certain rule and duplicate, thereby realize filling the target area.
Please refer to accompanying drawing 1, the page is resolved written-out program and is used the process of atlas connecting method filling pel as follows:
Front end explanation module 101 reads page description file, obtain the relevant information of target pages, when running into the operational character of indication usefulness atlas connecting method filling pel, 104 couples of patterncell of atlas unit information parsing module carry out dissection process, obtain the relevant information of pattern cell, lower left corner location parameter (x as this pattern cell border of mark, y), width parameter (w), height parameter (h), this pattern cell of mark in the pattern coordinate system level or the vertical coordinate axle on the step value of single translation distance, the current transition matrix of the pattern coordinate system at pattern cell place information such as (CTM, Current Transformation Matrix).After this 105 couples of pattern cell of dot array data generation module carry out the rasterisation dot matrix and handle, and obtain pattern cell dot array data, and relevant information and the pattern cell dot array data of above-mentioned pattern cell deposited in the Pattern manager;
After this, primitive information parsing module 102 reads the relevant information of pel, determines the target fill area according to primitive boundary;
At last, when carrying out the padding of pel, fill functional module 103 and read pattern cell dot array data in the Pattern manager and the relevant information of pattern cell thereof, carry out the tiling operation of target fill area.Wherein pattern cell tiling operation is meant that one by one the expection of determining pattern cell dot array data spreads into the intersection area of zone with the target fill area, and partly copies to process in this intersection area in the target fill area being in pattern cell dot array data in this intersection area.
Accompanying drawing 2a is to use the atlas connecting method to fill an example of target fill area:
Rectangle shadow region among the figure is a target pages, and diamond-shaped area wherein is that X, Y coordinate axis are respectively level and the vertical direction in the pattern coordinate system by the determined target of pel fill area.The zone at key patterncell place is the relevant information according to pattern cell, and the reference area that the pattern cell that determines tiles.
In order to fill whole target fill area, need to determine that pattern cell dot array data lower left corner coordinate with key pattern cell in the pattern coordinate system is a benchmark, be mapped to the expected areas of target pages behind the additional one by one in the horizontal and vertical directions step value.Pattern cell1 among Fig. 2 a is that pattern cell dot array data is a benchmark with key pattern cell lower left corner coordinate, expection behind the additional in the horizontal direction step value dX is spread into the zone, in like manner, pattern cell2 is the additional in vertical direction step value dY of pattern cell dot array data, and pattern cell3 is that the expection of pattern cell dot array data behind an additional step value dY of vertical direction and an additional in the horizontal direction step value dX spread into the zone.Determine the intersection area of keypattern cell, pattern celll~pattern cell3 and target fill area respectively, and handle is in pattern cell dot array data in the intersection area and partly copies in the intersection area in the target fill area.By above operation, just finished the purpose of using same pattern cell dot array data that the target fill area is filled.
That part of dot array data that really is used for the render target fill area in the pattern cell dot array data among Fig. 2 a in the position of whole pattern cell dot array datas shown in the dash area among Fig. 2 b, be that the dot array data part shown in the shadow region among Fig. 2 b is only effectively for the render target fill area, it then is invalid that the dot array data part shown in outside the shadow region is operated for the drafting of target fill area.
From above-mentioned drawing process as seen, for the render target fill area, in the pattern cell dot array data that after the rasterisation dot matrix is handled, obtains, only some pattern cell dot array data is effective for the render target fill area, therefore when the shared ratio of dot array data invalid for the render target fill area is excessive, to cause when pattern cell being carried out the processing of rasterisation dot matrix, generate a large amount of invalid pattern cell dot array datas, thereby cause being used to store the storage resources waste of rasterisation dot array data.In addition, when higher the or described borderline region of pattern cell dot array data itself is big when the resolution of equipment, because generating whole pattern cell dot array datas in rasterization process will take a large amount of memory sources, also can cause system to generate the failure of pattern cell dot array data because of applying for that enough memory sources cause.
Summary of the invention
The embodiment of the invention provides a kind of pel fill method based on atlas splicing, when avoiding filling pel in the target pages based on same atlas unit dot array data, generates and store the problem that invalid atlas unit dot array data can be wasted system's storage resources.
Accordingly, the embodiment of the invention has also proposed a kind of pel filling device based on the atlas splicing.
A kind of pel fill method based on the atlas splicing comprises:
According to the dimension information of atlas unit and target pages, the size of determining the atlas unit is during greater than the size of target pages, 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; And
According to each intersection area of determining, in described atlas unit, be partitioned into the sub collective drawing unit that comprises intersection area respectively;
Respectively each sub collective drawing unit that is partitioned into is carried out the dot matrix processing;
Based on the dot array data of each sub collective drawing unit after the dot matrix processing, realize filling to pel in the described target pages.
A kind of pel filling device based on the atlas splicing comprises:
First determining unit 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 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, 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;
The dot matrix processing unit, each sub collective drawing unit that is used for respectively first cutting unit being partitioned into is carried out the dot matrix processing;
The pel filler cells is used for the dot array data of each sub collective drawing unit that processing obtains based on dot matrix processing unit dot matrix, realizes the filling to pel in the described target pages.
The embodiment of the invention is by being partitioned into sub collective drawing unit from the atlas unit, the width of sub collective drawing unit and wherein highly all less than the width of atlas unit and height, and sub collective drawing unit is carried out having comprised in the dot array data in the resulting sub collective drawing unit of dot matrix processing for filling the effective dot array data in target fill area, reduced required amount of ram in the dot matrix process, and reduced and generate the memory source waste that invalid dot array data causes.
Description of drawings
Fig. 1 is that the page is resolved the process synoptic diagram that written-out program uses atlas connecting method filling pel in the prior art;
Fig. 2 a is the synoptic diagram that uses pattern cell dot array data that target pages is filled in the prior art;
Fig. 2 b is the required effective pattern cell dot array data synoptic diagram partly of pel of filling in the target pages;
Fig. 3 is based on the process flow diagram of the pel fill method of atlas splicing in the embodiment of the invention;
Fig. 4 a is divided into pattern cell for the method for using the present invention to propose the synoptic diagram of a plurality of sub-pattern cell;
Fig. 4 b is on Fig. 4 a basis, the position view of a plurality of sub-pattern cell in former pattern cell that marks off;
Fig. 5 a is under the first tiling type cases, merges the process synoptic diagram of sub-Pattern cell;
Fig. 5 b is on Fig. 5 a basis, the position view of zone 1,2,4 in pattern cell;
Fig. 6 a is divided into the synoptic diagram of 4 sub-pattern cell for pattern cell;
Fig. 6 b is on Fig. 6 a basis, the position view of 4 sub-pattern cell in former pattern cell;
Fig. 7 a is under the second tiling type cases, the synoptic diagram of each intersection area that exists with target pages respectively when determining atlas unit expection the shop being gone into to target pages successively;
Fig. 7 b is on Fig. 7 a basis, the position view of each sub-pattern cell in pattern cell;
Fig. 7 c is on Fig. 7 b basis, the common rectangular zone synoptic diagram of all sub-pattern cell in pattern cell;
Fig. 7 d is the synoptic diagram after the common rectangular zone among Fig. 7 c is cut apart;
Fig. 7 e is on Fig. 7 b basis, the overlapping region synoptic diagram of each sub-pattern cell;
Fig. 7 f is on Fig. 7 e basis, the view of each sub-pattern cell after information is cut out;
Fig. 8 a is the synoptic diagram of a black atlas unit pattern cell;
The effect synoptic diagram of Fig. 8 b for expect tiling based on the pattern cell dot array data shown in Fig. 8 a;
Fig. 8 c, Fig. 8 d are on Fig. 8 b basis, the synoptic diagram of each sub-pattern cell;
Fig. 8 e, Fig. 8 f, Fig. 8 g and Fig. 8 h are on Fig. 8 b basis, and the sub-patterncell that has the overlapping region is handled, and are not contained the synoptic diagram of the sub-pattern cell of overlapping region, and the synoptic diagram cut apart of antithetical phrase pattern cell;
Fig. 9 is based on the synoptic diagram of the pel filling device of atlas splicing in the embodiment of the invention;
Figure 10 is the synoptic diagram of overlapping region processing unit in the embodiment of the invention.
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.

Claims (11)

1. the pel fill method based on the atlas splicing is characterized in that, comprising:
According to the dimension information of atlas unit and target pages, the size of determining the atlas unit is during greater than the size of target pages, 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; And
According to each intersection area of determining, in described atlas unit, be partitioned into the sub collective drawing unit that comprises intersection area respectively;
Respectively each sub collective drawing unit that is partitioned into is carried out the dot matrix processing;
Based on the dot array data of each sub collective drawing unit after the dot matrix processing, the pel in the described target pages is filled.
2. the method for claim 1 is characterized in that, also is included in each sub collective drawing unit that is partitioned into when having the overlapping region, and 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.
3. the method for claim 1 is characterized in that, also comprises:
According to the width and the elevation information of each sub collective drawing unit that is 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; And
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.
4. the method for claim 1 is characterized in that, each intersection area that exists with target pages respectively when determining described atlas unit expection the shop being gone into to target pages successively specifically comprises:
In the coordinate system at target pages place,, determine the reference position when target pages is gone in expection shop, described atlas unit according to lower left corner location parameter, width parameter, the height parameter of described atlas unit;
From described reference position, carrying out the translation of step value on the horizontal direction on the horizontal direction of the coordinate system at place, atlas unit handles, and the translation of carrying out step value on the vertical direction on the vertical direction of the coordinate system at place, atlas unit handles, 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.
5. method as claimed in claim 2 is characterized in that, 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, specifically comprises:
In described atlas unit, determine to exist the common rectangular zone at least two sub collective drawing unit places of overlapping region;
Judge the height in described common rectangular zone and width whether all less than the width and the height of target pages, if, with described common rectangular zone as the sub collective drawing unit that is partitioned into again; Otherwise,
According to the width and the elevation information of target pages, described common rectangular zone is divided into width and highly all less than the sub-rectangular area of target pages width and height, each sub-rectangular area that division is obtained is respectively as the sub collective drawing unit that is partitioned into again.
6. method as claimed in claim 2 is characterized in that, the intersection area that has the overlapping region that is partitioned into is processed into the intersection area that does not have the overlapping region, specifically comprises:
To exist a sub collective drawing unit at least two sub collective drawing unit of overlapping region to remain unchanged, and the described overlapping region in other sub collective drawing unit be set to cut out areas respectively.
7. the pel filling device based on the atlas splicing is characterized in that, comprising:
First determining unit 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 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, 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;
The dot matrix processing unit, each sub collective drawing unit that is used for respectively first cutting unit being partitioned into is carried out the dot matrix processing;
The pel filler cells, 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.
8. device as claimed in claim 7 is characterized in that, 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, is processed into the sub collective drawing unit that does not have the overlapping region with the sub collective drawing unit that has the overlapping region that is partitioned into.
9. device as claimed in claim 7 is characterized in that, also comprises:
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.
10. device as claimed in claim 8 is characterized in that, described overlapping region processing unit specifically comprises:
Subelement 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 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, 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.
11. device as claimed in claim 8, it is characterized in that, described overlapping region processing unit remains 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.
CN2008102243375A 2008-10-17 2008-10-17 Method and apparatus for filling primitive base on graphics set split joint Expired - Fee Related CN101408989B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008102243375A CN101408989B (en) 2008-10-17 2008-10-17 Method and apparatus for filling primitive base on graphics set split joint

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008102243375A CN101408989B (en) 2008-10-17 2008-10-17 Method and apparatus for filling primitive base on graphics set split joint

Publications (2)

Publication Number Publication Date
CN101408989A CN101408989A (en) 2009-04-15
CN101408989B true CN101408989B (en) 2011-08-24

Family

ID=40571990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008102243375A Expired - Fee Related CN101408989B (en) 2008-10-17 2008-10-17 Method and apparatus for filling primitive base on graphics set split joint

Country Status (1)

Country Link
CN (1) CN101408989B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186909A (en) * 2011-12-31 2013-07-03 北大方正集团有限公司 Method and device for improving rasterization speed of transparent image

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104423900B (en) * 2013-08-27 2018-04-27 北大方正集团有限公司 Image printing method and printer
CN106649230B (en) * 2016-09-30 2019-07-26 株洲中车时代电气股份有限公司 A kind of figure automatic generation method of train network control system logic chart
CN108346170B (en) * 2017-01-22 2022-08-12 腾讯科技(深圳)有限公司 Gap filling method and device for electronic map
CN110097147B (en) * 2018-01-29 2020-07-14 北大方正集团有限公司 Method and system for setting primitive drawing attribute, computer equipment and storage medium
CN109241304B (en) * 2018-08-16 2021-12-03 广州视源电子科技股份有限公司 Picture processing method, device and equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186909A (en) * 2011-12-31 2013-07-03 北大方正集团有限公司 Method and device for improving rasterization speed of transparent image
CN103186909B (en) * 2011-12-31 2015-06-17 北大方正集团有限公司 Method and device for improving rasterization speed of transparent image

Also Published As

Publication number Publication date
CN101408989A (en) 2009-04-15

Similar Documents

Publication Publication Date Title
CN101408989B (en) Method and apparatus for filling primitive base on graphics set split joint
US10657681B2 (en) Method of and apparatus for processing graphics
EP0924653B1 (en) Blending graphical objects using planar maps
US7154503B2 (en) Methods and systems for brush composition
JP4624502B2 (en) Vector map flattening and trapping
US20080055623A1 (en) Techniques for image segment accumulation in document rendering
CN100520703C (en) Grating processing method and device
JP2008165760A (en) Method and apparatus for processing graphics
CN101916453A (en) Method of and apparatus for processing computer graphics
US8723884B2 (en) Scan converting a set of vector edges to a set of pixel aligned edges
US6147688A (en) Method and apparatus for defining and selectively repeating unit image cells
GB2444863A (en) Rendering tile-based graphics using primitive lists
CN100552618C (en) A kind of sectional hybrid packaging raster and device
CN101783022B (en) Method for integrally symbolizing road net based on painter algorithm
CN113942230B (en) 3D printing control system for double-laser segmentation and segmentation method thereof
CN104572610A (en) Method and device for automatic imposition
AU2007203061A1 (en) Efficient banded hybrid rendering
US7333238B2 (en) Rendering a printing device pixel map
CN112313933B (en) System and method for storing related image information in a print job file
CN103186512B (en) A kind of grating processing method of transparent page and device
CN110097147B (en) Method and system for setting primitive drawing attribute, computer equipment and storage medium
JPH0816801A (en) Picture processing method and picture processor
CN103377481B (en) Method and device for reusing table
JPH0822548A (en) Method and device for graphic processing
JP4129934B2 (en) Image generation 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
TR01 Transfer of patent right

Effective date of registration: 20220623

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: Peking University

Patentee after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871, Beijing, Haidian District Cheng Fu Road 298, founder building, 9 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: Peking University

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

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

Granted publication date: 20110824

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