CN112948029A - Page adjusting method and device, computer equipment and computer readable storage medium - Google Patents

Page adjusting method and device, computer equipment and computer readable storage medium Download PDF

Info

Publication number
CN112948029A
CN112948029A CN201911174005.5A CN201911174005A CN112948029A CN 112948029 A CN112948029 A CN 112948029A CN 201911174005 A CN201911174005 A CN 201911174005A CN 112948029 A CN112948029 A CN 112948029A
Authority
CN
China
Prior art keywords
value
page
point
preset parameter
color
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
CN201911174005.5A
Other languages
Chinese (zh)
Other versions
CN112948029B (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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN201911174005.5A priority Critical patent/CN112948029B/en
Publication of CN112948029A publication Critical patent/CN112948029A/en
Application granted granted Critical
Publication of CN112948029B publication Critical patent/CN112948029B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a page adjusting method, a page adjusting device, computer equipment and a computer readable storage medium. The page adjusting method comprises the following steps: receiving brightness adjustment operation of a page; determining a change value of a preset parameter corresponding to the brightness adjustment operation; respectively calculating a red component value, a green component value and a blue component value according to the change value of the preset parameter, the corresponding relation between the preset parameter and the red component, the corresponding relation between the preset parameter and the green component and the corresponding relation between the preset parameter and the blue component; superposing the red component value, the green component value and the blue component value to obtain a color value; and adjusting the brightness of the page according to the color value. By the invention, the display effect can be improved.

Description

Page adjusting method and device, computer equipment and computer readable storage medium
Technical Field
The present invention relates to the field of page adjustment technologies, and in particular, to a page adjustment method, an apparatus, a computer device, and a computer-readable storage medium.
Background
With the popularization of mobile terminals, more and more daily life needs can be realized through third-party application programs on the mobile terminals, so that the interactive experience between users and application program pages is improved, the application program pages can be displayed more friendly, and the method is also an important research direction at present.
In the prior art, when adjusting the page brightness of an application program, there are generally the following two adjustment methods: firstly, adjusting the backlight brightness of a terminal according to the page brightness change requirement; and secondly, adjusting the color value of the page according to the requirement of the change of the page brightness. The inventor finds that for the first adjustment mode, the display of other application programs on the terminal can be influenced after the page brightness is adjusted, and the adjustment mode is complex; for the second adjustment mode, the effect is poor after the page color value is adjusted.
Therefore, it is an urgent technical problem to be solved in the art to provide a page adjustment method, device, computer device and computer readable storage medium to further improve the page display effect.
Disclosure of Invention
The invention aims to provide a page adjusting method, a page adjusting device, computer equipment and a computer readable storage medium, which are used for solving the technical problem of poor page display effect in the prior art.
In one aspect, the present invention provides a page adjusting method for achieving the above object.
The page adjusting method comprises the following steps: receiving brightness adjustment operation of a page; determining a change value of a preset parameter corresponding to the brightness adjustment operation; respectively calculating a red component value, a green component value and a blue component value according to the change value of the preset parameter, the corresponding relation between the preset parameter and the red component, the corresponding relation between the preset parameter and the green component and the corresponding relation between the preset parameter and the blue component; superposing the red component value, the green component value and the blue component value to obtain a color value; and adjusting the brightness of the page according to the color value.
Further, the page comprises a background layer and an image layer, and the step of setting the brightness of the page according to the color values comprises the following steps: and setting the brightness of the background image layer according to the color value.
Further, the preset parameter is a geometric parameter of an image in the image layer, and the page adjusting method further includes: and adjusting the image in the image layer according to the change value of the geometric parameter.
Further, the preset parameter is an angle, when a variation value of the preset parameter is from 0 degree to 180 degrees, the brightness of the page is from the first color value to the second color value, and when the variation value of the preset parameter is from 180 degrees to 360 degrees, the brightness of the page is from the second color value to the first color value, wherein the first color value and the second color value are different color values.
Further, the red component value R, the green component value G, and the blue component value B are respectively calculated using the following formulas: r ═ a θ2,G=b*θ2,B=c*θ2(ii) a Where θ is a variation value of a preset parameter, and a ═ R0/1802,b=G0/1802,c=B0/1802,R0、G0、B0The red color component value, the green color component value and the blue color component value in the second color value are sequentially arranged.
Further, the brightness adjustment operation includes a selection of a point A (x) on the pagea,ya) Slide along the curve to point B (x)b,yb) The change value theta of the preset parameter corresponding to the first adjustment operation is determined by adopting the following formula: θ ═ arcsin (| BB)1|/|BO|)-arcsin(|AA1I/| AO |); wherein, the point O is a preset central point, and the coordinate of the point O is (x)o,yo) The coordinate of the point B1 is (x)o-xb,yo-yb) The coordinate of the point A1 is (x)o-xa,yo–ya),|BB1| is the distance from point B to point B1, | BO | is the distance from point B to point O, | AA1| is the distance from point a to point a1, | AO | is the distance from point a to point O.
Further, the brightness adjustment operation comprises a second adjustment operation of sliding from the point C to the point D along the first direction on the page, and the change value θ of the preset parameter corresponding to the second adjustment operation is determined by using the following formula: θ 360 × CD/L0; where | CD | is a distance from the point C to the point D, and L0 is a length of the display screen displaying the page in the first direction.
Further, the image in the image layer is a time compass, the geometric parameter is a rotation angle of the time compass, and time marks representing 0-24 hours are equally divided by 0-360 degrees of the time compass; the step of adjusting the image in the image layer according to the variation value of the preset parameter comprises the following steps: the time compass is rotated according to the variation value of the rotation angle.
In another aspect, the present invention provides a page adjusting apparatus for achieving the above object.
The page adjusting device includes: the receiving module is used for receiving the brightness adjustment operation of the page; the first processing module is used for determining a change value of a preset parameter corresponding to the brightness adjustment operation; the second processing module is used for respectively calculating a red component value, a green component value and a blue component value according to the change value of the preset parameter, the corresponding relation between the preset parameter and the red component, the corresponding relation between the preset parameter and the green component and the corresponding relation between the preset parameter and the blue component; the third processing module is used for superposing the red component value, the green component value and the blue component value to obtain a color value; and the adjusting module is used for adjusting the brightness of the page according to the color value.
To achieve the above object, the present invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
To achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above method.
The page adjusting method, the device, the computer equipment and the computer readable storage medium provided by the invention have the advantages that after the brightness adjusting operation is received, the change value of the preset parameter is mapped, then the red component value, the green component value and the blue component value are respectively obtained through calculation according to the corresponding relation between the preset parameter and the red component, the corresponding relation between the preset parameter and the green component and the corresponding relation between the preset parameter and the blue component, finally the three primary color component values are superposed to be the color value, the page is adjusted, the sizes of different color component values can be independently calculated when the color value is adjusted, so that different colors can be independently controlled, the effect of flexibly controlling the ratio of the three primary colors in the color value is achieved, the purpose of not changing the color system of the page while the brightness is changed is further achieved, and the page display effect is improved.
Drawings
Fig. 1 is a flowchart illustrating steps of a page adjustment method according to an embodiment of the present invention;
fig. 2 is a diagram illustrating a page brightness change effect in the page adjustment method according to the embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a method for adjusting a page according to a change value of a preset parameter determined according to a page brightness operation in an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating another method for determining a variation value of a preset parameter according to a page brightness operation in the page adjustment method according to the embodiment of the present invention;
FIG. 5 is a schematic diagram of page rendering according to an embodiment of the present invention;
fig. 6 is a block diagram of a page adjusting apparatus according to a second embodiment of the present invention;
fig. 7 is a hardware configuration diagram of a computer device according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. 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.
In one method, adjusting the page brightness is achieved by adjusting the page color value, specifically, the page initial color value is set as XXYZZ, wherein XX, YY and ZZ are hexadecimal numbers corresponding to a red component value, a green component value and a blue component value respectively, when the page brightness needs to be adjusted, the page initial color value XXYZZ is multiplied by an adjusting coefficient to obtain an adjusted color value, and the page color value is set as the adjusted color value to achieve the page brightness adjustment. The inventor finds that after the brightness is changed, the color system of the page color is changed at the same time, and the display effect of the page is influenced.
In order to solve the problem, the invention provides a page adjusting method, a page adjusting device, a computer device and a computer readable storage medium, wherein a user can adjust the page brightness of an application program running on a terminal through an adjusting operation, after the application program displays a page, when the terminal receives the page brightness adjusting operation of the user, the page brightness operation is converted into a change value of a preset parameter, then a red component value, a green component value and a blue component value are calculated by using the change value of the preset parameter according to the corresponding relation between the preset parameter and a red component, a green component and a blue component respectively, and then the red component value, the green component value and the blue component value are superposed to obtain a color value so as to adjust the page. It can be seen that, in the present invention, the red component, the green component and the blue component in the color value are respectively and independently calculated, and during calculation, by setting the corresponding relationship between the variation value and the difference between the red component, the green component and the blue component, the size of the component value of different colors can be independently calculated when the color value is adjusted, so that different colors can be independently controlled, the effect of flexibly controlling the ratio of three primary colors in the color value is achieved, the purpose of not changing the color system of the page color while changing the brightness change is further achieved, and the page display effect is improved.
The following detailed description will be provided for specific embodiments of a page adjusting method, a page adjusting device, a computer device, and a computer-readable storage medium according to the present invention.
Example one
A first embodiment of the present invention provides a page adjustment method, which is applicable to page adjustment of an application program, and also applicable to other picture editing scenes, and is applicable to a scene for dynamically adjusting page brightness, and by using the method, different colors in color values corresponding to brightness can be independently controlled, so as to achieve an effect of flexibly controlling a ratio of three primary colors in the color values, specifically, fig. 1 is a flowchart of steps of the page adjustment method provided in the first embodiment of the present invention, and as shown in fig. 1, the page adjustment method provided in the first embodiment includes steps S101 to S105.
Step S101: and receiving the brightness adjustment operation of the page.
The user can change the brightness of the page by performing a brightness adjustment operation on the terminal on the basis of the initial page. The brightness adjustment operation may be predefined as any operation, such as a sliding operation in a horizontal direction, a vertical direction, or any other direction of the terminal display screen, a curved sliding operation on the terminal display screen, or a touch operation on the terminal display screen.
Step S102: and determining a change value of a preset parameter corresponding to the brightness adjustment operation.
Optionally, according to the predefined characteristics of the brightness adjustment operation, parameters that can distinguish different brightness adjustment operations are preset, for example, the brightness adjustment operation is a sliding operation, and the preset parameters may be parameters such as a sliding distance or a sliding angle; when the brightness adjustment operation is a touch operation, the preset parameter may be touch time; when the brightness adjustment operation is a pressing operation, the preset parameter may be a pressing force degree or the like. In this step, a variation value of the corresponding preset parameter is determined according to the brightness adjustment operation
Step S103: and respectively calculating a red component value, a green component value and a blue component value according to the change value of the preset parameter, the corresponding relation between the preset parameter and the red component, the corresponding relation between the preset parameter and the green component and the corresponding relation between the preset parameter and the blue component.
According to the brightness adjustment requirement, for example, the brightness adjustment requirement may be that the color system is not changed while the brightness is changed (specifically, the page brightness is gradually changed in the blue color system and the page brightness is gradually changed in the pink color system), and the corresponding relationship between the preset parameter and the red component, the corresponding relationship between the preset parameter and the green component, and the corresponding relationship between the preset parameter and the blue component are preset.
In this step, the change value of the preset parameter is substituted into the corresponding relationship between the preset parameter and the red component to obtain a red component value corresponding to the change value of the preset parameter, the change value of the preset parameter is substituted into the corresponding relationship between the preset parameter and the green component to obtain a green component value corresponding to the change value of the preset parameter, and the change value of the preset parameter is substituted into the corresponding relationship between the preset parameter and the blue component to obtain a blue component value corresponding to the change value of the preset parameter.
Step S104: and superposing the red component value, the green component value and the blue component value to obtain the color value.
The red, green and blue color component values may be color values identified by decimal values 0-255, or color values identified by hexadecimal values # 00- # FF. In this step, the red component value, the green component value, and the blue component value are superimposed as color values, for example, the red component value, the green component value, and the blue component value are #18, #4E, #81, respectively, and the color value obtained after the superimposition is #184E 81.
Step S105: and adjusting the brightness of the page according to the color value.
And (5) taking the color value obtained in the step (S104) as a color value parameter of the page to realize the adjustment of the page brightness.
In the page adjustment method provided in this embodiment, after receiving the brightness adjustment operation, mapping the brightness adjustment operation to a change value of a preset parameter, and then obtaining a red component value, a green component value, and a blue component value by respectively calculating according to a corresponding relationship between the preset parameter and a red component, a corresponding relationship between the preset parameter and a green component, and a corresponding relationship between the preset parameter and a blue component, and finally superimposing the three-primary-color component values to a color value to adjust the page.
Optionally, in an embodiment, the page includes a background layer and an image layer, and the step of setting the brightness of the page according to the color values includes: and setting the brightness of the background image layer according to the color value.
Specifically, the background image layer provides a background for the image layer, and when the color value of the background image layer changes, the brightness of the page changes correspondingly.
By adopting the page adjusting method provided by the embodiment, the adjustment of the page brightness is realized by adjusting the brightness of the background layer in the page, the normal display of the image layer can not be influenced in the adjusting process, and the influence on the image color display in the image layer caused by the whole adjustment of the page brightness is avoided.
Optionally, in an embodiment, the preset parameter is a geometric parameter of an image in an image layer, and the page adjustment method further includes: and adjusting the image in the image layer according to the change value of the geometric parameter.
Specifically, preset parameters are set as geometric parameters of the image, such as the height, width, angle, and the like of the image, and after a change value of the geometric parameters is determined according to the brightness adjustment operation, the brightness of the background layer is adjusted according to the change value, and the image in the image layer is adjusted, for example, the image is stretched in height, stretched in width, or rotated by an angle.
By adopting the page adjusting method provided by the embodiment, after the change value of the geometric parameter is determined according to the page adjusting parameter, the brightness of the background image layer and the image of the image layer are adjusted in a linkage manner, and the convenience and the interactive experience of user operation are improved.
Optionally, in an embodiment, the preset parameter is an angle, when a variation value of the preset parameter ranges from 0 degree to 180 degrees, the brightness of the page ranges from the first color value to the second color value, and when the variation value of the preset parameter ranges from 180 degrees to 360 degrees, the brightness of the page ranges from the second color value to the first color value, where the first color value and the second color value are different color values.
Specifically, the preset parameter is set as an angle, the angle corresponding to the brightness adjustment operation is changed from 0 degree to 180 degrees and then to 360 degrees, and when the change of one circle is realized, the brightness of the page is correspondingly changed from the first color value to the second color value and then returns to the first color value. Fig. 2 is a diagram illustrating the effect of the change in the brightness of the page in the page adjustment method according to the embodiment of the present invention, as shown in fig. 2, the first color value is RGB (red component value, green component value, and blue component value): 0,0, 0; the second color value is RGB: 24,78,129.
By adopting the page adjusting method provided by the embodiment, after the first color value and the second color value are set, the brightness can be conveniently and gradually adjusted from the first color value to the second color value through the brightness adjusting operation, and then the second color value gradually returns to the first color value, so that the brightness change is smoother.
Alternatively, in one embodiment, the red, green and blue component values R, G and B are calculated separately using the following formulas: r ═ a θ2,G=b*θ2,B=c*θ2Where θ is a variation value of a predetermined parameter, and a ═ R0/1802,b=G0/1802,c=B0/1802,R0、G0、B0The red color component value, the green color component value and the blue color component value in the second color value are sequentially arranged.
Specifically, with reference to fig. 2, when the angle is changed from 0 degree to 180 degrees, and when the angle is changed from 180 degrees to 360 degrees, the color values generating the change of the page brightness are symmetric in size, so that only the relationship between the angle from 0 degree to 180 degrees and the change of each color value needs to be calculated. Meanwhile, when the angle is changed from 0 degree to 180 degrees, the color values corresponding to the brightness are #000000 to #184E81, that is, the first color value is #000000, the second color value is #184E81, and the decimal value RGB corresponding to the second color value: 24,78,129, and in order to satisfy the requirement of not changing the color value of the color system during the brightness adjustment, when the angle is 90 degrees, the decimal value RGB corresponding to the color value: 6,15, 30. On the basis, in order to obtain the relation between the angle and the color value change, the two-dimensional coordinates formed by the angle and the color value are respectively as follows:
angle and two-dimensional coordinates of red component R: (0, 0); (90, 6); (180, 24);
angle and two-dimensional coordinates of green component G: (0, 0); (90, 15); (180, 78);
angle and two-dimensional coordinates of blue component B: (0, 0); (90, 30); (180,129).
Wherein for two of the angle and red component RDimensional coordinates are as follows: (0, 0); (90, 6); (180,24) fitting the connecting curve to approximate a quadratic function curve and passing through the origin (0,0), thereby setting the relation function of the angle and the red component R as R a theta2Substituting point (180,24) into R ═ a θ2Then a is 24/1802=0.00074074f。
Similarly, the angle is related to the green component G by the function G ═ b θ2Substituting the point (180,78) into G ═ b ═ θ2Then b is 78/1802=0.00240741f。
Similarly, the angle is related to the blue component B as a function of B ═ c θ2Substituting point (180,129) into G ═ c θ2Then c is 129/1802=0.00398148f。
When the first color value, the second color value and/or the color value conversion requirement are/is changed, the values of a, b and c are correspondingly changed.
Optionally, in one embodiment, the brightness adjustment operation comprises a selection of a point A (x) on the pagea,ya) Slide along the curve to point B (x)b,yb) The change value theta of the preset parameter corresponding to the first adjustment operation is determined by adopting the following formula: θ ═ arcsin (| BB)1|/|BO|)-arcsin(|AA1I/O I), wherein the point O is a preset central point, and the coordinate of the point O is (x)o,yo) The coordinate of the point B1 is (x)o-xb,yo-yb) The coordinate of the point A1 is (x)o-xa,yo–ya),|BB1| is the distance from point B to point B1, | BO | is the distance from point B to point O, | AA1| is the distance from point a to point a1, | AO | is the distance from point a to point O.
Specifically, the first adjustment operation is a slide operation in which a variation value of a preset parameter is determined in accordance with a slide position. FIG. 3 is a schematic diagram illustrating a method for adjusting a page according to a preset parameter variation value determined according to a page brightness operation in the page adjustment method according to an embodiment of the present invention, as shown in FIG. 3, a user defined point A (x)a,ya) Slide along the curve to point B (x)b,yb) When the user contacts the terminal at point A (x)a,ya) Point A (x)a,ya) Relative preset center point O (x)o,yo) Is A1 (x)o-xa,yo–ya) According to the distance | AA from the point A to the point A11The distance | AO | between | and the point A to the point O can be calculated to obtain the angle theta of the point A relative to the preset central pointa=arcsin(|AA1I/| AO |); at point B (x) when the user makes contact with the terminalb,yb) Point B (x)b,yb) Relative preset center point O (x)o,yo) Is B1 (x)o-xb,yo-yb) According to the distance | BB from the point B to the point B11The distance | BO | between | and the point B to the point O can be calculated to calculate the angle theta of the point B relative to the preset central pointb=arcsin(|BB1i/BO |), then θ ═ θbaNamely the change value of the angle corresponding to the brightness adjustment operation.
Optionally, in an embodiment, the brightness adjustment operation includes a second adjustment operation that slides from a point C to a point D in the first direction on the page, and the change value θ of the preset parameter corresponding to the second adjustment operation is determined by using the following formula: θ is 360 × CD | L0, where | CD | is the distance from point C to point D, and L0 is the length of the display screen displaying the page in the first direction.
Specifically, the second adjustment operation is a slide operation in which a variation value of the preset parameter is determined in accordance with the slide position. Fig. 4 is a schematic diagram illustrating another method for determining a change value of a preset parameter according to a page brightness operation in a page adjustment method according to an embodiment of the present invention, as shown in fig. 4, in the embodiment shown in fig. 4, a first direction is a vertical direction of a display screen (for example, a length direction of a mobile phone), and a user is defined by a point C (x)c,yc) Slide to point D (x) on display screend,yd) The distance between the two points is | CD |, | CD | changes from 0 to the length L0 of the display screen in the first direction, corresponding to the change of the angle from 0 degree to 360 degrees, therefore, the ratio of | CD | and L0 is multiplied by 360 degrees, and the change value of the angle can be obtained.
Optionally, in an embodiment, the image in the image layer is a time compass, and the preset parameter is a rotation angle of the time compass, where 0 degree to 360 degrees of the time compass are equally divided into time identifiers representing 0 to 24 hours; the step of adjusting the image in the image layer according to the variation value of the preset parameter comprises the following steps: the time compass is rotated according to the variation value of the rotation angle.
Specifically, 24 numbers are engraved on the time compass as time marks, the time marks represent time, and the preset parameter is the rotation angle of the time compass. When the adjustment operation of the brightness surface is the sliding operation of the finger, the time compass rolls from 0 degree to 360 degrees in a circle along with the sliding of the finger of the user, the corresponding page brightness is from a first color value to a second color value when the corresponding time is from 0 degree to 24 degrees, the corresponding page brightness is from the first color value to the second color value when the background image layer is in a space, and the change of the space color value along with the time can be realized by setting the first color value and the second color value, so that the effect from the space black to the sky bright and then to the space black is reflected.
Fig. 5 is a schematic diagram of page rendering according to an embodiment of the present invention, and as shown in fig. 5, in a page rendering process of an application program, the page adjusting method provided in the present invention is applied. Specifically, after an APP (i.e., an application program) is started, a local resource file required by page rendering is acquired to perform animation preparation rendering display, wherein the local resource file includes a picture required in an image layer and an animation video required in the animation display, and can be acquired by requesting a cloud platform resource file. After the initial page rendering display, a user enters a starboard selection, namely a display page capable of selecting a constellation, the display page comprises a background layer and an image layer, wherein an image in the image layer comprises a time compass and a constellation, and in the page, the user can adjust the page through a page adjusting operation of rotating the time compass angle or through a page adjusting operation of sliding longitudinally. When a user rotates the time compass angle, the algorithm factory calculates according to the rotation angle to obtain a brightness value, namely a color value; when the user slides longitudinally, the algorithm factory calculates the brightness value, that is, the color value, according to the coordinate value of the sliding operation, that is, the sliding distance, where the process of calculating the color value may refer to the above embodiments, and details thereof are not repeated. And after the color value is obtained through calculation, updating the brightness of the background layer in real time, namely updating the brightness of the starry sky in real time.
Example two
Corresponding to the first embodiment, the second embodiment of the present invention provides a page adjustment apparatus, and the related technical features and corresponding technical effects can be referred to the first embodiment, which is not described in detail herein. Fig. 6 is a block diagram of a page adjustment apparatus according to a second embodiment of the present invention, as shown in fig. 6, the page adjustment apparatus includes: a receiving module 201, a first processing module 202, a second processing module 203, a third processing module 204 and an adjusting module 205.
The receiving module 201 is configured to receive a brightness adjustment operation of a page; the first processing module 202 is configured to determine a variation value of a preset parameter corresponding to a brightness adjustment operation; the second processing module 203 is configured to calculate a red component value, a green component value, and a blue component value according to the variation value of the preset parameter, the corresponding relationship between the preset parameter and the red component, the corresponding relationship between the preset parameter and the green component, and the corresponding relationship between the preset parameter and the blue component; the third processing module 204 is configured to superimpose the red component value, the green component value, and the blue component value to obtain a color value; and the first adjusting module 205 is configured to adjust the brightness of the page according to the color value.
Optionally, in an embodiment, the page includes a background layer and an image layer, and when the first adjusting module 205 sets the brightness of the page according to the color value, the specifically executed steps include: and setting the brightness of the background image layer according to the color value.
Optionally, in an embodiment, the preset parameter is a geometric parameter of an image in an image layer, and the page adjustment method further includes: and the second adjusting module is used for adjusting the image in the image layer according to the change value of the geometric parameter.
Optionally, in an embodiment, the preset parameter is an angle, when a variation value of the preset parameter ranges from 0 degree to 180 degrees, the brightness of the page ranges from the first color value to the second color value, and when the variation value of the preset parameter ranges from 180 degrees to 360 degrees, the brightness of the page ranges from the second color value to the first color value, where the first color value and the second color value are different color values.
Alternatively,in one embodiment, the red, green and blue component values R, G and B are calculated separately using the following equations: r ═ a θ2,G=b*θ2,B=c*θ2(ii) a Where θ is a variation value of a preset parameter, and a ═ R0/1802,b=G0/1802,c=B0/1802,R0、G0、B0The red color component value, the green color component value and the blue color component value in the second color value are sequentially arranged.
Optionally, in one embodiment, the brightness adjustment operation comprises a selection of a point A (x) on the pagea,ya) Slide along the curve to point B (x)b,yb) The change value theta of the preset parameter corresponding to the first adjustment operation is determined by adopting the following formula: θ ═ arcsin (| BB)1|/|BO|)-arcsin(|AA1I/| AO |); wherein, the point O is a preset central point, and the coordinate of the point O is (x)o,yo) The coordinate of the point B1 is (x)o-xb,yo-yb) The coordinate of the point A1 is (x)o-xa,yo–ya),|BB1| is the distance from point B to point B1, | BO | is the distance from point B to point O, | AA1| is the distance from point a to point a1, | AO | is the distance from point a to point O.
Optionally, in an embodiment, the brightness adjustment operation includes a second adjustment operation that slides from a point C to a point D in the first direction on the page, and the change value θ of the preset parameter corresponding to the second adjustment operation is determined by using the following formula: θ 360 × CD/L0; where | CD | is a distance from the point C to the point D, and L0 is a length of the display screen displaying the page in the first direction.
Optionally, in an embodiment, the image in the image layer is a time compass, and the geometric parameter is a rotation angle of the time compass, wherein 0-360 degrees of the time compass are equally divided into time identifiers representing 0-24 hours; the step of adjusting the image in the image layer according to the variation value of the preset parameter comprises the following steps: the time compass is rotated according to the variation value of the rotation angle.
EXAMPLE III
The embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers) capable of executing programs, and the like. As shown in fig. 7, the computer device 01 of the present embodiment at least includes but is not limited to: a memory 011 and a processor 012, which are communicatively connected to each other via a system bus, as shown in fig. 7. It is noted that fig. 7 only shows the computer device 01 having the component memory 011 and the processor 012, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the memory 011 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 011 can be an internal storage unit of the computer device 01, such as a hard disk or a memory of the computer device 01. In other embodiments, the memory 011 can also be an external storage device of the computer device 01, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer device 01. Of course, the memory 011 can also include both internal and external memory units of the computer device 01. In this embodiment, the memory 011 is generally used for storing an operating system installed in the computer device 01 and various application software, such as a program code of the page adjustment apparatus in the second embodiment. Further, the memory 011 can also be used to temporarily store various kinds of data that have been output or are to be output.
The processor 012 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data Processing chip in some embodiments. The processor 012 is generally used to control the overall operation of the computer device 01. In the present embodiment, the processor 012 is configured to run a program code stored in the memory 011 or process data, for example, a page adjustment method or the like.
Example four
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of this embodiment is used for storing a paging adjusting apparatus, and when executed by a processor, the paging adjusting method of the first embodiment is implemented.
It should be noted that, in this document, 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 like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (11)

