CN111161378B - Color filling method and device and electronic equipment - Google Patents

Color filling method and device and electronic equipment Download PDF

Info

Publication number
CN111161378B
CN111161378B CN201911390076.9A CN201911390076A CN111161378B CN 111161378 B CN111161378 B CN 111161378B CN 201911390076 A CN201911390076 A CN 201911390076A CN 111161378 B CN111161378 B CN 111161378B
Authority
CN
China
Prior art keywords
color
filling
area
map
state
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.)
Active
Application number
CN201911390076.9A
Other languages
Chinese (zh)
Other versions
CN111161378A (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.)
Super Magic Cube Beijing Technology Co ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201911390076.9A priority Critical patent/CN111161378B/en
Publication of CN111161378A publication Critical patent/CN111161378A/en
Application granted granted Critical
Publication of CN111161378B publication Critical patent/CN111161378B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a color filling method, a color filling device and electronic equipment, relates to the technical field of computer image processing application, and can realize a compound color filling effect. The method comprises the following steps: displaying a color filling window; a color filling area is arranged in the color filling window; receiving the operation of the filling area, and determining a first filling sub-area; adjusting the color state of a second map in a second layer of the first fill sub-area from an opaque initial color state to a highlight color state; the second layer is positioned below the first layer; receiving clicking operation on the first filling sub-area; adjusting the color state of the second map from the highlighting color state to a transparent state to display a third map in a third layer of the first fill sub-area; wherein the third layer is located below the second layer. The invention can be applied to the color filling game APP or the webpage color filling game of the terminal equipment, in particular to the color filling game developed based on the Unity engine.

Description

