CN106648511A - Self-adaptive display method and device of display resolutions - Google Patents

Self-adaptive display method and device of display resolutions Download PDF

Info

Publication number
CN106648511A
CN106648511A CN201611169668.4A CN201611169668A CN106648511A CN 106648511 A CN106648511 A CN 106648511A CN 201611169668 A CN201611169668 A CN 201611169668A CN 106648511 A CN106648511 A CN 106648511A
Authority
CN
China
Prior art keywords
resolution
display
actual
display element
target
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.)
Pending
Application number
CN201611169668.4A
Other languages
Chinese (zh)
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.)
World (beijing) Network Technology Co Ltd
Original Assignee
World (beijing) Network 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 World (beijing) Network Technology Co Ltd filed Critical World (beijing) Network Technology Co Ltd
Priority to CN201611169668.4A priority Critical patent/CN106648511A/en
Publication of CN106648511A publication Critical patent/CN106648511A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros

Landscapes

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

Abstract

The invention discloses a self-adaptive display method and device of display resolutions. The method comprises the following steps: acquiring a plurality of predetermined reference resolutions; acquiring the actual resolution of a display screen; selecting a reference resolution which is the closest to the actual resolution in the plurality of predetermined reference resolutions as a target reference resolution; calculating a pantograph ratio according to the target reference resolution and the actual resolution; determining the display elements which are displayed under the actual resolution of the display screen, and acquiring the dimensions of the display elements under the target reference resolution; calculating the display dimensions of the display elements under the actual resolution of the display screen according to the dimensions and pantograph ratio of the display elements under the target reference resolution; determining the display positions of the display elements under the actual resolution; and displaying the display elements under the actual resolution according to the display dimensions and display positions. The method and device disclosed by the invention can self-adaptively display according to the actual resolution of the display screen, and distortion can not happen.

Description

