CN108096835A - The area filling method and device of a kind of map - Google Patents

The area filling method and device of a kind of map Download PDF

Info

Publication number
CN108096835A
CN108096835A CN201810076588.7A CN201810076588A CN108096835A CN 108096835 A CN108096835 A CN 108096835A CN 201810076588 A CN201810076588 A CN 201810076588A CN 108096835 A CN108096835 A CN 108096835A
Authority
CN
China
Prior art keywords
grid
coordinate
bottomright
topleft
filled
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.)
Granted
Application number
CN201810076588.7A
Other languages
Chinese (zh)
Other versions
CN108096835B (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.)
Guangzhou Xishanju Network Technology Co ltd
Zhuhai Kingsoft Digital Network Technology Co Ltd
Original Assignee
Western Hills Residence Guangzhou Shi You Network Technology Co Ltd
Zhuhai Kingsoft Online Game Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Western Hills Residence Guangzhou Shi You Network Technology Co Ltd, Zhuhai Kingsoft Online Game Technology Co Ltd filed Critical Western Hills Residence Guangzhou Shi You Network Technology Co Ltd
Priority to CN201810076588.7A priority Critical patent/CN108096835B/en
Publication of CN108096835A publication Critical patent/CN108096835A/en
Application granted granted Critical
Publication of CN108096835B publication Critical patent/CN108096835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/53Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/537Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen
    • A63F13/5378Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen for displaying an additional top view, e.g. radar screens or maps
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Optics & Photonics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present invention provides a kind of area filling methods of map, comprise the following steps:Obtain the coordinate of the grid having been filled with and run trace grid;Create minimum enclosing region;In minimum enclosing region internal labeling closed area;Closed area is filled, wherein, the grid and the coordinate of run trace grid being had been filled with described in minimum enclosing region covering.A kind of area filling device of map is additionally provided, the filling demand of enclosing the land of the map with multiple closed areas is supported, so as to improve the accuracy for filling of enclosing the land and adaptability.It is filled by minimum enclosing region and mark, is effectively improved the efficiency for filling of enclosing the land.

Description