Color filling method and device and electronic equipment
Technical Field
The present invention relates to the field of computer image processing applications, and in particular, to a color filling method, a color filling device, and an electronic device.
Background
The color-filling book game is a game in which the outlines of many color drawings are abstracted into line diagrams, and the closed areas formed by the line diagrams are filled with colors by users to finish the color-filling works.
The inventors found in the course of implementing the present invention that: in the existing color-filling book game, only a single color can be filled in each filling area, and the filling area is clicked by a user by selecting a palette to display a pure color effect.
Disclosure of Invention
In view of this, the embodiment of the invention provides a color filling method, a device and an electronic device, which can realize a color filling effect of composite color, thereby enhancing the richness of color filling.
In a first aspect, an embodiment of the present invention provides a color filling method, including the steps of:
displaying a color filling window; a color filling area is arranged in the color filling window, and the color filling area comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first mapping is a boundary texture map with a hollowed-out area; the hollow areas form filling sub-areas in the filling areas;
receiving the operation of the filling area, and determining a first filling sub-area;
adjusting the color state of a second map in a second layer of the first fill sub-area from an opaque initial color state to a highlight color state; the second layer is positioned below the first layer;
Receiving clicking operation on the first filling sub-area;
adjusting the color state of the second map from the highlighting color state to a transparent state to display a third map in a third layer of the first fill sub-area; wherein the third layer is located below the second layer.
With reference to the first aspect, in a first implementation manner of the first aspect, after the adjusting the color state of the second map in the second layer of the first filling sub-area from the opaque initial color state to the highlight color state, the method further includes:
and storing the region information corresponding to the first filling sub-region into a highlight region information list.
With reference to the first aspect, in a second implementation manner of the first aspect, the adjusting the color state of the second map from the highlighted color state to the transparent state to display a third map in a third layer of the first filling sub-area includes:
judging whether the color state of the second map is the highlight color state according to the highlight region information list;
if yes, the color state of the second mapping is adjusted from the highlight color to a transparent state, and therefore the third mapping is displayed.
With reference to the first aspect, in a third implementation manner of the first aspect, the receiving operates on the filling area to determine a first filling sub-area includes:
receiving clicking operation on a color palette in the color filling window, and determining a first color block;
determining the first filling sub-area according to the number information of the first color block; the color palette is provided with a plurality of color blocks with different colors, each color block is at least associated with one filling sub-area, and each color block also carries number information.
With reference to the first aspect, in a fourth implementation manner of the first aspect, after adjusting a color state of the second map from the highlight color state to a transparent state to display a third map in a third layer of the first fill sub-area, the method further includes:
and deleting the region information corresponding to the first filling sub-region from the highlight region information list.
In a second aspect, an embodiment of the present invention provides a color filling device, including:
the display program module is used for displaying the color filling window; a color filling area is arranged in the color filling window, and the color filling area comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first mapping is a boundary texture map with a hollowed-out area; the hollow areas form filling sub-areas in the filling areas;
A determining program module, configured to receive an operation on the filling area, and determine a first filling sub-area;
a first color filling program module for adjusting a color state of a second map in a second layer of the first color filling sub-region from an opaque initial color state to a highlight color state; the second layer is positioned below the first layer;
a receiving program module for receiving clicking operation on the first filling sub-area;
a second color filling program module for adjusting a color state of the second map from the highlight color state to a transparent state to display a third map in a third layer of the first color filling sub-region; wherein the third layer is located below the second layer.
With reference to the second aspect, in a first implementation manner of the second aspect, the apparatus further includes: and the storage program module is used for storing the area information corresponding to the first filling sub-area into a highlight area information list after the color state of the second map in the second map layer of the first filling sub-area is adjusted from the opaque initial color state to the highlight color state.
With reference to the second aspect, in a first implementation manner of the second aspect, in a second implementation manner of the second aspect, the second color filling program module includes:
A judging program unit, configured to judge whether the color state of the second map is the highlight color state according to the highlight region information list;
and the color filling program unit is used for adjusting the color state of the second mapping from the highlight color to a transparent state so as to display the third mapping if the color state of the second mapping is judged to be the highlight color state.
With reference to the second aspect, in a first or second implementation manner of the second aspect, in a third implementation manner of the second aspect, the determining program module includes:
a color block determining program unit, configured to receive a click operation on a color palette in the color filling window, and determine a first color block;
a region determining program unit, configured to determine the first filling sub-region according to the number information of the first color block; the color palette is provided with a plurality of color blocks with different colors, each color block is at least associated with one filling sub-area, and each color block also carries number information.
With reference to the second aspect, in a fourth embodiment of the second aspect,
the apparatus further comprises: and the deleting program module is used for deleting the region information corresponding to the first filling sub-region from the highlight region information list after the color state of the second map is adjusted from the highlight color state to the transparent state so as to display the third map in the third map layer of the first filling sub-region.
In a third aspect, an embodiment of the present invention provides an electronic device, including: one or more processors;
a memory;
the memory has one or more executable program codes stored therein, and the one or more processors read the executable program codes stored in the memory to run a program corresponding to the executable program codes for performing the method of any one of the first aspects.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing one or more programs executable by one or more processors for implementing the method of any of the first aspects.
The embodiment of the invention provides a color filling method, a device and electronic equipment, which are used for displaying a color filling window; a color filling area is arranged in the color filling window, and the color filling area comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first mapping is a boundary texture map with a hollowed-out area; the hollow areas form filling sub-areas in the filling areas; receiving the operation of the filling area, and determining a first filling sub-area; adjusting the color state of a second map in a second layer of the first fill sub-area from an opaque initial color state to a highlight color state; the second layer is positioned below the first layer; receiving clicking operation on the first filling sub-area; adjusting the color state of the second map from the highlighting color state to a transparent state to display a third map in a third layer of the first fill sub-area; wherein the third layer is located below the second layer. The third mapping can be any compound color effect graph with gradual change, texture and the like, and after the color filling is performed through the steps, the color filling effect graph with compound color is finally displayed in a color filling subarea, so that the richness of color filling is enhanced.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an embodiment of a color filling method of the present invention;
FIG. 2 is a flow chart of another embodiment of the color filling method of the present invention;
FIG. 3 is a flowchart of a color filling method according to another embodiment of the present invention;
FIG. 4 is a schematic diagram showing an initial state of a color filling window of a specific color filling case in a color filling book game according to the color filling method of the present invention;
FIG. 5 is a schematic diagram showing a filling effect of a specific color filling case in FIG. 4;
FIG. 6 is a block diagram illustrating an embodiment of a color filling apparatus according to an embodiment of the present invention;
FIG. 7 is a block diagram illustrating another embodiment of a color filling apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an embodiment of the electronic device of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
FIG. 1 is a flowchart of an embodiment of a color filling method according to the present invention, as shown in FIG. 1, the method according to the present embodiment may be applied to a color filling game APP or a web page color filling game on a terminal device, for example, a color filling book, especially a color filling game developed based on a Unity engine; the terminal equipment comprises a mobile phone, a computer, a game machine, a tablet personal computer, a learning machine and the like. The method may include:
step 110, displaying a color filling window; a color filling area is arranged in the color filling window, and the color filling area comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first mapping is a boundary texture map with a hollowed-out area; as shown in fig. 3 or fig. 4, the hollowed-out area forms the filling sub-area.
In this embodiment, the color filling area may be displayed in a game APP open interface window of the terminal device, or may be displayed in a web game open interface window. The filling area is a closed area generally, or may be a semi-closed area, and may further include a plurality of filling sub-areas in one filling area, where each filling sub-area has a plurality of layers.
It can be understood that, since the first map has a hollowed-out area, a portion of the second map located below the first layer in the hollowed-out area can be displayed; the final filling effect in this embodiment is a composite color filling effect formed by fusing the pattern or gradient color map of the lowermost layer and the boundary texture map of the first layer; the fusion refers to the meaning that two or more patterns or color maps are seamlessly connected into a whole, the composite color filling refers to the mixed color formed by mutually splicing or overlapping two or more patterns or colors, for example, the first mapping is a butterfly outline and a meridian texture structure outlined by a line zebra texture map, the third mapping is a red, blue and yellow gradient color map, and according to the scheme of the embodiment, the final appearance is the whole mixed color effect formed by partially overlapping or splicing the zebra texture and the red, blue and yellow gradient map.
The first map layer may be understood as a filling sub-area that can be seen by a user opening the color filling game interface, and the first map is a main outline for providing filling, for example, an animal or plant, and is exemplified with reference to fig. 4 or 5, when the filling is a butterfly, the whole outline and the tendons of the body divide the butterfly whole into a plurality of filling sub-areas, and the first map layer is a line map of tendons of the body and the outline of the butterfly; it will be appreciated that the lines may be selected from different coloured line texture maps. Another example is: when a leaf is filled, the outline and veins of the leaf divide the whole leaf into a plurality of filling sub-areas, and the first layer is a line drawing showing the outline and veins of the leaf.
In addition, in this embodiment, specifically, each color filling sub-area carries color filling information, where the color filling information may include: the layer number of the filling sub-area, the mapping information corresponding to each layer and the area or boundary of the filling sub-area; further comprises: and the color block number corresponding to each filling sub-area. The color filling sub-area can also carry an identification number of the color filling sub-area, which is used for uniquely identifying the color filling sub-area so as to be distinguished from other color filling sub-areas, and the identification number can be Arabic numerals or English letters and the like similar to the identification card number of a person.
And 120, receiving the operation on the filling area, and determining a first filling sub-area.
In this embodiment, the user may click on one of the filling sub-areas, and the system determines a map filling sub-area according to the click trigger instruction; or setting a color filling trigger button in the map filling window, and determining a map filling subarea according to a trigger instruction by the system after the user clicks the trigger button.
Step 130, adjusting the color state of the second map in the second layer of the first filling sub-area from the opaque initial color state to a highlight color state; the second layer is positioned below the first layer;
Wherein the second map is a map of a color state change, the color state including an opaque initial color, a highlight color, and a transparent color.
It can be understood that in some schemes for implementing the color filling effect of the composite color based on multiple layers, there are at least four layers, where each layer corresponds to a corresponding map, and the third layer is a highlight layer, after the user clicks on the map filling sub-area, i.e. the second layer, the highlight layer is displayed, i.e. the map filling sub-area is highlighted, and then the highlight layer is operated to display the fourth layer map, i.e. the color filling is completed.
In this embodiment, the second map is set to a map with a changed color state, including an opaque initial color state, a highlight color state and a transparent state, and the second map layer, the highlight layer and the information required by transparent processing are combined into the information included in one map layer, so that after clicking one map filling sub-area, the color state of the second map is changed from the opaque color state to the highlight color state, and therefore, the second map layer is not required to be specially set to the map layer between the final effect maps, namely the highlight layer in the above example, so that the occupation of the memory of the color filling program can be reduced.
And 140, receiving clicking operation on the first filling sub-area.
After the first filler sub-area is displayed in the highlight color state, the first filler sub-area is activated, the user clicks the sub-area again, and the system executes step 150 after receiving the operation instruction.
Step 150, adjusting the color state of the second map from the highlight color state to a transparent state so as to display a third map in a third layer of the first filling sub-area; wherein the third layer is located below the second layer.
Specifically, the color Alpha value of the subarea is set to be 0, the subarea is automatically subjected to transparency treatment, namely, the color state of the second mapping is adjusted from the highlight color state to be the transparent state, so that the pattern of the third mapping layer can be displayed in the subarea, and meanwhile, the third mapping and the first mapping are in butt joint fusion to form a compound color filling effect. The diversified display effect graph of the filling colors is realized.
The embodiment of the invention provides a color filling method, a device and electronic equipment, which are used for displaying a color filling window; a color filling area is arranged in the color filling window, and the color filling area comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first mapping is a boundary texture map with a hollowed-out area; the hollow areas form filling sub-areas in the filling areas; receiving the operation of the filling area, and determining a first filling sub-area; adjusting the color state of a second map in a second layer of the first fill sub-area from an opaque initial color state to a highlight color state; the second layer is positioned below the first layer; receiving clicking operation on the first filling sub-area; adjusting the color state of the second map from the highlighting color state to a transparent state to display a third map in a third layer of the first fill sub-area; wherein the third layer is located below the second layer. The third mapping can be any compound color effect graph with gradual change, texture and the like, and after the color filling is performed through the steps, the color filling effect graph with compound color is finally displayed in a color filling subarea, so that the richness of color filling is enhanced.
In addition, by setting the second map of the second layer as a map of color state change, that is, combining the second layer with the highlight layer and information required for transparent processing into information included in one layer, it is not necessary to specially set the second layer to a layer between the final effect maps, such as the highlight layer, so that occupation of the color filling program memory can be reduced.
Referring to fig. 2, in order to mark which of the filling sub-areas have been displayed as highlighting colors, in order to facilitate distinguishing the filling process, after the color state of the second map in the second layer of the first filling sub-area is adjusted from the opaque initial color state to the highlighting color state in step 130, the method further includes:
and 131, storing the region information corresponding to the first filling sub-region into a highlight region information list.
Stored in the Highlight sub-region List (Highlight List) is a filler sub-region that has been displayed in a Highlight color state or a Highlight pattern. The highlight color state or the fill sub-region of the highlight pattern is a region where pixel filling processing can be performed, similarly to being in an activated state; for example, it may be a region of a grid (tile). This can be transparently processed to display the final effect map.
Referring to fig. 3, in other embodiments, the adjusting the color state of the second map from the highlighted color state to the transparent state in step 150 to display a third map in a third layer of the first filler sub-area includes:
step 150A, judging whether the color state of the second map is the highlight color state according to the highlight region information list;
if yes, step 150B is executed to adjust the color state of the second map from the highlighted color state to a transparent state, so as to display the third map.
Thus, according to the highlight region information list, when the first filling sub-region clicked by the user is detected as a sub-region in the highlight region information list, the color of the second map is directly and transparently processed, and a third map is displayed so as to finish the filling of the sub-region.
Referring to fig. 4, in the foregoing embodiment, the color filling trigger button may be a color palette disposed in a color filling window, where a plurality of color blocks of different colors are disposed in the color palette, and each color block is associated with at least one color filling sub-area, and each color block further carries numbering information.
Step 120, receiving the operation on the filling area, determining a first filling sub-area, including:
And receiving clicking operation on the color palette in the color filling window, and determining a first color block.
The color block is used as a trigger button for triggering the system to enter a color filling state and determine a certain color filling sub-area, and can be presented or set in any form, for example, can be in the form of buttons, arabic numerals, letters and the like, and is arranged in the color filling window.
And determining the first filling sub-area according to the number information of the first color block.
After the system determines the number of a color block, the corresponding first filling sub-area is determined and highlighted according to the filling sub-area information associated with the color block.
In order to avoid the system from repeating the color filling step for the subregion which has completed the color filling, the color filling efficiency is affected. Specifically, in step 150, after adjusting the color state of the second map from the highlight color state to a transparent state to display a third map in a third layer of the first fill sub-area, the method further includes: and deleting the region information corresponding to the first filling sub-region from the highlight region information list.
After the color filling of one color filling sub-area is completed, the color filling sub-area is deleted from the highlight area information list, so that the task amount of the filling processing can be reduced, and the color filling efficiency is improved.
In other embodiments, step 150, after adjusting the color state of the second map from the highlighted color state to a transparent state to display a third map in a third layer of the first fill sub-area, the method further comprises: and deleting the color block corresponding to the first filler sub-area. Thus, after the color block is deleted from the color filling window, the user can be prompted that all the filler subareas corresponding to the color block are completely filled, if the color block is not deleted and still exists in the color filling window, the user can know whether the filler of a subarea is omitted or not according to the color block.
Receiving clicking operation on the first filling sub-area;
adjusting the color state of the second map from the highlighting color state to a transparent state to display a third map in a third layer of the first fill sub-area comprises the steps of:
generating first filling point coordinates according to the clicking of the user on the first filler map subarea;
and calling a flood filling algorithm to change the color state of the second map of the first map-filling subarea into transparent color based on the first filling point coordinates so as to display a third map in a third map layer.
In order to help understand the technical scheme and technical effects of the embodiment, the following description is made with reference to the accompanying drawings and a specific color filling game scene: the user opens a color filling game, and displays a color filling game window to the user, as shown in fig. 4, wherein the color filling region comprises a plurality of white (the initialized color state of the second layer or other colors) color filling sub-regions divided by a line boundary texture map (the map of the first layer), and a control region comprising a plurality of control buttons; after a user starts a color filling game through a control area, a system determines a first color filling sub-area according to a triggering instruction of the user, adjusts the color state of a second map in a second map layer of the first color filling sub-area from an opaque initial color state to a highlight color state table, and clicks the first color filling sub-area again by the user; the color state of the second map is adjusted from the highlighted color state to a transparent state (the content displayed by the two-dimensional map is limited and cannot be shown in the figure), so that the third map in the third layer of the first color filling sub-area is displayed, a final effect map of a sub-area is displayed, and the steps are repeated to finish filling all the color filling sub-areas of the color filling area, and one color filling example is shown in fig. 5. Setting a plurality of color filling layers for the color filling sub-areas, wherein a first mapping in a first layer is provided with a hollowed-out area, and a second mapping in a second layer is provided with a color state changing diagram, wherein the color state changing diagram comprises an opaque initial color, a highlight color and a transparent color; the third mapping can be set as a gradual color filling effect, a texture effect, a three-dimensional stereoscopic sense effect and the like; after the color state of the second mapping in the first mapping subarea is adjusted from the highlight color to the transparent color, the color filling effect of composite colors such as gradual change, texture and the like formed by fusing the third mapping in the first mapping layer and the third mapping layer can be realized, and the diversified display effect of the filling colors is realized.
It should be noted that, the numbers displayed on the filler subareas in fig. 5 are only for illustrating that each filler subarea may be different filling effects, and the numbers are not displayed after the color filling is actually completed, but the filling effects corresponding to the numbers.
In addition, in this embodiment, by setting the second map of the second layer to be the map with the color state changed through the above method, the second layer in some games can be merged into the information included in one layer, for example, the highlight layer, and the information required for the transparent processing is not required to be specially set to the layer between the final effect maps, for example, the highlight layer, so that the memory of the color filling program can be reduced.
In this embodiment, it can be understood that the method for setting different colors or patterns on the stickers in different layers can also provide various optional composite color filling effect patterns
In this embodiment, as an optional embodiment, after the step 110 of displaying the map filling window, the method further includes: the second filler sub-area is automatically displayed as a highlight color state.
It will be appreciated that after the user opens the filler game and enters the filler window, a certain filler sub-area will be displayed in a highlighted color state by default in order to alert or guide the user of the initial use to quickly complete the filler. After clicking the map filler subarea, the user automatically transparencies the map filler subarea, changes the current highlight color of the second map into a transparent state, and displays the final effect map.
The adjusting the color state of the second map from the highlight color state to the transparent state to display the third map in the third layer of the first filling sub-area includes:
acquiring a first filling point coordinate generated by the clicking operation;
and calling a flood filling algorithm to perform transparent filling processing on the second mapping of the first filling sub-area based on the first filling point coordinates, so that the color state of the second mapping is adjusted from the highlight color state to a transparent state.
The flood filling algorithm is the prior art, and is not described herein, and specifically, a four-neighborhood filling method (without considering filling points in a diagonal direction), an eight-neighborhood filling method (considering filling points in a diagonal direction), a scan line-based filling method, or the like may be adopted.
It can be understood that according to the color filling scheme provided by the embodiment, a user can automatically call the flood filling algorithm to perform filling processing only by clicking a certain filling subarea, so that a preset filling effect is presented.
In this embodiment, in order to fully explain the embodiment of the present application, a description will be given below of a color book game developed by the inventor based on the Unity engine: .
Referring to fig. 1 through 5, a developer creates 3 Sprite fairs in the Unity engine for drawing two-dimensional graphic objects; and correspondingly setting 3 levels, wherein each Sprite eidolon corresponds to one level, wherein a line texture map used as a filling area outline is obtained and drawn on a first map layer, a second map with color state change is obtained, the color state comprises an opaque initial color and grid texture (one of highlight colors), the second map layer is drawn, and a gradual effect map is drawn on a third map layer.
And creating filling information on the first image layer, wherein the filling information comprises a number corresponding to the filling subarea, the number of image layers, mapping information corresponding to each image layer, the number of color blocks in the color palette, the area of the filling subarea and/or the boundary coordinate value of the filling subarea. The filler sub-areas with the same filling effect can be provided with the same identification, for example, the same Arabic numerals, a user can click a certain number on the operation interface, and the corresponding filler sub-areas are highlighted.
The method comprises the steps that a user opens client game software, a color filling window is displayed, the color filling window comprises a color filling area and a control area, and a first map is displayed in a first map layer of the color filling area; the first map is a boundary texture map with a hollowed-out area, wherein the hollowed-out area forms the filling sub-area, and a second map with a part positioned on a second map layer is displayed in the hollowed-out area, for example, a pure white map; the control area is used for triggering the start of color filling, and the control area can be provided with the color blocks or be provided with the identification blocks.
The user clicks a certain color block in the control area, a system is triggered to start to call a flood filling algorithm to fill color in a certain filling sub-area, the second mapping corresponding to the filling sub-area is changed from opaque initial color to highlight color for display, area information corresponding to the highlight sub-area is stored in a highlight area information list, and when the user clicks the filling sub-area again, whether the color state of the second mapping in the filling sub-area is the highlight color state is judged according to the highlight area information list; if so, indicating that the color is filled with the highlighting color, the system automatically performs transparent processing on the subarea to display the map of the third map layer so as to display the gradient composite color filling effect map of the first map and the third map.
The invention provides a specific color filling scheme based on the game color filling book developed by the Unity engine, changes the monotonicity of the existing monochromatic color filling effect, improves the diversity of the color filling effect of the color filling game, ensures that the effect of the color filling game is not only a pure color map, but also can present a complex gradual change map, a texture map and other arbitrary effect maps, and brings better color filling game experience for users; furthermore, the layer of the color filling scheme is reduced to three layers, so that the memory occupation of the color filling program can be reduced.
Example two
FIG. 6 is a schematic structural diagram of an embodiment of a color filling device according to the present invention, as shown in FIG. 6, the color filling device according to the present embodiment may be applied to a color filling game APP or a web page color filling game on a terminal device, for example, a color filling book, especially a color filling game developed based on a Unity engine; so as to realize colorful color filling effect, and is not limited to pure color filling effect; the terminal equipment comprises a mobile phone, a computer, a game machine, a tablet personal computer, a learning machine and the like. The device comprises: a display program module 210 for displaying the color-filled window; a color filling area is arranged in the color filling window, and the color filling area comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first mapping is a boundary texture map with a hollowed-out area; the hollow areas form filling sub-areas in the filling areas; a determining program module 220, configured to receive an operation on the filling area, and determine a first filling sub-area; a first color filling program module 230 for adjusting a color state of a second map in a second layer of the first color filling sub-region from an opaque initial color state to a highlight color state; the second layer is positioned below the first layer; a receiving program module 240, configured to receive a click operation on the first filling sub-area; a second color-filling program module 250 for adjusting the color state of the second map from the highlighted color state to a transparent state to display a third map in a third layer of the first color-filling sub-area; wherein the third layer is located below the second layer.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 1, and the implementation principle and technical effects of the apparatus of this embodiment are similar to those of the embodiment, and are not described herein again, and can be referred to each other.
Referring to fig. 7, in this embodiment, as an alternative embodiment, there is provided a device similar to that described in the previous embodiment, except that the device further includes: a program storage module 231, configured to store the area information corresponding to the first filling sub-area into a highlight area information list after adjusting the color state of the second map in the second layer of the first filling sub-area from the opaque initial color state to the highlight color state.
In this embodiment, as an alternative embodiment, an apparatus similar to the apparatus described in the previous embodiment is provided, except that the second color filling program module includes:
a judging program unit, configured to judge whether the color state of the second map is the highlight color state according to the highlight region information list;
and the color filling program unit is used for adjusting the color state of the second mapping from the highlight color to a transparent state so as to display the third mapping if the color state of the second mapping is judged to be the highlight color state.
In this embodiment, as an optional embodiment, the determining program module includes:
a color block determining program unit, configured to receive a click operation on a color palette in the color filling window, and determine a first color block;
a region determining program unit, configured to determine the first filling sub-region according to the number information of the first color block; the color palette is provided with a plurality of color blocks with different colors, each color block is at least associated with one filling sub-area, and each color block also carries number information.
In this embodiment, as an alternative embodiment, there is provided an apparatus similar to the apparatus described in the previous embodiment, except that the apparatus further includes:
and the deleting program module is used for deleting the region information corresponding to the first filling sub-region from the highlight region information list after the color state of the second map is adjusted from the highlight color state to the transparent state so as to display the third map in the third map layer of the first filling sub-region.
In this embodiment, as an alternative embodiment, there is provided an apparatus similar to the apparatus described in the previous embodiment, except that the apparatus further includes:
And the second display program module is used for displaying the first filling sub-area as a highlighting color, storing the first filling sub-area into the first highlighting sub-area list, and deleting the color block corresponding to the first filling sub-area from the filling window.
In this embodiment, as an alternative embodiment, an apparatus similar to the apparatus described in the previous embodiment is provided, except that the second color filling program module includes:
the acquisition program unit is used for acquiring the first filling point coordinates generated by the clicking operation;
and the filling program unit is used for calling a flood filling algorithm to change the color state of the second map of the first map filling subarea into transparent color based on the first filling point coordinates so as to display a third map in a third map layer.
For each embodiment of the color filling device provided by the invention, the description is relatively simple as the color filling device is basically similar to the method embodiment, and the relevant parts are referred to in the part of the description of the method embodiment.
The invention also provides an electronic device, which comprises one or more processors; a memory; the memory has one or more executable program codes stored therein, and the one or more processors read the executable program codes stored in the memory to run a program corresponding to the executable program codes for performing the method of any one of the embodiments.
Fig. 8 is a schematic structural diagram of an embodiment of an electronic device according to the present invention, where any of the methods according to the embodiments of the present invention may be implemented, as shown in fig. 8, and as an alternative embodiment, the electronic device may include: the device comprises a shell 41, a processor 42, a memory 43, a circuit board 44 and a power circuit 45, wherein the circuit board 44 is arranged in a space surrounded by the shell 41, and the processor 42 and the memory 43 are arranged on the circuit board 44; a power supply circuit 45 for supplying power to the respective circuits or devices of the above-described electronic apparatus; the memory 43 is for storing executable program code; the processor 42 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 43 for performing the color filling method described in any of the foregoing embodiments.
The specific implementation of the above steps by the processor 42 and the further implementation of the steps by the processor 42 through the execution of the executable program code can be referred to as description of the first embodiment of the color filling method of the present invention, which is not repeated herein.
The electronic device exists in a variety of forms including, but not limited to: (1) a mobile communication device: such devices are characterized by mobile communication capabilities and are primarily aimed at providing voice, data communications. Such terminals include: smart phones (e.g., iPhone), multimedia phones, functional phones, and low-end phones, etc. (2) ultra mobile personal computer device: such devices are in the category of personal computers, having computing and processing functions, and generally also having mobile internet access characteristics. Such terminals include: PDA, MID, and UMPC devices, etc., such as iPad. (3) portable entertainment device: such devices may display and play multimedia content. The device comprises: audio and video playback modules (e.g., iPod), palm game consoles, electronic books, and smart toys and portable car navigation devices. (4) server: the configuration of the server includes a processor, a hard disk, a memory, a system bus, and the like, and the server is similar to a general computer architecture, but is required to provide highly reliable services, and thus has high requirements in terms of processing capacity, stability, reliability, security, scalability, manageability, and the like. (5) other electronic devices with data interaction function.
Still further embodiments of the present invention provide a computer-readable storage medium storing one or more programs executable by one or more processors to implement the color filling method according to any of the foregoing embodiments.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
For convenience of description, the above apparatus is described as being functionally divided into various units/modules, respectively. Of course, the functions of the various elements/modules may be implemented in the same piece or pieces of software and/or hardware when implementing the present invention.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (8)