Self-adaptive display method and device for display resolution
Technical Field
The invention relates to the technical field of intelligent terminals, in particular to a self-adaptive display method and device for display resolution.
Background
The display resolution refers to the resolution of the display when displaying images, and the resolution is measured by dots, and the "dots" on the display refer to pixels (pixels). The numerical value of the display resolution refers to the number of horizontal pixels and vertical pixels across all the viewable area of the display. For example: the resolution of 800 × 600 means that 800 pixels are displayed horizontally and 600 pixels are displayed vertically on the entire screen.
With the popularization of intelligent terminals, devices with various display resolutions are more and more, and besides some common resolutions such as 720P and 1080P, resolution with other proportions, width-to-height ratio and the common resolutions are inconsistent, so that how to perform better display in devices with various resolutions becomes a big problem in current research and development work.
In the prior art, when displaying on devices with different resolutions, the following two methods are generally adopted:
the first method is as follows: the method comprises the steps of carrying out equal scaling or reduction according to a reference resolution, carrying out maximum matching under a target resolution, intercepting an unnecessary part under the condition that the target resolution is not exceeded, and then carrying out centered display.
The second method comprises the following steps: the screen is divided into grids according to the scale, all display elements are matched according to the grid scale, namely, the display elements are displayed at the target resolution according to the reference resolution, however, various elements displayed on the screen in the mode have distortion under the resolution different from the aspect ratio of the reference resolution, and the distortion is more obvious when the scale deviation is larger.
In summary, the display modes commonly used in the prior art cannot be displayed in a full screen mode, or distortion is generated, and actual requirements cannot be met.
Disclosure of Invention
The invention provides a self-adaptive display method and device of display resolution, which can perform self-adaptive display according to the actual resolution of a display screen, have good display effect and do not generate distortion.
In one aspect, the present invention provides a method for adaptively displaying a display resolution, including:
acquiring multiple preset groups of reference resolutions;
acquiring the actual resolution of a display screen;
according to the actual resolution, selecting one group of reference resolution closest to the actual resolution from the multiple groups of reference resolutions as a target reference resolution;
calculating a scaling ratio according to the target reference resolution and the actual resolution;
determining display elements needing to be displayed under the actual resolution of the display screen, and acquiring the size of the display elements under the target reference resolution;
calculating the display size of the display element under the actual resolution of the display screen according to the size of the display element under the target reference resolution and the scaling ratio;
determining a display position of the display element at the actual resolution;
displaying the display element at the actual resolution according to the display size and the display position.
Optionally, the calculating a scaling ratio according to the target reference resolution and the actual resolution includes:
calculating a width ratio between a width of the actual resolution and a width of the target reference resolution, and a height ratio between a height of the actual resolution and a height of the target reference resolution, respectively;
and calculating the scaling ratio according to the width ratio and the height ratio.
Optionally, the calculating a scaling ratio according to the width ratio and the height ratio includes:
calculating the average value of the width ratio and the height ratio, and taking the average value as the scaling ratio; or,
and comparing the width ratio with the height ratio, and taking the smaller ratio of the width ratio and the height ratio as the scaling ratio.
Optionally, the determining the display position of the display element at the actual resolution includes:
acquiring a target display effect graph adaptive to the target reference resolution from a pre-designed display effect graph library, wherein the display effect graph library comprises a plurality of groups of display effect graphs, and each group of display effect graph is respectively adaptive to each reference resolution;
determining an anchor point of the display element according to the target display effect graph;
determining a reference point of the display screen, and recording coordinate values of the reference point under the target reference resolution;
acquiring a coordinate difference between the anchor point of the display element and the reference point under the target reference resolution;
calculating the coordinates of the anchor point of the display element under the actual resolution according to the coordinate values of the reference point under the target reference resolution and the coordinate difference between the anchor point of the display element and the reference point under the target reference resolution;
and determining the display position of the display element under the actual resolution according to the anchor point coordinates.
Optionally, the calculating, according to the coordinate value of the reference point at the target reference resolution and the coordinate difference between the anchor point of the display element and the reference point at the target reference resolution, the anchor point coordinate of the display element at the actual resolution includes:
x=XReference+XDistanceBase*Scale;
y=YReference+YDistanceBase*Scale;
wherein x refers to the abscissa of the anchor point of the display element at the actual resolution and y refers to the ordinate of the anchor point of the display element at the actual resolution; scale represents the zoom ratio; XReference refers to the abscissa of the reference point at the target base resolution, YReference refers to the ordinate of the reference point at the target base resolution; XDistanceBase refers to the lateral difference between the anchor point of the display element and the reference point at the target base resolution, and YDistanceBase refers to the vertical difference between the anchor point of the display element and the reference point at the target base resolution.
In another aspect, the present invention provides an adaptive display device for displaying resolution, including:
the first acquisition unit is used for acquiring multiple preset groups of reference resolutions;
a second acquisition unit for acquiring an actual resolution of the display screen;
a selecting unit configured to select, as a target reference resolution, a set of reference resolutions that is closest to the actual resolution from the plurality of sets of reference resolutions, according to the actual resolution;
a first calculation unit configured to calculate a scaling ratio based on the target reference resolution and the actual resolution;
a first determination unit configured to determine a display element that needs to be displayed at an actual resolution of the display screen;
a third acquiring unit configured to acquire a size of the display element at the target reference resolution;
a second calculation unit configured to calculate a display size of the display element at an actual resolution of the display screen based on the size of the display element at the target reference resolution and the zoom ratio;
a second determination unit configured to determine a display position of the display element at the actual resolution;
and the display unit is used for displaying the display element under the actual resolution according to the display size and the display position.
Optionally, the target reference resolution at least includes a width of the target reference resolution and a height of the target reference resolution, and the actual resolution at least includes a width of the actual resolution and a height of the actual resolution, where the first calculating unit includes:
a first calculating module, configured to calculate a width ratio between a width of the actual resolution and a width of the target reference resolution, and a height ratio between a height of the actual resolution and a height of the target reference resolution, respectively;
and the second calculation module is used for calculating the scaling ratio according to the width ratio and the height ratio.
Optionally, the second calculating module is configured to calculate an average value of the width ratio and the height ratio, and use the average value as the scaling ratio; or,
the second calculation module is configured to compare the width ratio with the height ratio, and use a smaller ratio of the width ratio and the height ratio as the scaling ratio.
Optionally, the second determining unit includes:
the first acquisition module is used for acquiring a target display effect graph adaptive to the target reference resolution from a pre-designed display effect graph library, wherein the display effect graph library comprises a plurality of groups of display effect graphs, and each group of display effect graph is respectively adaptive to each reference resolution;
the first determining module is used for determining the anchor point of the display element according to the target display effect graph;
a second determination module for determining a reference point of the display screen;
the recording module is used for recording the coordinate value of the reference point under the target reference resolution;
the second acquisition module is used for acquiring the coordinate difference between the anchor point of the display element and the reference point under the target reference resolution;
a calculation module, configured to calculate coordinates of an anchor point of the display element at the actual resolution according to coordinate values of the reference point at the target reference resolution and a coordinate difference between the anchor point of the display element and the reference point at the target reference resolution;
and the third determining module is used for determining the display position of the display element under the actual resolution according to the anchor point coordinates.
Optionally, the calculating, according to the coordinate value of the reference point at the target reference resolution and the coordinate difference between the anchor point of the display element and the reference point at the target reference resolution, the anchor point coordinate of the display element at the actual resolution includes:
x=XReference+XDistanceBase*Scale;
y=YReference+YDistanceBase*Scale;
wherein x refers to the abscissa of the anchor point of the display element at the actual resolution and y refers to the ordinate of the anchor point of the display element at the actual resolution; scale represents the zoom ratio; XReference refers to the abscissa of the reference point at the target base resolution, YReference refers to the ordinate of the reference point at the target base resolution; XDistanceBase refers to the lateral difference between the anchor point of the display element and the reference point at the target base resolution, and YDistanceBase refers to the vertical difference between the anchor point of the display element and the reference point at the target base resolution.
The self-adaptive display method and the device for the display resolution, provided by the embodiment of the invention, are used for acquiring multiple preset groups of reference resolutions; acquiring the actual resolution of a display screen; selecting a group of reference resolutions closest to the actual resolution from the plurality of groups of reference resolutions as a target reference resolution according to the actual resolution; calculating a scaling ratio according to the target reference resolution and the actual resolution; determining display elements needing to be displayed under the actual resolution of a display screen, and acquiring the size of the display elements under the target reference resolution; calculating the display size of the display element under the actual resolution of the display screen according to the size and the scaling ratio of the display element under the target reference resolution; determining a display position of the display element at the actual resolution; the display elements are displayed at the actual resolution according to the display size and the display position. According to the method and the device, multiple groups of reference resolutions are set, the scaling ratio calculation is carried out by selecting the reference resolution close to the actual resolution, the method and the device can be suitable for various display screens with large resolution difference, and the display effect after self-adaptation is good and distortion is avoided.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart of an adaptive display method for displaying resolution according to an embodiment of the present invention;
FIG. 2 is a block diagram of an adaptive display device for displaying resolution according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a plurality of reference points on a display screen according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating position coordinates of an anchor point and a reference point of an element according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating relative positions of anchor points in a display element according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a display effect after adaptive display according to an embodiment of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
The technical terms and abbreviations involved in the embodiments of the present invention are as follows:
QVGA: resolution of 320 x 240
WQVGA: resolution of 400 x 240
HVGA: resolution of 480 x 320
VGA: 640 x 480 resolution
WVGA: resolution of 800 × 480
FWVGA: 854 × 480 resolution
720P: 1280 × 720 resolution
1080P: 1920 × 1080 resolution
With the popularization of intelligent terminals, devices with various display resolutions are more and more, the sizes of the devices are different, and besides some common devices such as 720P, 1080P and the like, some lower resolutions such as 854 × 480, 480 × 320 and the like exist. How to normally display on the devices with the proportions, especially the devices with the resolution greatly different, and achieve a better effect is a difficult problem which troubles the development of various applications.
To solve the above problem, an embodiment of the present invention provides an adaptive display method for displaying resolution, as shown in fig. 1, including steps S101 to S108:
step S101: acquiring multiple preset groups of reference resolutions;
step S102: acquiring the actual resolution of a display screen;
step S103: selecting a group of reference resolutions closest to the actual resolution from the plurality of groups of reference resolutions as a target reference resolution according to the actual resolution;
step S104: calculating a scaling ratio according to the target reference resolution and the actual resolution;
step S105: determining display elements needing to be displayed under the actual resolution of a display screen, and acquiring the size of the display elements under the target reference resolution;
step S106: calculating the display size of the display element under the actual resolution of the display screen according to the size and the scaling ratio of the display element under the target reference resolution;
step S107: determining a display position of the display element at the actual resolution;
step S108: the display elements are displayed at the actual resolution according to the display size and the display position.
In another embodiment, the calculating the scaling ratio according to the target reference resolution and the actual resolution includes:
respectively calculating the width ratio between the width of the actual resolution and the width of the target reference resolution and the height ratio between the height of the actual resolution and the height of the target reference resolution;
and calculating a scaling ratio according to the width ratio and the height ratio.
In another embodiment, the calculating the scaling ratio according to the width ratio and the height ratio includes:
calculating the average value of the width ratio and the height ratio, and taking the average value as a scaling ratio; or,
and comparing the width ratio with the height ratio, and taking the smaller ratio of the width ratio and the height ratio as a scaling ratio.
In another embodiment, the determining the display position of the display element at the actual resolution includes:
acquiring a target display effect graph adaptive to a target reference resolution from a pre-designed display effect graph library, wherein the display effect graph library comprises a plurality of groups of display effect graphs, and each group of display effect graphs is respectively adaptive to each reference resolution;
determining an anchor point of a display element according to the target display effect graph;
determining a reference point of a display screen, and recording coordinate values of the reference point under a target reference resolution;
acquiring a coordinate difference between an anchor point of a display element and a reference point under a target reference resolution;
calculating the coordinate of the anchor point of the display element under the actual resolution according to the coordinate value of the reference point under the target reference resolution and the coordinate difference between the anchor point of the display element and the reference point under the target reference resolution;
and determining the display position of the display element under the actual resolution according to the anchor point coordinates.
In another embodiment, the calculating the coordinates of the anchor point of the display element at the actual resolution according to the coordinate values of the reference point at the target base resolution and the coordinate difference between the anchor point of the display element and the reference point at the target base resolution includes:
x=XReference+XDistanceBase*Scale;
y=YReference+YDistanceBase*Scale;
wherein x refers to the abscissa of the anchor point of the display element at the actual resolution and y refers to the ordinate of the anchor point of the display element at the actual resolution; scale represents the zoom ratio; XReference refers to the abscissa of the reference point under the target reference resolution, YReference refers to the ordinate of the reference point under the target reference resolution; XDistanceBase refers to the horizontal coordinate difference between the anchor point of the display element and the reference point at the target base resolution, and YDistanceBase refers to the vertical coordinate difference between the anchor point of the display element and the reference point at the target base resolution.
The embodiment of the invention designs a plurality of groups of reference resolutions in advance, wherein the reference resolutions comprise a plurality of resolutions such as high, low, medium, low and the like, and at least comprise two groups, so as to cover at least the high and low resolutions and respectively record the corresponding widths and heights;
the art designer designs display effect diagrams which are adaptive to each standard resolution respectively;
after the application program is started, acquiring the actual resolution of the current equipment, recording the width and the height of the current equipment, and selecting one group of reference resolutions from multiple groups of reference resolutions according to the actual resolution as a target reference resolution so as to ensure that the best display effect can be achieved and reduce the occurrence of distortion;
calculating a height ratio and a width ratio of the actual resolution to the selected target reference resolution, and further calculating to obtain a scaling ratio (Scale), in the following embodiments, a smaller one of the height ratio and the width ratio is used as a Scale, which is also referred to as a minimum aspect ratio Scale, and the following scales represent the meaning.
Except for background stretching and zooming, all display elements of each display interface scene are processed as follows:
acquiring the size of a display element under the standard resolution, and multiplying the size by the Scale obtained by calculation to obtain the display size of the display element under the actual resolution of the display screen;
acquiring a pre-designed display effect picture, and determining an anchor point (alignment position) of a display element according to the display effect picture, wherein the display effect picture is a display picture which is pre-designed by art designers under the standard resolution and is adaptive to the standard resolution;
determining one or more reference points on the screen, wherein the reference points may be, for example, nine points formed by intersecting upper, middle and lower, and left, middle and right, and in this embodiment, the center point located at the middle position may be used as the reference point;
according to the art effect graph, determining an anchor point (an alignment point) of the display element under the actual resolution of the display screen, and determining the relative position of a reference point on the actual resolution, wherein the horizontal and vertical distances in the relative position are as follows: multiplying the base resolution pitch by Scale;
and completing adaptation of each interface and scene of the application according to the above, and re-executing when the resolution is changed, thereby completing the resolution adaptation of the whole application. The application development is once, perfect adaptation can be realized on all equipment, the display effect is good, and no distortion exists.
The following describes related matters related to the embodiment of the present invention in further detail with reference to fig. 3 to 6:
the display resolution self-adaptive mechanism in the embodiment of the invention comprises the following implementation steps: application adaptation and scene adaptation, wherein the application adaptation includes scene adaptation of all scenes.
The main steps of the following embodiments for applying the adaptation are described as follows, and mainly include steps S301 to S309:
step S301: several groups of reference resolutions are set, at least two groups of high and low resolution are included, and the width and the height of each group of resolution are respectively recorded as Wbase and Hbase. If the high resolution is set to the resolution (for example 720P) of the current market mainstream, recording the wide WBase as 1280 and the high HBase as 720; the low resolution is set to 854 × 480, the wide WBase is recorded to 854, and the high HBase is recorded to 480;
step S302: the art designer designs an effect display image which is suitable for each standard resolution according to the standard resolution, such as jpg, png and the like, namely each resolution has art resources corresponding to the resolution; the effect schematic is shown in fig. 4. As in the above example, two resolutions of the art assets, 1280 × 720 and 854 × 480, were designed, respectively.
Step S303: after the application is started, the actual resolution of the current equipment is obtained, the width of the current equipment is recorded as WReal, the height of the current equipment is recorded as HReal, the closest reference resolution is selected according to a certain algorithm and a certain rule to serve as the target reference resolution, and the following reference resolutions all refer to the target reference resolution selected in the process. The algorithm and the rule may be set as follows, from a low reference resolution to a high reference resolution, it is sequentially determined that WReal is not more than WBase 1.2 and HReal is not more than HBase 1.2, if true, the reference resolution is selected as the target reference resolution, and if all comparisons are not true, the last highest reference resolution is selected as the target reference resolution. The process can be adjusted according to actual needs, algorithms and proportional values.
Step S304: respectively calculating the width ratio and the height ratio of the reference resolution; WScale ═ WReal/WBase; HScale HReal/HBase; finally, the minimum of the two width ratios and the height ratio is used, Scale ═ Min (WScale, HScale);
step S305: selecting a current scene;
step S306: self-adaptive processing of the current scene;
step S307: traversing each scene of the application, and judging whether all the scenes are processed; if so, jumping to step S308, and ending the resolution self-adaptive processing, otherwise, jumping to step S307;
step S308: when the current resolution ratio is higher than the current resolution ratio, selecting the next scene as a current resolution ratio self-adaptive processing scene;
step S309: the application of the resolution adaptation process ends.
The following process for scene resolution adaptation is described as follows:
except for background stretching and zooming, all display elements of each display interface scene are processed as follows:
step S401: starting scene resolution self-adaptive processing;
step S402: selecting a current display element;
step S403: multiplying the display element size by the Scale calculated in the above step S303;
step S404: setting an anchor point of a current display element, referring to a display effect graph provided by art, and setting an alignment position (namely the anchor point) of the display element, namely selecting the position of the element as an alignment point, such as a central point or an upper left vertex of the element, the position proportion of the anchor point in the element, the relative proportion xs on the left side in the transverse direction and the relative proportion ys on the lower side in the longitudinal direction, wherein the value of the anchor point is 0-1, and the anchor point schematic diagram is shown in FIG. 5;
step S405: selecting a reference point, wherein nine points formed by intersection of upper, middle and lower, left, middle and right can be selected, as shown in fig. 3;
step S406: selecting a reference point closest to the screen, wherein the abscissa and the ordinate are XReference and YReference, and setting the position of the anchor point of the display element, namely x and y coordinates; in the reference resolution, namely an effect graph, the distance between the reference point and the reference point is represented by an abscissa XDistanceBase and an ordinate YDistanceBase; then the x and y coordinates are calculated and set as follows:
x=XReference+XDistanceBase*Scale
y=YReference+YDistanceBase*Scale
wherein, the schematic diagram of the display effect after adaptive adaptation is shown in fig. 6;
step S407: judging whether all elements in the current display scene are processed or not, if so, going to S409, and if not, going to S408;
step S408: setting the next element as a current resolution self-adaptive processing element when the next element is reached;
step S409: the current scene resolution is processed by self-use.
The self-adaptive display method of the display resolution, provided by the embodiment of the invention, comprises the steps of obtaining multiple preset groups of reference resolutions; acquiring the actual resolution of a display screen; selecting a group of reference resolutions closest to the actual resolution from the plurality of groups of reference resolutions as a target reference resolution according to the actual resolution; calculating a scaling ratio according to the target reference resolution and the actual resolution; determining display elements needing to be displayed under the actual resolution of a display screen, and acquiring the size of the display elements under the target reference resolution; calculating the display size of the display element under the actual resolution of the display screen according to the size and the scaling ratio of the display element under the target reference resolution; determining a display position of the display element at the actual resolution; the display elements are displayed at the actual resolution according to the display size and the display position. According to the method, multiple groups of reference resolutions are set, the scaling ratio calculation is carried out by selecting the reference resolution close to the actual resolution, the method can be suitable for various display screens with large resolution difference, and the display effect after self-adaptation is good and distortion is avoided.
An embodiment of the present invention provides an adaptive display device for displaying resolution, as shown in fig. 2, including:
a first obtaining unit 201, configured to obtain multiple preset sets of reference resolutions;
a second acquiring unit 202 for acquiring an actual resolution of the display screen;
a selecting unit 203 for selecting, as a target reference resolution, a set of reference resolutions closest to the actual resolution from the sets of reference resolutions, based on the actual resolution;
a first calculation unit 204 for calculating a scaling ratio based on the target reference resolution and the actual resolution;
a first determination unit 205 for determining a display element that needs to be displayed at an actual resolution of the display screen;
a third acquiring unit 206 for acquiring a size of the display element at the target reference resolution;
a second calculation unit 207 for calculating a display size of the display element at the actual resolution of the display screen based on the size and the zoom ratio of the display element at the target reference resolution;
a second determination unit 208 for determining a display position of the display element at the actual resolution;
a display unit 209 for displaying the display elements at the actual resolution according to the display size and the display position.
In one embodiment, the target reference resolution at least includes a width of the target reference resolution and a height of the target reference resolution, and the actual resolution at least includes a width of the actual resolution and a height of the actual resolution, wherein the first calculating unit includes:
the first calculation module is used for calculating the width ratio between the width of the actual resolution and the width of the target reference resolution and the height ratio between the height of the actual resolution and the height of the target reference resolution respectively;
and the second calculation module is used for calculating the scaling ratio according to the width ratio and the height ratio.
In another embodiment, the second calculating module is configured to calculate an average value of the width ratio and the height ratio, and use the average value as the scaling ratio; or,
and the second calculation module is used for comparing the width ratio with the height ratio and taking the smaller ratio of the width ratio and the height ratio as a scaling ratio.
In another embodiment, the second determining unit includes:
the first acquisition module is used for acquiring a target display effect graph adaptive to a target reference resolution from a pre-designed display effect graph library, wherein the display effect graph library comprises a plurality of groups of display effect graphs, and each group of display effect graph is respectively adaptive to each reference resolution;
the first determining module is used for determining the anchor point of the display element according to the target display effect graph;
the second determination module is used for determining a reference point of the display screen;
the recording module is used for recording the coordinate value of the reference point under the target reference resolution;
the second acquisition module is used for acquiring the coordinate difference between the anchor point of the display element and the reference point under the target reference resolution;
the calculation module is used for calculating the anchor point coordinates of the display elements under the actual resolution according to the coordinate values of the reference points under the target reference resolution and the coordinate difference between the anchor points of the display elements and the reference points under the target reference resolution;
and the third determining module is used for determining the display position of the display element under the actual resolution according to the anchor point coordinates.
In another embodiment, the calculating the coordinates of the anchor point of the display element at the actual resolution according to the coordinate values of the reference point at the target base resolution and the coordinate difference between the anchor point of the display element and the reference point at the target base resolution includes:
x=XReference+XDistanceBase*Scale;
y=YReference+YDistanceBase*Scale;
wherein x refers to the abscissa of the anchor point of the display element at the actual resolution and y refers to the ordinate of the anchor point of the display element at the actual resolution; scale represents the zoom ratio; XReference refers to the abscissa of the reference point under the target reference resolution, YReference refers to the ordinate of the reference point under the target reference resolution; XDistanceBase refers to the horizontal coordinate difference between the anchor point of the display element and the reference point at the target base resolution, and YDistanceBase refers to the vertical coordinate difference between the anchor point of the display element and the reference point at the target base resolution.
The self-adaptive display device for displaying the resolution, provided by the embodiment of the invention, acquires multiple preset groups of reference resolutions; acquiring the actual resolution of a display screen; selecting a group of reference resolutions closest to the actual resolution from the plurality of groups of reference resolutions as a target reference resolution according to the actual resolution; calculating a scaling ratio according to the target reference resolution and the actual resolution; determining display elements needing to be displayed under the actual resolution of a display screen, and acquiring the size of the display elements under the target reference resolution; calculating the display size of the display element under the actual resolution of the display screen according to the size and the scaling ratio of the display element under the target reference resolution; determining a display position of the display element at the actual resolution; the display elements are displayed at the actual resolution according to the display size and the display position. The device carries out scaling ratio calculation by setting a plurality of groups of reference resolutions and selecting the reference resolution close to the actual resolution, can adapt to display screens with large differences of various resolutions, and ensures that the display effect after self-adaptation is good and distortion is avoided.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. An adaptive display method for displaying resolution, comprising:
acquiring multiple preset groups of reference resolutions;
acquiring the actual resolution of a display screen;
according to the actual resolution, selecting one group of reference resolution closest to the actual resolution from the multiple groups of reference resolutions as a target reference resolution;
calculating a scaling ratio according to the target reference resolution and the actual resolution;
determining display elements needing to be displayed under the actual resolution of the display screen, and acquiring the size of the display elements under the target reference resolution;
calculating the display size of the display element under the actual resolution of the display screen according to the size of the display element under the target reference resolution and the scaling ratio;
determining a display position of the display element at the actual resolution;
displaying the display element at the actual resolution according to the display size and the display position.
2. The method of claim 1, wherein the target base resolution comprises at least a width of a target base resolution and a height of a target base resolution, wherein the actual resolution comprises at least a width of the actual resolution and a height of the actual resolution, and wherein calculating a scaling ratio based on the target base resolution and the actual resolution comprises:
calculating a width ratio between a width of the actual resolution and a width of the target reference resolution, and a height ratio between a height of the actual resolution and a height of the target reference resolution, respectively;
and calculating the scaling ratio according to the width ratio and the height ratio.
3. The method of claim 2, wherein said calculating a scaling ratio based on said width ratio value and said height ratio value comprises:
calculating the average value of the width ratio and the height ratio, and taking the average value as the scaling ratio; or,
and comparing the width ratio with the height ratio, and taking the smaller ratio of the width ratio and the height ratio as the scaling ratio.
4. The method of claim 1, wherein determining the display position of the display element at the actual resolution comprises:
acquiring a target display effect graph adaptive to the target reference resolution from a pre-designed display effect graph library, wherein the display effect graph library comprises a plurality of groups of display effect graphs, and each group of display effect graph is respectively adaptive to each reference resolution;
determining an anchor point of the display element according to the target display effect graph;
determining a reference point of the display screen, and recording coordinate values of the reference point under the target reference resolution;
acquiring a coordinate difference between the anchor point of the display element and the reference point under the target reference resolution;
calculating the coordinates of the anchor point of the display element under the actual resolution according to the coordinate values of the reference point under the target reference resolution and the coordinate difference between the anchor point of the display element and the reference point under the target reference resolution;
and determining the display position of the display element under the actual resolution according to the anchor point coordinates.
5. The method of claim 4, wherein calculating the anchor point coordinates of the display element at the actual resolution based on the coordinate values of the reference point at the target base resolution and a difference in coordinates between the anchor point of the display element and the reference point at the target base resolution comprises:
x=XReference+XDistanceBase*Scale;
y=YReference+YDistanceBase*Scale;
wherein x refers to the abscissa of the anchor point of the display element at the actual resolution and y refers to the ordinate of the anchor point of the display element at the actual resolution; scale represents the zoom ratio; XReference refers to the abscissa of the reference point at the target base resolution, YReference refers to the ordinate of the reference point at the target base resolution; XDistanceBase refers to the lateral difference between the anchor point of the display element and the reference point at the target base resolution, and YDistanceBase refers to the vertical difference between the anchor point of the display element and the reference point at the target base resolution.
6. An adaptive display device for displaying resolution, comprising:
the first acquisition unit is used for acquiring multiple preset groups of reference resolutions;
a second acquisition unit for acquiring an actual resolution of the display screen;
a selecting unit configured to select, as a target reference resolution, a set of reference resolutions that is closest to the actual resolution from the plurality of sets of reference resolutions, according to the actual resolution;
a first calculation unit configured to calculate a scaling ratio based on the target reference resolution and the actual resolution;
a first determination unit configured to determine a display element that needs to be displayed at an actual resolution of the display screen;
a third acquiring unit configured to acquire a size of the display element at the target reference resolution;
a second calculation unit configured to calculate a display size of the display element at an actual resolution of the display screen based on the size of the display element at the target reference resolution and the zoom ratio;
a second determination unit configured to determine a display position of the display element at the actual resolution;
and the display unit is used for displaying the display element under the actual resolution according to the display size and the display position.
7. The apparatus according to claim 6, wherein the target reference resolution includes at least a width of the target reference resolution and a height of the target reference resolution, and the actual resolution includes at least a width of the actual resolution and a height of the actual resolution, and the first calculation unit includes:
a first calculating module, configured to calculate a width ratio between a width of the actual resolution and a width of the target reference resolution, and a height ratio between a height of the actual resolution and a height of the target reference resolution, respectively;
and the second calculation module is used for calculating the scaling ratio according to the width ratio and the height ratio.
8. The apparatus of claim 7, wherein:
the second calculating module is used for calculating the average value of the width ratio and the height ratio, and taking the average value as the scaling ratio; or,
the second calculation module is configured to compare the width ratio with the height ratio, and use a smaller ratio of the width ratio and the height ratio as the scaling ratio.
9. The apparatus of claim 6, wherein the second determining unit comprises:
the first acquisition module is used for acquiring a target display effect graph adaptive to the target reference resolution from a pre-designed display effect graph library, wherein the display effect graph library comprises a plurality of groups of display effect graphs, and each group of display effect graph is respectively adaptive to each reference resolution;
the first determining module is used for determining the anchor point of the display element according to the target display effect graph;
a second determination module for determining a reference point of the display screen;
the recording module is used for recording the coordinate value of the reference point under the target reference resolution;
the second acquisition module is used for acquiring the coordinate difference between the anchor point of the display element and the reference point under the target reference resolution;
a calculation module, configured to calculate coordinates of an anchor point of the display element at the actual resolution according to coordinate values of the reference point at the target reference resolution and a coordinate difference between the anchor point of the display element and the reference point at the target reference resolution;
and the third determining module is used for determining the display position of the display element under the actual resolution according to the anchor point coordinates.
10. The apparatus of claim 9, wherein the calculating anchor coordinates of the display element at the actual resolution based on coordinate values of the reference point at the target base resolution and a difference in coordinates between the anchor point of the display element at the target base resolution and the reference point comprises:
x=XReference+XDistanceBase*Scale;
y=YReference+YDistanceBase*Scale;
wherein x refers to the abscissa of the anchor point of the display element at the actual resolution and y refers to the ordinate of the anchor point of the display element at the actual resolution; scale represents the zoom ratio; XReference refers to the abscissa of the reference point at the target base resolution, YReference refers to the ordinate of the reference point at the target base resolution; XDistanceBase refers to the lateral difference between the anchor point of the display element and the reference point at the target base resolution, and YDistanceBase refers to the vertical difference between the anchor point of the display element and the reference point at the target base resolution.
CN201611169668.4A 2016-12-16 2016-12-16 Self-adaptive display method and device of display resolutions Pending CN106648511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611169668.4A CN106648511A (en) 2016-12-16 2016-12-16 Self-adaptive display method and device of display resolutions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611169668.4A CN106648511A (en) 2016-12-16 2016-12-16 Self-adaptive display method and device of display resolutions