1. A page adjusting method is characterized by comprising the following steps:
receiving brightness adjustment operation of a page;
determining a change value of a preset parameter corresponding to the brightness adjustment operation;
respectively calculating a red component value, a green component value and a blue component value according to the variation value of the preset parameter, the corresponding relation between the preset parameter and the red component, the corresponding relation between the preset parameter and the green component and the corresponding relation between the preset parameter and the blue component;
superposing the red component value, the green component value and the blue component value to obtain a color value; and
and adjusting the brightness of the page according to the color value.
2. The method for adjusting page according to claim 1, wherein the page includes a background layer and an image layer, and the step of setting the brightness of the page according to the color value includes:
and setting the brightness of the background image layer according to the color value.
3. The method of claim 2, wherein the preset parameter is a geometric parameter of an image in the image layer, and the method further comprises:
and adjusting the image in the image layer according to the change value of the geometric parameter.
4. The method for adjusting pages as claimed in any one of claims 1 to 3, wherein said preset parameter is angle, and when said preset parameter varies from 0 degree to 180 degrees, the brightness of said page varies from a first color value to a second color value, and when said preset parameter varies from 180 degrees to 360 degrees, the brightness of said page varies from said second color value to said first color value, wherein said first color value and said second color value are different color values.
5. The method for adjusting pages as claimed in claim 4, wherein the red color component value R, the green color component value G and the blue color component value B are calculated by the following formulas:
R=a*θ2,G=b*θ2,B=c*θ2
where θ is a variation value of the preset parameter, and a ═ R0/1802,b=G0/1802,c=B0/1802,R0、G0、B0The color value of the first color value is a red color component value, a green color component value and a blue color component value.
6. The method of claim 4, wherein the brightness adjustment operation comprises selecting a point A (x) on the pagea,ya) Slide along the curve to point B (x)b,yb) Determining a variation value theta of a preset parameter corresponding to the first adjustment operation by adopting the following formula:
θ=arcsin(|BB1|/|BO|)-arcsin(|AA1|/|AO|);
wherein, the point O is a preset central point, and the coordinate of the point O is (x)o,yo) The coordinate of the point B1 is (x)o-xb,yo-yb) The coordinate of the point A1 is (x)o-xa,yo–ya),|BB1| is the distance from point B to point B1, | BO | is the distance from point B to point O, | AA1| is the distance from point a to point a1, | AO | is the distance from point a to point O.
7. The page adjusting method according to claim 4, wherein the brightness adjusting operation comprises a second adjusting operation of sliding from a point C to a point D along a first direction on the page, and the change value θ of the preset parameter corresponding to the second adjusting operation is determined by using the following formula:
θ=360*|CD|/L0;
where | CD | is a distance from a point C to a point D, and L0 is a length of a display screen displaying the page in the first direction.
8. The page adjusting method according to claim 3,
the images in the image layers are time compasses, the geometric parameters are rotation angles of the time compasses, and time marks representing 0-24 hours are equally divided from 0 degree to 360 degrees of the time compasses;
the step of adjusting the image in the image layer according to the variation value of the preset parameter comprises the following steps: and rotating the time compass according to the change value of the rotation angle.
9. A page adjusting apparatus, comprising:
the receiving module is used for receiving the brightness adjustment operation of the page;
the first processing module is used for determining a change value of a preset parameter corresponding to the brightness adjustment operation;
the second processing module is used for respectively calculating a red component value, a green component value and a blue component value according to the change value of the preset parameter, the corresponding relation between the preset parameter and the red component, the corresponding relation between the preset parameter and the green component and the corresponding relation between the preset parameter and the blue component;
the third processing module is used for superposing the red component value, the green component value and the blue component value to obtain a color value; and
and the adjusting module is used for adjusting the brightness of the page according to the color value.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 8 are implemented by the processor when executing the computer program.
11. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program when executed by a processor implements the steps of the method of any one of claims 1 to 8.
CN201911174005.5A 2019-11-26 2019-11-26 Page adjustment method, page adjustment device, computer equipment and computer readable storage medium Active CN112948029B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911174005.5A CN112948029B (en) 2019-11-26 2019-11-26 Page adjustment method, page adjustment device, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911174005.5A CN112948029B (en) 2019-11-26 2019-11-26 Page adjustment method, page adjustment device, computer equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112948029A true CN112948029A (en) 2021-06-11
CN112948029B CN112948029B (en) 2023-12-29