1. A color filling method, the method comprising:
displaying a color filling window; a color filling area is arranged in the color filling window, and the color filling area comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first mapping is a boundary texture map with a hollowed-out area; the hollow areas form filling sub-areas in the filling areas;
receiving the operation of the filling area, and determining a first filling sub-area;
adjusting the color state of a second map in a second layer of the first fill sub-area from an opaque initial color state to a highlight color state; the second layer is positioned below the first layer;
receiving clicking operation on the first filling sub-area;
adjusting the color state of the second map from the highlighting color state to a transparent state to display a third map in a third layer of the first fill sub-area; the third mapping is a compound color effect graph with gradual change and textures;
after adjusting the color state of the second map in the second layer of the first fill sub-area from the opaque initial color state to the highlight color state, the method further comprises:
Storing the region information corresponding to the first filling sub-region into a highlight region information list;
the adjusting the color state of the second map from the highlighted color state to a transparent state to display a third map in a third layer of the first fill sub-area includes:
judging whether the color state of the second map is the highlight color state according to the highlight region information list;
if yes, the color state of the second mapping is adjusted from the highlight color to a transparent state, and therefore the third mapping is displayed.
2. The method of claim 1, wherein the receiving operating on the fill area, determining a first fill sub-area, comprises:
receiving clicking operation on a color palette in the color filling window, and determining a first color block;
determining the first filling sub-area according to the number information of the first color block; the color palette is provided with a plurality of color blocks with different colors, each color block is at least associated with one filling sub-area, and each color block also carries number information.
3. The method of claim 1, wherein after adjusting the color state of the second map from the highlighting color state to a transparent state to display a third map in a third layer of the first fill sub-area, the method further comprises:
And deleting the region information corresponding to the first filling sub-region from the highlight region information list.
4. A color filling device, the device comprising:
the display program module is used for displaying the color filling window; a color filling area is arranged in the color filling window, and the color filling area comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first mapping is a boundary texture map with a hollowed-out area; the hollow areas form filling sub-areas in the filling areas;
a determining program module, configured to receive an operation on the filling area, and determine a first filling sub-area;
a first color filling program module for adjusting a color state of a second map in a second layer of the first color filling sub-region from an opaque initial color state to a highlight color state; the second layer is positioned below the first layer;
a receiving program module, configured to receive a click operation on the first filling sub-area;
a second color filling program module for adjusting a color state of the second map from the highlight color state to a transparent state to display a third map in a third layer of the first color filling sub-region; wherein the third layer is located below the second layer; the third mapping is a compound color effect graph with gradual change color and texture;
The apparatus further comprises: a storage program module, configured to store the area information corresponding to the first filling sub-area into a highlight area information list after adjusting the color state of the second map in the second layer of the first filling sub-area from the opaque initial color state to the highlight color state;
the second color filling program module comprises:
a judging program unit, configured to judge whether the color state of the second map is the highlight color state according to the highlight region information list;
and the color filling program unit is used for adjusting the color state of the second mapping from the highlight color to a transparent state so as to display the third mapping if the color state of the second mapping is judged to be the highlight color state.
5. The apparatus of claim 4, wherein the determination program module comprises:
a color block determining program unit, configured to receive a click operation on a color palette in the color filling window, and determine a first color block;
a region determining program unit, configured to determine the first filling sub-region according to the number information of the first color block; the color palette is provided with a plurality of color blocks with different colors, each color block is at least associated with one filling sub-area, and each color block also carries number information.
6. The apparatus of claim 4, wherein the apparatus further comprises: and the deleting program module is used for deleting the region information corresponding to the first filling sub-region from the highlight region information list after the color state of the second map is adjusted from the highlight color state to the transparent state so as to display the third map in the third map layer of the first filling sub-region.
7. An electronic device, comprising:
one or more processors;
a memory;
the memory has one or more executable program codes stored therein, and the one or more processors read the executable program codes stored in the memory to run a program corresponding to the executable program codes for performing the method of any one of claims 1 to 3.
8. A computer readable storage medium storing one or more programs executable by one or more processors for implementing the method of any of claims 1 to 3.
CN201911390076.9A 2019-12-27 2019-12-27 Color filling method and device and electronic equipment Active CN111161378B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911390076.9A CN111161378B (en) 2019-12-27 2019-12-27 Color filling method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911390076.9A CN111161378B (en) 2019-12-27 2019-12-27 Color filling method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111161378A CN111161378A (en) 2020-05-15
CN111161378B true CN111161378B (en) 2023-10-17