The area filling method and device of a kind of map
Technical field
The present invention relates to field of Computer Graphics, the area filling method and device of more particularly to a kind of map.
Background technology
Plane domain filling is an important problem of field of Computer Graphics, and area filling is a kind of will specify not Regular domain interior pixels are filled with the process of fill color or pattern etc., have in CAD and image processing field Extensive use.A concrete application example of field of play is filled in as plane domain, it is known that enclosing the land filling in game bound pair should Demand is as follows:As long as player among the process enclosed the land, is not encountered by other players or oneself encounters what is passed by Track, and return in the manor of oneself, it is possible to the area under one's jurisdiction among track is become to the manor of oneself.Rules abstraction is come out It encloses the land fill method:I.e. under two-dimensional lattice coordinate, the manor of existing arbitrary shape and arbitrary run trace, run trace are given Beginning and end belong in existing manor, complete the filling of its all closed area associated to track.Here it is different It is that filling algorithm refers to Fill Color, finger filling manor of enclosing the land here, essence is the same.Field is generally common at present fills out It is mainly seed fill algorithm to fill algorithm, and basic thought is:Since being put in one of polygonal region, from inside to outside with giving Fixed color draws point until border.If border is specified with a kind of color, seed fill algorithm can individual element Ground processing is general pixel-by-pixel to be traveled through using 4 to connection, 8 to connection or scan line mode until running into border color.
It is as follows to the flow for connecting seed fill algorithm for example with 4:
A) in sub-pixel press-in stack;
If b) stack is sky, turn e);Otherwise turn c);
C) pixel is popped up, and the pixel is set to fill color;And whether judge four adjacent connected pixels of the pixel For border color or the fill color of polygon is set to, if it is not, the pixel then is pressed into stack;
D) turn b);
E) terminate.
Can be seen that existing scheme by flow above, at least there are following defects:
1 seed fill algorithm is only applicable to the region of one closing of filling, and then possible generation is more for inner run trace of enclosing the land The region of a closing.
2 seed fill algorithms need the point in one of polygonal region to start, and interior point is determined non-in practice It is often difficult.Run trace in filling algorithm of enclosing the land is arbitrary shape, and causing to obtain interior point becomes extremely complex.
In addition, substantial amounts of nesting allocation can cause the memory occupied to expand, substantial amounts of resource is not only consumed, is also easy to cause Memory overflows.
The content of the invention
In order to solve one or more defects set forth above, according to the first aspect of the invention, a kind of trip is provided The area filling method of play map, comprises the following steps:A. the coordinate of the grid having been filled with and run trace grid is obtained;B. create Build minimum enclosing region;C. in minimum enclosing region internal labeling closed area;D. closed area is filled, wherein, minimum surrounds area The grid and the coordinate of run trace grid being had been filled with described in the covering of domain.
Further, step B further includes following sub-step:Create temporal coordinate topLeft and bottomRight;Traversal The grid and the coordinate of run trace grid having been filled with, and the coordinate of wherein current grid is taken as grid, if grid.x< TopLeft.x, then assignment topLeft.x=grid.x;If grid.y<TopLeft.y, then assignment topLeft.y= grid.y;If grid.x>BottomRight.x, then assignment bottomRight.x=grid.x;If grid.y> BottomRight.y, then assignment bottomRight.y=grid.y;When all grid having been filled with of traversal and run trace lattice After the coordinate of son, minimum enclosing region is established based on coordinate topLeft to coordinate bottomRight.
Further, the grid is the grid with 8 unicom directions.
According to the second aspect of the invention, a kind of area filling device of map is provided, including:First mould Block obtains the coordinate of the grid having been filled with and run trace grid;Second module creates minimum enclosing region;3rd mould Block, in minimum enclosing region internal labeling closed area;4th module fills closed area, wherein, minimum enclosing region is covered The grid and the coordinate of run trace grid being had been filled with described in lid.
Further, the second module includes following submodule:First submodule, create temporal coordinate topLeft and bottomRight;The second submodule, travels through the coordinate of the grid having been filled with and run trace grid, and takes wherein current grid Coordinate for grid, if grid.x<TopLeft.x, then assignment topLeft.x=grid.x;If grid.y< TopLeft.y, then assignment topLeft.y=grid.y;If grid.x>BottomRight.x, then assignment BottomRight.x=grid.x;If grid.y>BottomRight.y, then assignment bottomRight.y=grid.y;The Three submodules, after the coordinate of all grid having been filled with and run trace grid is traveled through, based on coordinate topLeft to coordinate BottomRight establishes minimum enclosing region.
Further, grid is the grid with 8 unicom directions.
According to the third aspect of the present invention, a kind of computer readable storage medium is provided, is stored thereon with computer Program, the method that the first aspect of the present invention is realized when which is executed by processor.
The invention has the advantages that:Support the filling demand of enclosing the land of the map with multiple closed areas, so as to Improve the accuracy and adaptability for filling of enclosing the land.It is filled by minimum enclosing region and mark, is effectively improved to enclose the land and fill out The efficiency filled.
Description of the drawings
Fig. 1 is the flow chart for representing first embodiment according to the present invention;
Fig. 2 is to represent one or more 4 unicom grid of embodiment and the schematic diagram of 8 unicom grid according to the present invention;
Fig. 3 is to represent that 4 unicom grid of one or more embodiments according to the present invention and 8 unicom grid fill multiple areas The schematic diagram in domain;
Fig. 4 is the filling effect figure for representing one or more embodiments according to the present invention.
Specific embodiment
Those of ordinary skill in the art may realize that each exemplary lists described with reference to the embodiments described herein Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is performed with hardware or software mode, specific application and design constraint depending on technical solution.Professional technician Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit may be referred to the corresponding process in preceding method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit Division is only a kind of division of logic function, can there is other dividing mode, such as multiple units or component in actual implementation It may be combined or can be integrated into another system or some features can be ignored or does not perform.It is another, it is shown or The mutual coupling that discusses or to be directly harmonious or communicate to connect can be indirect coupling by some interfaces, device or unit It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit The component shown may or may not be physical location, you can be located at a place or can also be distributed to multiple In network element.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in two processing units, it can also That unit is individually physically present, can also two or more units integrate in a unit.
If the function is realized in the form of SFU software functional unit and is independent production marketing or in use, can be with It is stored in two computer read/write memory mediums.Based on such understanding, technical scheme is substantially in other words The part contribute to the prior art or the part of the technical solution can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, is used including some instructions so that a computer equipment (can be People's computer, server or network equipment etc.) perform all or part of the steps of the method according to each embodiment of the present invention. And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic disc or CD.
It will be appreciated by those skilled in the art that in the description of the present application, " first ", " secondly ", " first ", " Two ", the terms such as " A ", " B ", are not offered as the limitation to sequencing unless otherwise stated.For example, " step 3 " can be in " step Before rapid one ", " D " can also be carried out at the same time with " A ".
The present invention is directed to the defects of prior art, and the present situation and the reason for causing of system realization of generally enclosing the land are goed deep into Analysis, analysis exploitation summarize a set of fill method of enclosing the land, multizone closing are supported to reach to the specific requirements for filling of enclosing the land Filling demand of enclosing the land, by minimum enclosing region and mark filling come reach algorithm fill high efficiency.
First, the coordinate of the grid having been filled with and run trace grid is obtained.It is illustratively flat by two dimension in map Areal coordinate system or three-dimensional system of coordinate represent, by taking two-dimensional plane coordinate system as an example, the grid of each map has abscissa x and vertical seat Y is marked, i.e., each grid is represented by unique coordinate (x, y).In a manner of traversal, the grid having been filled with all on map is obtained It with the coordinate (x, y) of run trace grid, and is stored in the form of two Dimension Numerical Value in storehouse, as manor list.
Secondly, minimum enclosing region is created.Create two dimension temporal coordinate topLeft (topLeft.x, topLeft.y) and BottomRight (bottomRight.x, bottomRight.y) takes existing first grid assignment of manor list to coordinate TopLeft and bottomRight, all existing manor grid lists and run trace grid list under traversal take wherein current Grid is grid (grid.x, grid.y), if grid.x<TopLeft.x, then topLeft.x=grid.x;If grid.y <TopLeft.y, then topLeft.y=grid.y;If grid.x>BottomRight.x, then bottomRight.x= grid.x;If grid.y>BottomRight.y, then bottomRight.y=grid.y;Until having traveled through all grid.It sits Mark topLeft to the coordinate bottomRight regions formed be exactly minimum enclosing region.All closed areas that can be filled All inside minimum enclosing region.It can be not only the grid number for efficiently reducing traversal below by definite minimum enclosing region So as to improve efficiency, while the bounds of filling is also drawn a circle to approve, i.e., once it is to include most (not including run trace) to have region The border of small enclosing region, then the region is not closed area.It so below can be in this, as when seed filling According to judging whether the region is closed area.In addition, after a minimum enclosing region is created, still have in the list of manor When having the grid coordinate without traversal, optional one new grid coordinate creates the second minimum enclosing region, so repeatedly, high-ranking military officer Ground list is divided into multiple minimum enclosing regions, until the possessive case in the list of manor is included into each minimum enclosing region It is interior.
Again, to determine subsequently to fill the seed of traversal.Since the track of walking is ever-changing, and can be formed multiple Closed area, while closed area also needs to be associated with run trace, causes the multiple envelopes having no idea directly to being shaped as Seed in closed region.Any one grid in an i.e. given minimum enclosing region, has no idea whether to learn the grid In the associated closed area in track.All closed areas are but had been known at this time all in minimum enclosing region, this In only need the connection of upper and lower, left and right, upper left, lower-left, upper right, bottom right this eight corresponding to the track grid of each walking Grid flag labeled as 1, as the seed that subsequently fill traversal.Thus obtain seed list, seed list The flag of corresponding grid is 1.Although containing the seed in some non-close regions in seed list, it is possible to and rail The seed of the associated closed area of mark also all in seed list, only needs to identify non-envelope during so follow-up filling-tag The seed of closed region does not do filling-tag, and all does filling-tag to the seed in closed area.Each track grid Corresponding 4 connection grid and 8 connection grid are as shown in Figure 2.
Fig. 2 is to represent one or more 4 unicom of embodiment according to the present invention and the schematic diagram of 8 unicom grid;Wherein The A of Fig. 2 represents the grid of 4 unicom, and the B of Fig. 2 represents the grid of 8 unicom, and solid circles are denoted as the grid of basic point, open circles Shape is denoted as the grid adjacent with basic point grid, the link relation of connecting line basic point grid and adjacent grid.Go out from basic point Hair, if searching for the grid for reaching the arbitrary neighborhood in region simply by upper and lower, left and right four direction, in this way The region of filling is known as four connected region, and this filling grid is known as " 4 unicom grid ".If from basic point, by it is upper, Under, left and right, upper left, lower-left, all eight directions reach the grid of the arbitrary neighborhood in regions for upper right and bottom right, then this side The region of method filling is known as eight connected region, and this filling grid is known as " 8 unicom grid ".In addition, the shape to grid in itself Shape is not particularly limited, and grid can be circle, rectangle, regular hexagon, octagon etc..As shown in Figure 2, the lattice of 8 unicom Son than 4 unicom grid have higher connection degree of freedom, when game role walking path intersect, form two closure Section when using 4 unicom grid, can not connect two closed areas via the link relation that is not filled by between grid, when adopting With then there is no this problems during 8 unicom grid.
Seed tag is done using 8 connection grid rather than using 4 connection grid in this example, is because there are track grid is oblique The situation of direction Shang Yeyou closed areas, and use 4 connection grid that may then cause to miss the associated closed area in track Seed, then follow-up filling-tag can miss the closed area.Referring for example to Fig. 3, Fig. 3 is to represent according to the present invention one The schematic diagram of 4 unicom grid of a or multiple embodiments and 8 unicom grid filling multiple regions.The C of wherein Fig. 3 represents 4 unicom The multiple regions of grid filling, the D of Fig. 1 represent the filling multiple regions of 8 unicom grid according to the present invention, and solid circles represent The grid of basic point as starting point, the circular walking path for representing game role of hollow solid line, hollow dashed circle represent warp Cross the region of four-way connection seed fill algorithm filling, it can be seen that fill out when carrying out region to connection seed fill algorithm using 4 When filling, 6 hollow dashed circle grid of lower-left enclosed region have been only filled with, and have missed out the enclosed region in upper right side, have been filled Scope it is wrong.When the 8 of the method for embodiment using the present invention carries out area filling to connection method, it is filled with lower-left and closes 6 hollow dashed circle grid for closing 6 hollow dashed circle grid in region and the enclosed region in upper right side are obtained for just True filling improves the accuracy rate of filling.
Next filling closed area, filling-tag flow are described below:
A. current markers variable CurrentSeedFlag settings being initially 2, (mark of grid is to have represented it is to need The seed to be traveled through), newly-built one is stored mark closing list SeedColsedFlags (the i.e. marks of grid that can be filled Number then represents that the grid can be filled in closed area in mark closes list), it is minimum from traversal left to bottom right Grid in range areas, algorithm start;
B. next grid in minimum zone region is taken as current grid, if current grid (is kind labeled as 1 Son), it is possible to flow is marked to current grid recurrence, turns c.If there is no next grid, turn f;
C. mark flow starts:If the mark of grid is (showing to have stepped through labeled), Directly return to true;If the mark of grid is 1 (showing it has been the labeled non-close region of identification), directly return Failure;If grid is (to show on minimum enclosing region border or outside border in non-close region), grid is marked For -1, and return to failure;Otherwise grid is labeled as CurrentSeedFlag;Obtain the lattice in four communication directions of current grid Son, if there is grid neither having manor grid nor track grid, then then each grid is marked in recurrence Flow.If there are some grid mark flows in recurrence to return to failure, by grid labeled as -1, and failure is returned to, so as to Outermost mark flow is finally exited, turns d at this time;Failure is returned if there is no some grid mark flow, is shown initially Current grid be in closed area, the grid in closed area has been collectively labeled as CurrentSeedFlag, finally exits Outermost mark flow, turns e at this time;
D. current grid mark flow failure, adds 1 to current markers variable CurrentSeedFlag, then proceedes to turn b;
E. current markers variable CurrentSeedFlag is added in mark closing list SeedColsedFlags, and 1 is added to current markers variable CurrentSeedFlag, then proceedes to turn b;
So far, filling-tag flow is terminated.
The mark list SeedClosedFlags that can be filled is outputed after filling-tag flow.Last step It is each grid in the minimum enclosing region of traversal, it is current grid to remove a grid, if mark list Mark or current grid that SeedClosedFlags includes current grid belong to the grid of run trace, then then current lattice Son just belongs to the grid in closed area, the grid of oneself is at this moment filled with into, until having traveled through all grid.Terminate stream Associated all closed areas in run trace can be filled into the manor of oneself after journey.
Fig. 4 is the real machine effect filling effect figure for representing one or more embodiments according to the present invention.In the E of Fig. 4, Dark belt-like zone represents the run trace of game role, and from figure, adjacent run trace section is by map partitioning For two closed areas and a semiclosed region.The F of Fig. 4 is represented on the basis of the E of Fig. 4, uses the implementation of the present invention The method of example, the result being filled to the region in map.Solid section is the manor of oneself of player's filling.
The embodiment of the disclosure has the advantages that:
1. support the filling demand of enclosing the land of the map with multiple closed areas;
General seed filling method and other fill methods are only to an area filling, using enclosing the land in the present embodiment Fill method is filled in the case of can meeting to multizone closing, improves the accuracy for filling of enclosing the land.
2. the high efficiency that method is filled is reached by minimum enclosing region and mark filling;
Fill method of enclosing the land in the present embodiment determines the minimum enclosing region that needs fill to reduce traversal first Scope in the filling process again does grid a little marks and avoids the judgement repeated processing, is effectively improved the effect for filling of enclosing the land Rate.
According to the second embodiment of the present invention, a kind of area filling device of map is provided, including:First mould Block obtains the coordinate of the grid having been filled with and run trace grid;Second module creates minimum enclosing region;3rd mould Block, in minimum enclosing region internal labeling closed area;4th module fills closed area, wherein, minimum enclosing region is covered The grid and the coordinate of run trace grid being had been filled with described in lid.
Further, the second module includes following submodule:First submodule, create temporal coordinate topLeft and bottomRight;The second submodule, travels through the coordinate of the grid having been filled with and run trace grid, and takes wherein current grid Coordinate for grid, if grid.x<TopLeft.x, then assignment topLeft.x=grid.x;If grid.y< TopLeft.y, then assignment topLeft.y=grid.y;If grid.x>BottomRight.x, then assignment BottomRight.x=grid.x;If grid.y>BottomRight.y, then assignment bottomRight.y=grid.y;The Three submodules, after the coordinate of all grid having been filled with and run trace grid is traveled through, based on coordinate topLeft to coordinate BottomRight establishes minimum enclosing region.
Further, grid is the grid with 8 unicom directions.
3rd embodiment according to the present invention, provides a kind of computer readable storage medium, is stored thereon with calculating Machine program, the method that the first aspect of the present invention is realized when which is executed by processor.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in change or replacement, should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention described should be subject to the protection scope in claims.

Claims (7)

1. a kind of area filling method of map, it is characterised in that comprise the following steps:
A. the coordinate of the grid having been filled with and run trace grid is obtained;
B. minimum enclosing region is created;
C. in minimum enclosing region internal labeling closed area;
D. closed area is filled,
Wherein, the grid and the coordinate of run trace grid being had been filled with described in minimum enclosing region covering.
2. area filling method according to claim 1, which is characterized in that step B further includes following sub-step:
Create temporal coordinate topLeft and bottomRight;
The coordinate of the grid having been filled with and run trace grid is traveled through, and it is grid to take the wherein current coordinate for traveling through grid, such as Fruit grid.x<TopLeft.x, then assignment topLeft.x=grid.x;If grid.y<TopLeft.y, then assignment TopLeft.y=grid.y;If grid.x>BottomRight.x, then assignment bottomRight.x=grid.x;If grid.y>BottomRight.y, then assignment bottomRight.y=grid.y;
After the coordinate of all grid having been filled with and run trace grid is traveled through, based on coordinate topLeft to coordinate BottomRight establishes minimum enclosing region.
3. area filling method according to claim 1 or 2, it is characterised in that:The grid is with 8 unicom directions Grid.
4. a kind of area filling device of map, it is characterised in that including:
First module obtains the coordinate of the grid having been filled with and run trace grid;
Second module creates minimum enclosing region;
3rd module, in minimum enclosing region internal labeling closed area;
4th module fills closed area,
Wherein, the grid and the coordinate of run trace grid being had been filled with described in minimum enclosing region covering.
5. area filling device according to claim 4, which is characterized in that the second module includes following submodule:
First submodule creates temporal coordinate topLeft and bottomRight;
The second submodule, travels through the coordinate of the grid having been filled with and run trace grid, and takes the grid wherein currently traveled through Coordinate is grid, if grid.x<TopLeft.x, then assignment topLeft.x=grid.x;If grid.y<topLeft.y, Then assignment topLeft.y=grid.y;If grid.x>BottomRight.x, then assignment bottomRight.x=grid.x; If grid.y>BottomRight.y, then assignment bottomRight.y=grid.y;
3rd submodule after the coordinate of all grid having been filled with and run trace grid is traveled through, is arrived based on coordinate topLeft Coordinate bottomRight establishes minimum enclosing region.
6. area filling device according to claim 4 or 5, it is characterised in that:The grid is with 8 unicom directions Grid.
7. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor Method any one of claim 1-3 is realized during row.
CN201810076588.7A 2018-01-26 2018-01-26 Region filling method and device of game map Active CN108096835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810076588.7A CN108096835B (en) 2018-01-26 2018-01-26 Region filling method and device of game map

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810076588.7A CN108096835B (en) 2018-01-26 2018-01-26 Region filling method and device of game map

Publications (2)

Publication Number Publication Date
CN108096835A true CN108096835A (en) 2018-06-01
CN108096835B CN108096835B (en) 2021-06-08

Family

ID=62221414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810076588.7A Active CN108096835B (en) 2018-01-26 2018-01-26 Region filling method and device of game map

Country Status (1)

Country Link
CN (1) CN108096835B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109045696A (en) * 2018-07-24 2018-12-21 合肥爱玩动漫有限公司 A kind of closed map Research on Automatic Filling

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1549207A (en) * 2003-05-21 2004-11-24 明基电通股份有限公司 Filling method for closed zone
CN104765614A (en) * 2015-04-24 2015-07-08 广东小天才科技有限公司 Color filling processing method and device
WO2017024443A1 (en) * 2015-08-07 2017-02-16 浙江大学 High efficiency parallel vector data visualization method
CN107016714A (en) * 2017-03-14 2017-08-04 佛山科学技术学院 A kind of closed curve filling graph method
CN107481190A (en) * 2017-07-04 2017-12-15 腾讯科技(深圳)有限公司 A kind of image processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1549207A (en) * 2003-05-21 2004-11-24 明基电通股份有限公司 Filling method for closed zone
CN104765614A (en) * 2015-04-24 2015-07-08 广东小天才科技有限公司 Color filling processing method and device
WO2017024443A1 (en) * 2015-08-07 2017-02-16 浙江大学 High efficiency parallel vector data visualization method
CN107016714A (en) * 2017-03-14 2017-08-04 佛山科学技术学院 A kind of closed curve filling graph method
CN107481190A (en) * 2017-07-04 2017-12-15 腾讯科技(深圳)有限公司 A kind of image processing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
匿名: "圈地ios游戏", 《HTTP://WWW.MANEW.COM/THREAD-105250-1-1.HTML》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109045696A (en) * 2018-07-24 2018-12-21 合肥爱玩动漫有限公司 A kind of closed map Research on Automatic Filling

Also Published As

Publication number Publication date
CN108096835B (en) 2021-06-08

Similar Documents

Publication Publication Date Title
CN105043379B (en) A kind of scenic spot browse path planing method based on space-time restriction, device
CN106952324A (en) The parallel overlap-add procedure device and method of vector polygon rasterizing
CN106529674A (en) Multiple-unmanned-aerial-vehicle cooperated multi-target distribution method
US10753751B2 (en) Systems and methods for street level routing
CN111309837B (en) Intelligent warehouse map platform building and AGV path optimization method
CN105913469B (en) TF/TA2 path planning methods based on skeleton drawing
CN107292960A (en) A kind of Local hydrodynamic unit method that large-scale terrain is rendered in three-dimensional scenic
CN110772791A (en) Route generation method and device for three-dimensional game scene and storage medium
CN105046734A (en) Method and system for dynamically generating and updating grid tile pyramid
CN106340061A (en) Mountain area point cloud filtering method
CN110533228A (en) A kind of flight restoration methods considering passenger&#39;s wish
CN103838829A (en) Raster vectorization system based on hierarchical boundary-topology search model
CN110415346A (en) The method for carrying out soil erosion simulation using the three-dimensional cellular automaton of object-oriented
CN106991558A (en) The automatic generation method and system of main channel between a kind of harbour port
CN110458325A (en) A kind of traffic zone passenger flow forecasting and device in short-term
CN109696909A (en) Foot type robot path planning method and device
CN111581756A (en) Method and device for determining flood inundation range
CN104658036B (en) A kind of quick method for establishing intelligent transportation three dimensional field
CN108280463A (en) Optimization method and device for double-layer path of vehicle-mounted unmanned aerial vehicle
CN110335191A (en) A kind of lossless compression storage method and device with Cave polygon in electronic map
CN108096835A (en) The area filling method and device of a kind of map
CN106682816A (en) Feature-basedthree-dimensional machiningtechnology layout system and method
CN112837322A (en) Image segmentation method and device, equipment and storage medium
CN108153572A (en) GIS display methods, device and system
CN107481200A (en) Image processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Patentee after: Zhuhai Jinshan Digital Network Technology Co.,Ltd.

Patentee after: Guangzhou Xishanju Network Technology Co.,Ltd.

Address before: 519000 building 3, Jinshan Software Park, 325 Qiandao Ring Road, Xiangzhou District, Zhuhai City, Guangdong Province

Patentee before: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

Patentee before: GUANGZHOU SEASUN ENTERTAINMENT NETWORK TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address