Publications (1)

Publication Number Publication Date
CN106648511A true CN106648511A (en) 2017-05-10

Family

ID=58823891

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611169668.4A Pending CN106648511A (en) 2016-12-16 2016-12-16 Self-adaptive display method and device of display resolutions

Country Status (1)

Country Link
CN (1) CN106648511A (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108063951A (en) * 2017-12-14 2018-05-22 广东欧珀移动通信有限公司 Transmission method, device and the electronic equipment of non-standard resolution data
CN108334391A (en) * 2017-12-31 2018-07-27 广州金十信息科技有限公司 A kind of multisystem shows adaptation method, electronic equipment and storage medium
CN108427596A (en) * 2018-03-15 2018-08-21 上海哔哩哔哩科技有限公司 Mobile terminal application interface view resolution matching process, device and storage medium
CN108628656A (en) * 2018-05-09 2018-10-09 平安普惠企业管理有限公司 Interface adaptation method, device, computer equipment and storage medium on ios device
CN108897755A (en) * 2018-05-07 2018-11-27 深圳壹账通智能科技有限公司 Webpage generating method, device, computer equipment and storage medium
CN108932050A (en) * 2018-06-14 2018-12-04 珠海金山网络游戏科技有限公司 A method of reducing mobile terminal calorific value when hand trip operation
CN109063378A (en) * 2018-09-11 2018-12-21 苏州云屏网络科技有限公司 A method of target screen is matched applied to drawing boards more in LED program
CN109656506A (en) * 2018-12-27 2019-04-19 大道网络(上海)股份有限公司 A kind of method that realizing adaptive resolution and its visualization system
CN109670422A (en) * 2018-12-05 2019-04-23 北京旷视科技有限公司 Face datection information display method, device, equipment and storage medium
CN110299123A (en) * 2019-07-16 2019-10-01 广州市迪声音响有限公司 The adaptive resolution display methods of audio processor
CN110314376A (en) * 2019-06-04 2019-10-11 福建天晴数码有限公司 The adaptation method and computer readable storage medium of background picture and background light efficiency
CN110969580A (en) * 2019-12-10 2020-04-07 北京猎豹移动科技有限公司 Image display method and device
CN111596878A (en) * 2020-05-13 2020-08-28 北京百度网讯科技有限公司 Screen projection method, device, equipment and storage medium
CN112135057A (en) * 2020-09-28 2020-12-25 北海天下为星科技有限公司 Video image processing method
CN112540736A (en) * 2019-09-20 2021-03-23 上海博泰悦臻电子设备制造有限公司 Screen projection method and device
CN112698803A (en) * 2021-03-24 2021-04-23 统信软件技术有限公司 Display processing method and device and computing equipment
CN113422906A (en) * 2021-06-22 2021-09-21 平安普惠企业管理有限公司 Method and device for setting resolution, computer equipment and storage medium
CN113829996A (en) * 2020-06-24 2021-12-24 逸驾智能科技有限公司 Display method, electronic device, and computer-readable storage medium
WO2022041912A1 (en) * 2020-08-24 2022-03-03 南京巨鲨显示科技有限公司 Method for adapting to optimum resolution and text size of display
CN114756190A (en) * 2022-06-14 2022-07-15 统信软件技术有限公司 Method and device for adjusting zoom based on resolution and computing equipment
WO2024061088A1 (en) * 2022-09-19 2024-03-28 北京字跳网络技术有限公司 Display method and apparatus, electronic device, and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105225201A (en) * 2015-09-06 2016-01-06 网易(杭州)网络有限公司 A kind of method and system of display object adaptive resolution display
CN105760178A (en) * 2016-03-17 2016-07-13 网易(杭州)网络有限公司 Method and device for performing adaption on interface control
CN105912318A (en) * 2016-04-01 2016-08-31 北京京东尚科信息技术有限公司 Self-adaptive display method of terminal screen, terminal, server and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105225201A (en) * 2015-09-06 2016-01-06 网易(杭州)网络有限公司 A kind of method and system of display object adaptive resolution display
CN105760178A (en) * 2016-03-17 2016-07-13 网易(杭州)网络有限公司 Method and device for performing adaption on interface control
CN105912318A (en) * 2016-04-01 2016-08-31 北京京东尚科信息技术有限公司 Self-adaptive display method of terminal screen, terminal, server and system

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108063951A (en) * 2017-12-14 2018-05-22 广东欧珀移动通信有限公司 Transmission method, device and the electronic equipment of non-standard resolution data
CN108334391A (en) * 2017-12-31 2018-07-27 广州金十信息科技有限公司 A kind of multisystem shows adaptation method, electronic equipment and storage medium
CN108427596A (en) * 2018-03-15 2018-08-21 上海哔哩哔哩科技有限公司 Mobile terminal application interface view resolution matching process, device and storage medium
CN108427596B (en) * 2018-03-15 2021-07-02 上海哔哩哔哩科技有限公司 Method and device for matching resolution of mobile terminal application interface view and storage medium
CN108897755A (en) * 2018-05-07 2018-11-27 深圳壹账通智能科技有限公司 Webpage generating method, device, computer equipment and storage medium
CN108628656A (en) * 2018-05-09 2018-10-09 平安普惠企业管理有限公司 Interface adaptation method, device, computer equipment and storage medium on ios device
CN108932050A (en) * 2018-06-14 2018-12-04 珠海金山网络游戏科技有限公司 A method of reducing mobile terminal calorific value when hand trip operation
CN108932050B (en) * 2018-06-14 2021-03-30 珠海金山网络游戏科技有限公司 Method for reducing heat productivity of mobile terminal during hand trip operation
CN109063378A (en) * 2018-09-11 2018-12-21 苏州云屏网络科技有限公司 A method of target screen is matched applied to drawing boards more in LED program
CN109063378B (en) * 2018-09-11 2023-04-07 苏州云屏传媒科技有限公司 Method for matching multiple drawing boards with target screen in LED program
CN109670422A (en) * 2018-12-05 2019-04-23 北京旷视科技有限公司 Face datection information display method, device, equipment and storage medium
CN109656506B (en) * 2018-12-27 2022-02-01 大道网络(上海)股份有限公司 Method for realizing adaptive resolution and visualization system thereof
CN109656506A (en) * 2018-12-27 2019-04-19 大道网络(上海)股份有限公司 A kind of method that realizing adaptive resolution and its visualization system
CN110314376A (en) * 2019-06-04 2019-10-11 福建天晴数码有限公司 The adaptation method and computer readable storage medium of background picture and background light efficiency
CN110299123B (en) * 2019-07-16 2022-06-21 广州市迪声音响有限公司 Adaptive resolution display method for audio processor
CN110299123A (en) * 2019-07-16 2019-10-01 广州市迪声音响有限公司 The adaptive resolution display methods of audio processor
CN112540736B (en) * 2019-09-20 2024-09-13 博泰车联网科技(上海)股份有限公司 Screen projection method and device
CN112540736A (en) * 2019-09-20 2021-03-23 上海博泰悦臻电子设备制造有限公司 Screen projection method and device
CN110969580B (en) * 2019-12-10 2024-02-20 北京猎豹移动科技有限公司 Image display method and device
CN110969580A (en) * 2019-12-10 2020-04-07 北京猎豹移动科技有限公司 Image display method and device
JP2021119387A (en) * 2020-05-13 2021-08-12 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッドBeijing Baidu Netcom Science Technology Co., Ltd. Screen projection method, device, apparatus, and storage media
JP7258071B2 (en) 2020-05-13 2023-04-14 阿波▲羅▼智▲聯▼(北京)科技有限公司 Screen projection method, apparatus, equipment and storage medium
CN111596878A (en) * 2020-05-13 2020-08-28 北京百度网讯科技有限公司 Screen projection method, device, equipment and storage medium
CN113829996B (en) * 2020-06-24 2023-09-08 逸驾智能科技有限公司 Display method, electronic device, and computer-readable storage medium
CN113829996A (en) * 2020-06-24 2021-12-24 逸驾智能科技有限公司 Display method, electronic device, and computer-readable storage medium
WO2022041912A1 (en) * 2020-08-24 2022-03-03 南京巨鲨显示科技有限公司 Method for adapting to optimum resolution and text size of display
CN112135057B (en) * 2020-09-28 2021-09-21 北海天下为星科技有限公司 Video image processing method and system
CN112135057A (en) * 2020-09-28 2020-12-25 北海天下为星科技有限公司 Video image processing method
CN112698803A (en) * 2021-03-24 2021-04-23 统信软件技术有限公司 Display processing method and device and computing equipment
CN113422906A (en) * 2021-06-22 2021-09-21 平安普惠企业管理有限公司 Method and device for setting resolution, computer equipment and storage medium
CN114756190A (en) * 2022-06-14 2022-07-15 统信软件技术有限公司 Method and device for adjusting zoom based on resolution and computing equipment
WO2024061088A1 (en) * 2022-09-19 2024-03-28 北京字跳网络技术有限公司 Display method and apparatus, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
CN106648511A (en) Self-adaptive display method and device of display resolutions
CN106648510B (en) The display methods and device of a kind of display resolution
CN111340752B (en) Screen detection method and device, electronic equipment and computer readable storage medium
US9639914B2 (en) Portrait deformation method and apparatus
CN109992226A (en) Image display method and device and spliced display screen
US10614551B2 (en) Image interpolation methods and related image interpolation devices thereof
US20180197324A1 (en) Virtual viewpoint setting apparatus, setting method, and storage medium
JP2005293577A (en) Method, device, and program for generating high-condensation visual summary of vide area
CN108074237B (en) Image definition detection method and device, storage medium and electronic equipment
JPWO2008129875A1 (en) Detection device, detection method, and integrated circuit for detection
CN110084797A (en) Plane monitoring-network method, apparatus, electronic equipment and storage medium
CN104504387A (en) Correcting method and device for text image
CN110740309A (en) image display method, device, electronic equipment and storage medium
CN110248147B (en) Image display method and device
CN111768396B (en) Distortion measurement method and device for virtual display equipment
US9495609B2 (en) System and method for evaluating data
CN113177941A (en) Steel coil edge crack identification method, system, medium and terminal
CN105323519A (en) Image processing device, display apparatus, and image processing method
CN114066930A (en) Planar target tracking method and device, terminal equipment and storage medium
CN104517273B (en) A kind of Image Super Resolution Processing method and device
CN116168192A (en) Image detection area determination method and device, electronic equipment and storage medium
CN110062151B (en) Smooth image generation device, abnormality determination device, and smooth image generation method
CN113703653A (en) Image processing method, device, equipment and computer readable storage medium
CN113721818B (en) Image processing method, device, equipment and computer readable storage medium
US20240037976A1 (en) Information processing device, information processing method, and computer-readable recording 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170510

RJ01 Rejection of invention patent application after publication