Family

ID=70559257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911390076.9A Active CN111161378B (en) 2019-12-27 2019-12-27 Color filling method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111161378B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115937356A (en) * 2022-04-25 2023-04-07 北京字跳网络技术有限公司 Image processing method, apparatus, device and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7106343B1 (en) * 2003-04-08 2006-09-12 Carter Hickman Method and process for virtual paint application
JP2010074217A (en) * 2008-09-16 2010-04-02 Kawai Musical Instr Mfg Co Ltd Method and computer program for coloring image generation and recording medium
CN103500463A (en) * 2013-10-17 2014-01-08 北京大学 Visualization method for multilayer shape feature fusion on GPU (Graphics Processing Unit)
CN104765614A (en) * 2015-04-24 2015-07-08 广东小天才科技有限公司 Color filling processing method and device
CN105719332A (en) * 2016-01-20 2016-06-29 阿里巴巴集团控股有限公司 Colorful tween animation realization method and device
CN105989622A (en) * 2015-03-17 2016-10-05 贝洱工艺公司 Automated method and apparatus, preprocessing method, and computer readable medium
CN108128077A (en) * 2018-01-05 2018-06-08 昆山爱上艺术品有限公司 A kind of production method and system of color lump road network map handicraft picture
CN109785408A (en) * 2018-12-29 2019-05-21 北京金山安全软件有限公司 Map filling method and device and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI526979B (en) * 2012-11-05 2016-03-21 輝達公司 Method for sub-pixel texture mapping and filtering
US9569862B2 (en) * 2014-08-15 2017-02-14 Qualcomm Incorporated Bandwidth reduction using texture lookup by adaptive shading

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7106343B1 (en) * 2003-04-08 2006-09-12 Carter Hickman Method and process for virtual paint application
JP2010074217A (en) * 2008-09-16 2010-04-02 Kawai Musical Instr Mfg Co Ltd Method and computer program for coloring image generation and recording medium
CN103500463A (en) * 2013-10-17 2014-01-08 北京大学 Visualization method for multilayer shape feature fusion on GPU (Graphics Processing Unit)
CN105989622A (en) * 2015-03-17 2016-10-05 贝洱工艺公司 Automated method and apparatus, preprocessing method, and computer readable medium
CN104765614A (en) * 2015-04-24 2015-07-08 广东小天才科技有限公司 Color filling processing method and device
CN105719332A (en) * 2016-01-20 2016-06-29 阿里巴巴集团控股有限公司 Colorful tween animation realization method and device
CN108128077A (en) * 2018-01-05 2018-06-08 昆山爱上艺术品有限公司 A kind of production method and system of color lump road network map handicraft picture
CN109785408A (en) * 2018-12-29 2019-05-21 北京金山安全软件有限公司 Map filling method and device and electronic equipment