Family

ID=76224969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911174005.5A Active CN112948029B (en) 2019-11-26 2019-11-26 Page adjustment method, page adjustment device, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112948029B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113286136A (en) * 2021-07-23 2021-08-20 卡莱特云科技股份有限公司 Picture color adjusting method and device, computer equipment and storage medium
CN113703648A (en) * 2021-07-29 2021-11-26 青岛海尔科技有限公司 Method and device for realizing page gradual change effect

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467744A (en) * 2010-10-29 2012-05-23 北大方正集团有限公司 Method and device for adjusting display effect of electronic document
CN103294362A (en) * 2013-06-28 2013-09-11 贝壳网际(北京)安全技术有限公司 Screen display control method and device for mobile equipment and mobile equipment
US20170074668A1 (en) * 2015-03-04 2017-03-16 United Parcel Service Of America, Inc. Viewing, modifying, and/or creating routes
CN107731199A (en) * 2017-10-27 2018-02-23 努比亚技术有限公司 A kind of screen color temp adjusting method, terminal and computer-readable recording medium
CN108121803A (en) * 2017-12-22 2018-06-05 维沃移动通信有限公司 A kind of method and server of definite page layout
CN110021257A (en) * 2019-04-02 2019-07-16 Oppo广东移动通信有限公司 Display brightness method of adjustment and relevant device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467744A (en) * 2010-10-29 2012-05-23 北大方正集团有限公司 Method and device for adjusting display effect of electronic document
CN103294362A (en) * 2013-06-28 2013-09-11 贝壳网际(北京)安全技术有限公司 Screen display control method and device for mobile equipment and mobile equipment
US20170074668A1 (en) * 2015-03-04 2017-03-16 United Parcel Service Of America, Inc. Viewing, modifying, and/or creating routes
CN107731199A (en) * 2017-10-27 2018-02-23 努比亚技术有限公司 A kind of screen color temp adjusting method, terminal and computer-readable recording medium
CN108121803A (en) * 2017-12-22 2018-06-05 维沃移动通信有限公司 A kind of method and server of definite page layout
CN110021257A (en) * 2019-04-02 2019-07-16 Oppo广东移动通信有限公司 Display brightness method of adjustment and relevant device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113286136A (en) * 2021-07-23 2021-08-20 卡莱特云科技股份有限公司 Picture color adjusting method and device, computer equipment and storage medium
CN113703648A (en) * 2021-07-29 2021-11-26 青岛海尔科技有限公司 Method and device for realizing page gradual change effect

