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

Color filling method and device and electronic equipment Download PDF

Info

Publication number
CN111161378A
CN111161378A CN201911390076.9A CN201911390076A CN111161378A CN 111161378 A CN111161378 A CN 111161378A CN 201911390076 A CN201911390076 A CN 201911390076A CN 111161378 A CN111161378 A CN 111161378A
Authority
CN
China
Prior art keywords
color
filling
map
area
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.)
Granted
Application number
CN201911390076.9A
Other languages
Chinese (zh)
Other versions
CN111161378B (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

Images

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)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (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 composite 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 operation on the color filling area, and determining a first color filling subarea; adjusting the color state of a second map in a second map layer of the first color filling subregion from an opaque initial color state to a highlighted color state; the second layer is positioned below the first layer; receiving a clicking operation on the first color filling sub-area; 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 map layer of the first color filling sub-region; and the third layer is positioned below the second layer. The invention can be applied to the color filling game APP of the terminal equipment or the webpage color filling game, 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 invention relates to the technical field of computer image processing application, in particular to a color filling method, a color filling device and electronic equipment.
Background
The color filling book game is a game which abstracts the outlines of a plurality of colored paintings into a wire frame diagram, and a user fills colors in a closed area formed by the wire frame diagram to finish color filling works.
The inventor discovers that in the process of implementing the invention: existing color-filling book games can fill only a single color for each filled area, and the user selects a color palette to click on the filled area and then displays a solid color effect.
Disclosure of Invention
In view of this, embodiments of the present invention provide a color filling method and apparatus, and an electronic device, which can achieve a color filling effect of a composite color, thereby enhancing richness of color filling.
In a first aspect, an embodiment of the present invention provides a color filling method, where the method includes:
displaying a color filling window; a color filling area is arranged in the color filling window and comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first map is a boundary texture map with a hollow area; the hollow-out area forms a color filling sub-area in the color filling area;
receiving operation on the color filling area, and determining a first color filling subarea;
adjusting the color state of a second map in a second map layer of the first color filling subregion from an opaque initial color state to a highlighted color state; the second layer is positioned below the first layer;
receiving a clicking operation on the first color filling sub-area;
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 map layer of the first color filling sub-region; and the third layer is positioned 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 map layer of the first color-filling sub-region from the opaque initial color state to the highlight color state, the method further includes:
and storing the area information corresponding to the first color filling subarea into a highlight area information list.
With reference to the first aspect, the first implementation manner of the first aspect, and in a second implementation manner of the first aspect, 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 map layer of the first color-filling sub-region includes:
judging whether the color state of the second map is the highlight color state or not according to the highlight area information list;
and if so, adjusting the color state of the second map from the highlight color to a transparent state to display the third map.
With reference to the first aspect, the first or second implementation manner of the first aspect, in a third implementation manner of the first aspect, the receiving operates on the color-filling region, and determining a first color-filling sub-region includes:
receiving click operation on a palette in the color filling window, and determining a first color block;
determining the first color 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 color filling sub-area, and each color block also carries numbering information.
With reference to the first aspect, any one of the first to third implementation manners of the first aspect, in a fourth implementation manner of the first aspect, after 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 map layer of the first color-filling sub-region, the method further includes:
and deleting the area information corresponding to the first color filling subarea from the highlight area information list.
In a second aspect, an embodiment of the present invention provides a color filling apparatus, 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 comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first map is a boundary texture map with a hollow area; the hollow-out area forms a color filling sub-area in the color filling area;
the determining program module is used for receiving the operation on the color filling area and determining a first color filling subarea;
a first color filling program module, configured to adjust a color state of a second map in a second map layer of the first color filling sub-region from an opaque initial color state to a highlighted color state; the second layer is positioned below the first layer;
the receiving program module is used for receiving clicking operation on the first color filling sub-area;
a second color filling program module, configured to adjust the color state of the second map from the highlighted color state to a transparent state, so as to display a third map in a third map layer of the first color filling sub-region; and the third layer is positioned 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 adjusting the color state of the second map in the second map layer of the first color filling sub-area from the opaque initial color state to the highlight color state, and then storing the area information corresponding to the first color filling sub-area into a highlight area information list.
With reference to the second aspect, the first implementation manner of the second aspect, and in the 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 area information list;
and the color filling program unit is used for adjusting the color state of the second map from the highlight color to a transparent state to display the third map if the color state of the second map is judged to be the highlight color state.
With reference to the second aspect, the first or second implementation manner of the second aspect, and in a third implementation manner of the second aspect, the determining program module includes:
the color block determining program unit is used for receiving clicking operation on the color palette in the color filling window and determining a first color block;
the area determining program unit is used for determining the first color filling subarea 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 color filling sub-area, and each color block also carries numbering information.
With reference to the second aspect, in any one of the first to third embodiments of the second aspect, in a fourth embodiment of the second aspect,
the device further comprises: and the deleting program module is used for deleting the area information corresponding to the first color filling sub-area from the highlight area information list after the color state of the second map is adjusted from the highlight color state to a transparent state so as to display a third map in a third map layer of the first color filling sub-area.
In a third aspect, an embodiment of the present invention provides an electronic device, including: one or more processors;
a memory;
the memory stores one or more executable program codes, 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, so as to execute the method according to any one of the first aspect.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing one or more programs, which are executable by one or more processors, for implementing the method of any one of the first aspects.
According to the color filling method, the color filling device and the electronic equipment provided by the embodiment of the invention, the color filling window is displayed; a color filling area is arranged in the color filling window and comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first map is a boundary texture map with a hollow area; the hollow-out area forms a color filling sub-area in the color filling area; receiving operation on the color filling area, and determining a first color filling subarea; adjusting the color state of a second map in a second map layer of the first color filling subregion from an opaque initial color state to a highlighted color state; the second layer is positioned below the first layer; receiving a clicking operation on the first color filling sub-area; 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 map layer of the first color filling sub-region; and the third layer is positioned below the second layer. Since the third overlay can be any composite color effect graph with gradient colors, textures and the like, after color filling is carried out through the steps, the color filling effect graph with the composite colors is finally displayed in one color filling sub-area, and therefore the richness of color filling is enhanced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
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 flow chart of another embodiment of the color-filling method of the present invention;
FIG. 4 is a schematic diagram of 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 of the filling effect of a specific color-filling case in FIG. 4;
FIG. 6 is a block diagram of an embodiment of a color filling apparatus according to the present invention;
FIG. 7 is a block diagram of another embodiment of a color-filling apparatus according to the present invention;
fig. 8 is a schematic structural diagram of an embodiment of an electronic device according to 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 only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present 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 of the present embodiment can be applied to a color filling game APP or a web page color filling game on a terminal device, such as 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 computer or 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 comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first map is a boundary texture map with a hollow area; as shown in fig. 3 or fig. 4, wherein the hollow area constitutes the color-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 webpage game open interface window. The color filling area is generally a closed area or a semi-closed area, and one color filling area may further include a plurality of color filling sub-areas, and each color filling sub-area has a plurality of image layers.
It can be understood that, because the first map has the hollow-out area, the portion of the second map located on the second map layer under the first map layer in the hollow-out area can be displayed; the final filling effect in this embodiment is a composite color filling effect formed by fusing the pattern or the gradient color map of the lowermost layer and the boundary texture map of the first layer; the term "blending" herein means that two or more patterns or color maps are seamlessly joined into a whole, and the color filling of the composite color means a mixed color formed by splicing or superimposing two or more patterns or colors, for example, the first map is a butterfly contour and a meridian texture structure outlined by a line zebra texture map, and the third map is a red, blue and yellow gradient color map, and according to the scheme of this embodiment, an overall mixed color effect formed by partially overlapping or splicing the zebra texture and the red, blue and yellow gradient map is finally presented.
The first layer can be understood as a color filling sub-region which can be seen when a user opens a color filling game interface, the first map is a boundary outline for providing filling, for example, a main outline of an animal or a plant, and exemplarily, as shown in fig. 4 or 5, when the butterfly is filled, the overall outline and the veins of the body divide the butterfly into a plurality of filling sub-regions, and the first layer is a vein line graph which displays the outline of the butterfly and the veins of the body; it will be appreciated that the lines may be selected from a line texture map of different colours. For another example: when a leaf is filled, the outline and veins of the leaf divide the whole leaf into a plurality of filling sub-regions, and the first image layer is a line graph displaying 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 number of drawing layers of the color filling sub-area, the mapping information corresponding to each drawing layer and the area or the boundary of the color filling sub-area; further comprising: and the color block number corresponding to each color filling subarea. 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 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 number of a person.
And 120, receiving the operation on the color filling area, and determining a first color filling subarea.
In this embodiment, the user may click one of the color-filling sub-regions, and the system may determine one of the map-filling sub-regions according to the click trigger instruction; or a color filling trigger button can be arranged in the map filling window, and after a user clicks the trigger button, the system can determine a map filling sub-area according to a trigger instruction.
Step 130, adjusting the color state of the second map in the second map layer of the first color filling sub-area from an opaque initial color state to a highlight color state; the second layer is positioned below the first layer;
the second map is a map with color state changes, and the color states comprise an opaque initial color, a highlight color and a transparent color.
It can be understood that, in some schemes for implementing a composite color filling effect based on multiple image layers, there are at least four image layers, each image layer corresponds to a corresponding map, where the third layer is a highlight layer, after a user clicks a map filling sub-region, that is, the second image layer, the highlight layer is displayed, that is, the map filling sub-region is highlighted, and then the highlight layer is operated, and the fourth layer of map is displayed, that is, color filling is completed.
In this embodiment, the second map is set to be a map with a color state change, including an opaque initial color state, a highlighted color state, and a transparent state, information required for the second map layer, the highlighted layer, and the transparent processing is combined into information included in one map layer, and after a user clicks one map filling sub-region, the color state of the second map is changed from the opaque color state to the highlighted color state, so that it is not necessary to specially set the second map layer to the map layer presenting the final effect map, that is, the highlighted layer in the above example, and thus the occupation of the memory of the color filling program can be reduced.
And 140, receiving a click operation on the first color filling sub-area.
After the first color-filling sub-region is displayed in the highlighted color state, that is, the first color-filling sub-region is activated, the user clicks the sub-region again, and the system executes step 150 after receiving the operation instruction.
Step 150, 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 map layer of the first color-filling sub-area; and the third layer is positioned below the second layer.
Specifically, the color Alpha value of the sub-region is set to be 0, the sub-region is automatically subjected to transparentization treatment, namely the color state of the second map is adjusted from the highlight color state to a transparent state, the pattern of the third map layer can be displayed in the sub-region, and meanwhile, the third map and the first map are butted and fused to form a composite color filling effect. The diversified display effect graph of the filling color is realized.
According to the color filling method, the color filling device and the electronic equipment provided by the embodiment of the invention, the color filling window is displayed; a color filling area is arranged in the color filling window and comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first map is a boundary texture map with a hollow area; the hollow-out area forms a color filling sub-area in the color filling area; receiving operation on the color filling area, and determining a first color filling subarea; adjusting the color state of a second map in a second map layer of the first color filling subregion from an opaque initial color state to a highlighted color state; the second layer is positioned below the first layer; receiving a clicking operation on the first color filling sub-area; 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 map layer of the first color filling sub-region; and the third layer is positioned below the second layer. Since the third overlay can be any composite color effect graph with gradient colors, textures and the like, after color filling is carried out through the steps, the color filling effect graph with the composite colors is finally displayed in one color filling sub-area, and therefore the richness of color filling is enhanced.
In addition, the second map of the second map layer is set as a map with color state change, that is, 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 the second map layer does not need to be specially set to the map layer between the maps with the final effect, such as the highlight layer map layer, and the occupation of the color filling program memory can be reduced.
Referring to fig. 2, in order to mark which color-filling sub-regions have been displayed as highlight colors, and to facilitate a distinctive color-filling process, in step 130, after adjusting the color state of the second map in the second map layer of the first color-filling sub-region from the opaque initial color state to the highlight color state, the method further includes:
and 131, storing the area information corresponding to the first color filling subarea into a highlight area information list.
Among them, stored in the Highlight sub-area List (Highlight List) are color-filled sub-areas that have been displayed as Highlight color states or Highlight patterns. The color filling sub-area of the highlight color state or the highlight pattern is an area which can be subjected to pixel filling processing, and is similar to the area in the activated state; for example, may be a rasterized (tile) region. Thus, the transparent treatment can be carried out to display the final effect picture.
Referring to fig. 3, in other embodiments, the adjusting 150 the color state of the second map from the highlighted color state to a transparent state to display a third map in a third map layer of the first color-filling sub-region includes:
step 150A, according to the highlight region information list, judging whether the color state of the second map is the highlight color state;
if yes, go to step 150B, adjust the color state of the second map from the highlighted color state to a transparent state, so as to display the third map.
In this way, according to the highlight area information list, when it is detected that the first color-filling sub-area clicked by the user is a sub-area in the highlight area information list, the color of the second chartlet is directly transparently processed, and a third chartlet is displayed, so that the color filling of the sub-area is completed.
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 also carries number information.
Step 120, receiving the operation on the color filling area, and determining a first color filling sub-area, including:
and receiving click operation on the palette in the color filling window, and determining a first color block.
The color blocks are used as trigger buttons for triggering the system to enter a color filling state and determining a certain color filling sub-area, and can be presented or arranged in any form, for example, the color filling sub-area can be arranged in a color filling window in the form of buttons, Arabic numerals, letters and the like.
And determining the first color filling subarea according to the number information of the first color block.
And after the system determines the number of the color block, the corresponding first color filling sub-area is determined according to the color filling sub-area information associated with the color block, and the first color filling sub-area is highlighted.
In order to avoid that the system repeats the color filling step for the sub-area which has finished color filling by mistake, and the color filling efficiency is influenced. Specifically, in step 150, after the color state of the second map is adjusted from the highlighted color state to a transparent state to display a third map in a third map layer of the first color-filling sub-region, the method further includes: and deleting the area information corresponding to the first color filling subarea from the highlight area information list.
Therefore, after the color filling of one color filling subarea is finished, the color filling subarea is deleted from the highlight area information list, so that the task amount of filling processing can be reduced, and the color filling efficiency is improved.
In other embodiments, after the step 150 of 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 map layer of the first color-filling sub-region, the method further includes: and deleting the color blocks corresponding to the first map filling sub-area. Therefore, after the color block is deleted from the color filling window, the user can be prompted to finish all color filling of all the sub-areas of the filled map corresponding to the color block, if the color block is not deleted, the color block still exists in the color filling window, and the user can know whether the color filling of a certain sub-area is omitted or not according to the color block.
Receiving a clicking operation on the first color filling sub-area;
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 map layer of the first color-filling sub-region includes:
generating a first filling point coordinate according to the click of the user on the first map filling sub-area;
and calling a flood filling algorithm to change the color state of the second map in the first map filling sub-area into transparent color based on the first filling point coordinates so as to display a third map in a third map layer.
To help understand the technical solution and technical effects of the present embodiment, the following description is made with reference to the accompanying drawings and a specific color-filling game scene: a user opens a color filling game, and displays a color filling game window to the user, as shown in fig. 4, the color filling game window includes a color filling area and a control area, wherein the color filling area includes a plurality of white (the initialized color state of the second layer, and may be other colors) color filling sub-areas partitioned by a line boundary texture map (the map of the first layer), and the control area includes a plurality of control buttons; after a user triggers a color filling game through a control area to start, a system can determine a first color filling sub-area according to a trigger instruction of the user, the color state of a second map in a second map layer of the first color filling sub-area is adjusted from an opaque initial color state to a highlight color state, and the user clicks the first color filling sub-area again; adjusting the color state of the second map from the highlighted color state to a transparent state (which cannot be shown due to limited contents displayed by the two-dimensional map) to display a third map in a third map layer of the first color-filling sub-region and display a final effect map of the sub-region, and repeating the above steps to complete filling of all color-filling sub-regions of the color-filling region, wherein one color-filling solid is shown in fig. 5. Setting a plurality of color filling layers in the color filling sub-region, wherein a first map in a first map layer is provided with a hollow region, and a second map in a second map layer is a map with color state change and comprises an opaque initial color, a highlight color and a transparent color; the third paste chart can be set to have a gradual color filling effect, a texture effect, a three-dimensional reality effect and the like; after the color state of the second map in the first map filling sub-area 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 fusion of the first map layer and the third map in the third map layer can be realized, and the diversified display effect of the filling colors is realized.
It should be noted that the numbers shown in the fill sub-regions in fig. 5 are only for illustrating that each fill sub-region may have different fill effects, and the actual color filling is not the displayed numbers but the fill effects corresponding to the numbers.
In addition, in this embodiment, by using the above method, the second map of the second map layer is set as a map with a color state change, and information required by transparency processing from the second map layer in some games to a map layer between maps showing final effects, such as a highlight layer, may be merged into information included in one map layer, and it is not necessary to specially set the second map layer to a map layer between maps showing final effects, such as a highlight layer, so that the memory of a color filling program may be reduced.
In this embodiment, it can be understood that, according to the above method, different colors or patterns are set for the maps in different image layers, and multiple optional composite color filling effect maps can be provided
In this embodiment, as an optional embodiment, after the step 110 of displaying the map-filling window, the method further includes: the second map-filling sub-area is automatically displayed in a highlighted color state.
It will be appreciated that after a user opens a map-filling game and enters a map-filling window, a certain map-filling sub-area will be displayed in a highlighted color state by default in order to remind or guide the user for initial use to quickly complete color filling. After the user clicks the map filling sub-area, the map filling sub-area is automatically transparent, the current highlight color of the second map is changed into a transparent state, and the final effect map is displayed.
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 map layer of the first color-filling sub-region 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 chartlet of the first color filling sub-area based on the first filling point coordinate, so that the color state of the second chartlet is adjusted from the highlight color state to a transparent state.
The flood filling algorithm is the prior art, and is not described herein any more, and specifically, a four-neighborhood filling method (filling points in diagonal directions are not considered), an eight-neighborhood filling method (filling points in diagonal directions are considered), or a scan line-based filling method may be adopted.
It can be understood that, with the color filling scheme provided in this embodiment, the user only needs to click a certain filling sub-region, and then can automatically invoke the flood filling algorithm to perform filling processing, so as to present a preset filling effect.
In this embodiment, in order to fully explain the embodiments of the present invention, a color book filling game developed by the inventor of the present application based on the Unity engine is described as follows: .
1-5, a developer will create 3 Sprite fairings in the Unity engine, which are used to draw two-dimensional graphics objects; and correspondingly setting 3 levels, wherein each Sprite corresponds to one level, obtaining a line texture graph used as a contour of a filling area, drawing the line texture graph on a first graph layer, obtaining a second graph with color state change, drawing the second graph on a second graph layer, and drawing a gradient effect graph on a third graph layer, wherein the color state comprises an opaque initial color and a grid texture (one of highlight colors).
And creating filling information on the first image layer, wherein the filling information comprises a number corresponding to a filling sub-region, 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 color filling sub-region and/or the boundary coordinate value of the color filling sub-region. The filling sub-regions with the same filling effect can be provided with the same identifier, for example, the same arabic number, and a user can click a number on the operation interface, so that the corresponding color-filling sub-region can be highlighted.
A user opens client-side game software and displays a color filling window, wherein the color filling window comprises a color filling area and an operation 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 hollow area, wherein the hollow area forms the color filling sub-area, and a second map partially positioned on a second map layer is displayed in the hollow area, for example, the second map is a pure white map; the control area is used for triggering the color filling, and the control area can be provided with the color blocks or set as the identification blocks.
The method comprises the steps that a user clicks a color block in an operation area, a system is triggered to start calling a flood filling algorithm to fill color in a color filling sub-area, a second chartlet corresponding to the color filling sub-area is changed from opaque initial color to highlight color to be displayed, area information corresponding to the highlight sub-area is stored in a highlight area information list, and when the user clicks the color filling sub-area again, whether the color state of the second chartlet in the color filling sub-area is in a highlight color state or not is judged according to the highlight area information list; if yes, the system indicates that the highlight color is filled, the system automatically performs transparency processing on the sub-area, and displays the map of the third map layer to show the gradient composite color filling effect map formed by fusing the first map and the third map.
The game color filling book developed based on the Unity engine provides a specific color filling scheme, changes the monotonicity of the existing single-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 chart, but also can present other arbitrary effect charts such as a complex gradient chart, a texture chart and the like, and brings better color filling game experience for users; further, the image layers of the color filling scheme are 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 apparatus according to the present invention, as shown in fig. 6, the color filling apparatus of the present embodiment can be applied to a color filling game APP or a web page color filling game on a terminal device, such as a color filling book, especially a color filling game developed based on a Unity engine; the colorful color filling effect is realized, and the color filling effect is not limited to a pure color filling effect; the terminal equipment comprises a mobile phone, a computer, a game machine, a tablet computer or a learning machine and the like. The device comprises: a display program module 210 for displaying the color filling window; a color filling area is arranged in the color filling window and comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first map is a boundary texture map with a hollow area; the hollow-out area forms a color filling sub-area in the color filling area; a determining program module 220, configured to receive an operation on the color filling region, and determine a first color filling sub-region; a first color filling program module 230, configured to adjust a color state of a second map in a second map layer of the first color filling sub-region from an opaque initial color state to a highlighted 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 color-filling sub-region; a second color filling program module 250, configured to adjust the color state of the second map from the highlighted color state to a transparent state, so as to display a third map in a third map layer of the first color filling sub-region; and the third layer is positioned 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, which are not described herein again and may be referred to each other.
Referring to fig. 7, in this embodiment, as an alternative embodiment, there is provided an apparatus similar to that described in the previous embodiment, except that the apparatus further comprises: a storing program module 231, configured to, after the color state of the second map in the second layer of the first color-filling sub-region is adjusted from the opaque initial color state to the highlight color state, store the region information corresponding to the first color-filling sub-region into a highlight region information list.
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 area information list;
and the color filling program unit is used for adjusting the color state of the second map from the highlight color to a transparent state to display the third map if the color state of the second map is judged to be the highlight color state.
In this embodiment, as an optional embodiment, the determining program module includes:
the color block determining program unit is used for receiving clicking operation on the color palette in the color filling window and determining a first color block;
the area determining program unit is used for determining the first color filling subarea 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 color filling sub-area, and each color block also carries numbering information.
In this embodiment, as an alternative embodiment, a device similar to the device described in the previous embodiment is provided, except that the device further includes:
and the deleting program module is used for deleting the area information corresponding to the first color filling sub-area from the highlight area information list after the color state of the second map is adjusted from the highlight color state to a transparent state so as to display a third map in a third map layer of the first color filling sub-area.
In this embodiment, as an alternative embodiment, a device similar to the device described in the previous embodiment is provided, except that the device further includes:
and the second display program module is used for displaying the first color filling sub-area as a highlight color if the first color filling sub-area is in the highlight color, and deleting the color block corresponding to the first color filling sub-area from the color filling window after the first color filling sub-area is stored in the first highlight sub-area list.
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 a first filling point coordinate generated by the click operation;
and the filling program unit is used for calling a flood filling algorithm and changing the color state of the second map in the first map filling sub-area into transparent color based on the first filling point coordinate so as to display the third map in the third map layer.
For each embodiment of the color filling device provided by the invention, the description is simple because the color filling device is basically similar to the method embodiment, and relevant points can be referred to partial description of the method embodiment.
A further embodiment of the present invention provides an electronic device, including one or more processors; a memory; the memory stores one or more executable program codes, 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 executing the method of any one of the embodiments.
Fig. 8 is a schematic structural diagram of an embodiment of an electronic device of the present invention, which may implement the method according to any one of the embodiments of the present invention, as shown in fig. 8, 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 inside a space enclosed 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 each circuit or device of the electronic apparatus; the memory 43 is used 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, so as to execute the color filling method described in any one of the above embodiments.
For the specific execution process of the above steps by the processor 42 and the further steps executed by the processor 42 by running the executable program code, reference may be made to the description of the first embodiment of the color filling method of the present invention, which is not described herein again.
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 communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others. (2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads. (3) A portable entertainment device: such devices can display and play multimedia content. This type of device comprises: audio and video playing modules (such as an iPod), handheld game consoles, electronic books, and intelligent toys and portable car navigation devices. (4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service. (5) And other electronic equipment with data interaction function.
Yet another embodiment of the present invention provides a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the color-filling method of any one of the preceding embodiments.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations of the invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may also be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A color-filling method, characterized in that the method comprises:
displaying a color filling window; a color filling area is arranged in the color filling window and comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first map is a boundary texture map with a hollow area; the hollow-out area forms a color filling sub-area in the color filling area;
receiving operation on the color filling area, and determining a first color filling subarea;
adjusting the color state of a second map in a second map layer of the first color filling subregion from an opaque initial color state to a highlighted color state; the second layer is positioned below the first layer;
receiving a clicking operation on the first color filling sub-area;
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 map layer of the first color filling sub-region; and the third layer is positioned below the second layer.
2. The method of claim 1, wherein after adjusting the color state of the second map in the second map layer of the first color-filling sub-region from the opaque initial color state to the highlight color state, the method further comprises:
and storing the area information corresponding to the first color filling subarea into a highlight area information list.
3. The method of claim 2, wherein 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 map layer of the first color-filling sub-region comprises:
judging whether the color state of the second map is the highlight color state or not according to the highlight area information list;
and if so, adjusting the color state of the second map from the highlight color to a transparent state to display the third map.
4. The method of claim 3, wherein the receiving operates on the color-filling region to determine a first color-filling subregion, comprising:
receiving click operation on a palette in the color filling window, and determining a first color block;
determining the first color 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 color filling sub-area, and each color block also carries numbering information.
5. The method of claim 2, wherein 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 map layer of the first color-filling subregion, the method further comprises:
and deleting the area information corresponding to the first color filling subarea from the highlight area information list.
6. A color-filling apparatus, characterized in that the apparatus comprises:
the display program module is used for displaying the color filling window; a color filling area is arranged in the color filling window and comprises a plurality of color filling sub-areas; displaying a first map in a first map layer of the color filling area; the first map is a boundary texture map with a hollow area; the hollow-out area forms a color filling sub-area in the color filling area;
the determining program module is used for receiving the operation on the color filling area and determining a first color filling subarea;
a first color filling program module, configured to adjust a color state of a second map in a second map layer of the first color filling sub-region from an opaque initial color state to a highlighted color state; the second layer is positioned below the first layer;
the receiving program module is used for receiving clicking operation on the first color filling sub-area;
a second color filling program module, configured to adjust the color state of the second map from the highlighted color state to a transparent state, so as to display a third map in a third map layer of the first color filling sub-region; and the third layer is positioned below the second layer.
7. The apparatus of claim 6, further comprising: and the storage program module is used for adjusting the color state of the second map in the second map layer of the first color filling sub-area from the opaque initial color state to the highlight color state, and then storing the area information corresponding to the first color filling sub-area into a highlight area information list.
8. The apparatus of claim 7, wherein 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 area information list;
and the color filling program unit is used for adjusting the color state of the second map from the highlight color to a transparent state to display the third map if the color state of the second map is judged to be the highlight color state.
9. The apparatus of claim 8, wherein the determining program module comprises:
the color block determining program unit is used for receiving clicking operation on the color palette in the color filling window and determining a first color block;
the area determining program unit is used for determining the first color filling subarea 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 color filling sub-area, and each color block also carries numbering information.
10. The apparatus of claim 7, further comprising: and the deleting program module is used for deleting the area information corresponding to the first color filling sub-area from the highlight area information list after the color state of the second map is adjusted from the highlight color state to a transparent state so as to display a third map in a third map layer of the first color filling sub-area.
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 true CN111161378A (en) 2020-05-15
CN111161378B 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)

Cited By (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 (10)

* 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)
US20140125687A1 (en) * 2012-11-05 2014-05-08 Nvidia Corporation Method for sub-pixel texture mapping and filtering
CN104765614A (en) * 2015-04-24 2015-07-08 广东小天才科技有限公司 Color filling processing method and device
US20160048980A1 (en) * 2014-08-15 2016-02-18 Qualcomm Incorporated Bandwidth reduction using texture lookup by adaptive shading
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

Patent Citations (10)

* 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
US20140125687A1 (en) * 2012-11-05 2014-05-08 Nvidia Corporation Method for sub-pixel texture mapping and filtering
CN103500463A (en) * 2013-10-17 2014-01-08 北京大学 Visualization method for multilayer shape feature fusion on GPU (Graphics Processing Unit)
US20160048980A1 (en) * 2014-08-15 2016-02-18 Qualcomm Incorporated Bandwidth reduction using texture lookup by adaptive shading
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

Cited By (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

Also Published As

Publication number Publication date
CN111161378B (en) 2023-10-17

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
CN105976417B (en) Animation generation method and device
CN109901894B (en) Progress bar image generation method and device and storage medium
US7536645B2 (en) System and method for customizing layer based themes
CN107833277A (en) A kind of Panoramic Warping scene edit methods based on unity3D
CN107644067A (en) A kind of cross-platform indoor map display methods of two three-dimensional integratedization
CN105528207A (en) Virtual reality system, and method and apparatus for displaying Android application images therein
US7934168B2 (en) Storage medium storing program and information processing apparatus
CN111857878B (en) Skeleton screen page generation method and device, electronic equipment and storage medium
CN114443945A (en) Display method of application icons in virtual user interface and three-dimensional display equipment
CN112967367A (en) Water wave special effect generation method and device, storage medium and computer equipment
CN112274934A (en) Model rendering method, device, equipment and storage medium
CN113318428A (en) Game display control method, non-volatile storage medium, and electronic device
CN111161378B (en) Color filling method and device and electronic equipment
JP5661835B2 (en) Terminal device, display processing method, and display processing program
CN109542564A (en) View steering method, device, computer readable storage medium and computer equipment
CN108255562B (en) Page jump method and device
CN113379865A (en) Target object drawing method and system
CN106598374B (en) Color transition method and device for interface
CN104881230A (en) Method and equipment for performing man-machine interaction on touch control terminal
CN105892663A (en) Information processing method and electronic device
CN114419207A (en) Information processing method, information processing apparatus, readable storage medium, and electronic apparatus
CN110787452B (en) Game application starting method and device and computer equipment
CN113101647B (en) Information display method, device, 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