Also Published As

Publication number Publication date
CN111161378A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
CN109785408B (en) Mapping method and device and electronic equipment
CN103530018B (en) The method for building up and mobile terminal at widget interface in Android operation system
US8745511B2 (en) System and method for customizing layer based themes
CN112230909B (en) Method, device, equipment and storage medium for binding data of applet
CN111803945B (en) Interface rendering method and device, electronic equipment and storage medium
CN104866323B (en) Unlocking interface generation method and device and electronic equipment
CN106873886B (en) Control method and device for stereoscopic display and electronic equipment
WO2016197470A1 (en) Method and apparatus for setting background picture of unlocking interface of application program, and electronic device
CN109582311A (en) A kind of UI is edited in game method and device, electronic equipment, storage medium
CN111857878B (en) Skeleton screen page generation method and device, electronic equipment and storage medium
CN113379865A (en) Target object drawing method and system
CN114443945A (en) Display method of application icons in virtual user interface and three-dimensional display equipment
CN105320488A (en) Control method, display method and electronic device
CN111475089B (en) Task display method, device, terminal and storage medium
CN113209616A (en) Object marking method, device, terminal and storage medium in virtual scene
CN113318428A (en) Game display control method, non-volatile storage medium, and electronic device
CN111161378B (en) Color filling method and device and electronic equipment
CN111580808A (en) Page generation method and device, computer equipment and storage medium
CN113110907A (en) Map display method, device, equipment and readable storage medium
CN109542564A (en) View steering method, device, computer readable storage medium and computer equipment
CN106598374B (en) Color transition method and device for interface
US20120327109A1 (en) Method For Displaying Contacts In Instant Messenger And Instant Messaging Client
CN110991050B (en) CAD (computer-aided design) image stacking method and related product
CN113101647B (en) Information display method, device, equipment and storage medium
CN112270733A (en) AR expression package generation method and device, electronic equipment and storage medium

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
TR01 Transfer of patent right

Effective date of registration: 20231020

Address after: 100041 No. 2202, 1st floor, building 2, No. 7, Shixing street, Shijingshan District, Beijing (cluster registration)

Patentee after: Super magic cube (Beijing) Technology Co.,Ltd.

Address before: 100085 East District, Second Floor, 33 Xiaoying West Road, Haidian District, Beijing

Patentee before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

TR01 Transfer of patent right