Also Published As

Publication number Publication date
CN112948029B (en) 2023-12-29

Similar Documents

Publication Publication Date Title
CN109045691B (en) Method and device for realizing special effect of special effect object
CN108664454B (en) Electronic book page display method and device and terminal equipment
US20180159971A1 (en) Method and apparatus for generating unlocking interface, and electronic device
CN112948029B (en) Page adjustment method, page adjustment device, computer equipment and computer readable storage medium
CN109887062B (en) Rendering method, device, equipment and storage medium
US11651556B2 (en) Virtual exhibition space providing method for efficient data management
CN104808959B (en) Information processing method and electronic equipment
WO2019101005A1 (en) Pixel compensation method and apparatus, and terminal device
WO2023093291A1 (en) Image processing method and apparatus, computer device, and computer program product
CN112581632B (en) House source data processing method and device
US20210090352A1 (en) Method of providing virtual exhibition space using 2.5-dimensionalization
CN110570497B (en) Drawing method and device based on layer superposition, terminal equipment and storage medium
CN110363837B (en) Method and device for processing texture image in game, electronic equipment and storage medium
CN108986181B (en) Dot-based image processing method, device and computer readable storage medium
CN112951147B (en) Display chroma and visual angle correction method, intelligent terminal and storage medium
CN112541955A (en) Image processing method, device and equipment
CN104238892A (en) Information processing method and electronic equipment
CN113126942B (en) Method and device for displaying cover picture, electronic equipment and storage medium
KR101911947B1 (en) Screen design method and screen design system for improving information readability and harmonizing background image
CN111125999B (en) Character color adjusting method, system, equipment and machine readable medium
CN111667563B (en) Image processing method, device, equipment and storage medium
US11043015B2 (en) Generating reflections within images
CN111913771A (en) Wallpaper display method, device and equipment
CN110992869B (en) Layer display method and related equipment
CN111324404B (en) Information acquisition progress display method and device, electronic equipment and readable 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