Detailed Description
For the purpose of promoting an understanding of the principles and advantages of the disclosure, reference will now be made in detail to the drawings, in which it is apparent that the embodiments described are only some, but not all embodiments of the disclosure. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
The terminology used in the embodiments of the disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure of embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, the "plurality" generally includes at least two.
It should be understood that the term "and/or" as used herein is merely one relationship describing the association of the associated objects, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used in embodiments of the present disclosure, these descriptions should not be limited to these terms. These terms are only used to distinguish one from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of embodiments of the present disclosure.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a product 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 product or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a commodity or device comprising such element.
Alternative embodiments of the present disclosure are described in detail below with reference to the drawings.
Example 1
Embodiments provided for the present disclosure, namely, embodiments of a content display method.
After obtaining an amplifying instruction for the first display window 2, the embodiment of the disclosure obtains a first display window frame matched with the desktop frame, amplifies the first display window 2 according to the pixel aspect ratio thereof, and makes the first display window frame coincide with the desktop frame, and amplifies to the maximum size allowed by the desktop 1.
Embodiments of the present disclosure are described in detail below in conjunction with fig. 1A.
Step S101, a first pixel aspect ratio of the desktop 1 and a second pixel aspect ratio of the first display window 2 are acquired.
The first display window 2 is a main window of a first process and is displayed on the desktop 1, and display content in the first display window 2 is self-adaptive to the first display window 2.
In the disclosed embodiment, the desktop 1 includes a plurality of display windows therein, and the first display window 2 is one of the display windows.
The pixel aspect ratio refers to the ratio between the pixel width and the pixel height of the display window or desktop 1. The first pixel aspect ratio of the desktop 1 is determined by the resolution of the display device and the resolution of the system settings. The resolution of the display device is determined by the hardware, is unchanged, and the resolution of the system settings is adjustable. For example, the resolution of the display device is 1920×1080 and the pixel aspect ratio is 16:9; the resolution of the system setup is 1080×768 with a pixel aspect ratio of 4:3. And desktop resolution is associated with the resolution of the system settings. The desktop resolution does not change once set in the application.
In the embodiment of the present disclosure, the display windows are all main windows of a process, which can be understood that each display area corresponds to a process with a display function. The display content in the first display window is adaptive to the first display window, which can be understood as the display content is maximally displayed in the first display window according to its own aspect ratio. When the specification of the first display window changes, the display content also changes along with the specification. For example, the progress of displaying the whole body image of the teaching teacher and the progress of displaying the presentation are simultaneously displayed in the desktop; the presentation is adaptively displayed in a display window.
In the desktop 1, each display object is shown by a pixel, and thus, the embodiment of the present disclosure uses a pixel as a basis for comparing the respective display objects.
Step S102, in response to the triggering of the zoom-in instruction of the first display window 2, determining the first frame of the desktop 1 and the second frame of the first display window 2 based on the first pixel aspect ratio and the second pixel aspect ratio.
The second frame and the first frame are identical in side frames and are matched with each other, and the extending direction of the first frame is identical to the extending direction of the second frame.
The frame refers to a display boundary line of a display object. Typically, the desktop 1 and the display window each have 4 frames, and the extending direction of each frame includes a horizontal direction or a vertical direction, for example, the extending directions of the left frame and the right frame of the desktop 1, and the extending directions of the left frame and the right frame of the display window are vertical; the extending directions of the upper frame and the lower frame of the desktop 1 and the extending directions of the upper frame and the lower frame of the display window are all transverse.
The second frame and the first frame are frames which are on the same side and are matched with each other, for example, if the first frame is a left frame of a desktop, the second frame is also a left frame of the first display window; and the length of the second frame is a frame which is to be matched with the length of the first frame.
In a specific embodiment, the determining the first frame of the desktop and the second frame of the first display window based on the first pixel aspect ratio and the second pixel aspect ratio includes the steps of:
step S102a-1, obtaining a difference value based on the second pixel aspect ratio and the first pixel aspect ratio.
In step S102a-2, in response to the difference being less than zero, it is determined that the first frame includes a left or right frame of the desktop 1, and the second frame includes a left or right frame of the first display window 2.
For example, the second pixel aspect ratio is 1.2 and the first pixel aspect ratio is 4:3=1.3; and if the difference is 1.2-1.3= -0.1 and the difference is smaller than zero, determining that the left frame or the right frame of the first display window 2 is matched with the left frame or the right frame of the desktop 1 on the same side.
In step S102a-3, in response to the difference being greater than or equal to zero, it is determined that the first frame includes an upper frame or a lower frame of the desktop 1, and the second frame includes an upper frame or a lower frame of the first display window 2.
For example, the second pixel aspect ratio is 1.5 and the first pixel aspect ratio is 4:3=1.3; and if the difference is 1.5-1.3=0.2 and the difference is greater than zero, determining that the upper frame or the lower frame of the first display window 2 is on the same side as the upper frame or the lower frame of the desktop 1 and is matched with the upper frame or the lower frame of the desktop 1.
In another specific embodiment, the determining the first frame of the desktop and the second frame of the first display window based on the first pixel aspect ratio and the second pixel aspect ratio includes the steps of:
in response to the second pixel aspect ratio being smaller than the first pixel aspect ratio, it is determined that the first frame includes the left or right frame of the desktop 1, and the second frame includes the left or right frame of the first display window 2 in step S102 b-1.
For example, the second pixel aspect ratio is 1.2 and the first pixel aspect ratio is 4:3=1.3; if the second pixel aspect ratio is smaller than the first pixel aspect ratio, it is determined that the left or right frame of the first display window 2 is on the same side as the left or right frame of the desktop 1 and matches each other.
In step S102b-2, in response to the second pixel aspect ratio being greater than or equal to the first pixel aspect ratio, it is determined that the first frame includes an upper or lower frame of the desktop 1, and the second frame includes an upper or lower frame of the first display window 2.
For example, the second pixel aspect ratio is 1.5 and the first pixel aspect ratio is 4:3=1.3; if the second pixel aspect ratio is greater than the first pixel aspect ratio, it is determined that the upper or lower border of the first display window 2 is on the same side as and matches with the upper or lower border of the desktop 1.
The two specific embodiments described above determine the first border of the desktop 1 and the second border of the first display window 2 based on the second pixel aspect ratio and the second pixel aspect ratio. The first frame and the second frame which are on the same side and are matched with each other are rapidly determined by a simple method, so that complex logic judgment is avoided, and the data processing efficiency is improved. The method is not only suitable for horizontal screen display of the computer, but also suitable for vertical screen display of the mobile phone.
Step S103, magnifying the first display window 2 based on the first pixel aspect ratio, and moving the first display window 2 so that the second frame completely overlaps the first frame.
For example, as shown in fig. 1B, this is a display device with a horizontal screen, where the pixel aspect ratio of the first display window 2 before the zooming-in is 1.2, and after the zooming-in instruction is obtained, still zooming in according to the pixel aspect ratio 1.2, because the left frame or the right frame of the first display window 2 is a matching frame, the left frame of the first display window 2 is closely attached to the left frame of the desktop 1 to start displaying, and the lengths of the two frames after zooming-in are the same.
For example, as shown in fig. 1C, this is a vertical screen of the mobile phone, the pixel aspect ratio of the first display window 2 before the zooming-in is 0.9, and after the zooming-in instruction is obtained, still zooming in according to the pixel aspect ratio of 0.9, because the upper frame or the lower frame of the first display window 2 is a matching frame, the upper frame of the first display window 2 is closely attached to the upper frame of the desktop 1 to start displaying, and the lengths of the two frames after zooming-in are the same.
In some specific embodiments, before the triggering of the method in response to the zoom-in instruction of the first display window, the method further includes the steps of:
step S101-1, a third pixel aspect ratio of the display content in the second display window 3 is acquired.
The second display window 3 is a main window of the second process and is displayed on the desktop 1.
Optionally, the display content in the second display window 3 is adaptive to the first display window 2.
In this embodiment, the desktop 1 includes a plurality of display windows therein.
Accordingly, after the enlarging the first display window 2 based on the first pixel aspect ratio and moving the first display window 2 such that the second bezel completely overlaps the first bezel, the method further includes the steps of:
step S104, acquiring other areas outside the first display window 2 in the desktop 1.
Step S105, adjusting the second display window 3 to be displayed in the other area based on the third pixel aspect ratio, so that two opposite borders of the second display window 3 at least partially overlap with two opposite borders of the other area, respectively.
I.e. the second display window 3 is displayed in other areas than the first display window 2, while the second display window 3 is guaranteed to maintain the third pixel aspect ratio.
For example, the left frame and the right frame of the second display window 3 are two opposite frames, and the upper frame and the lower frame of the second display window 3 are two opposite frames.
The two opposite frames of the other area are respectively and completely overlapped with a third frame of the desktop and a fourth frame of the first display window, the third frame of the desktop is opposite to the first frame, and the fourth frame of the first display window is opposite to the second frame.
For example, if the first frame is a left frame of the desktop, the second frame is also a left frame of the first display window, the third frame is a right frame of the desktop, the fourth frame is a right frame of the first display window, and two opposite left frames and right frames in other areas are respectively and completely overlapped with the third frame of the desktop and the fourth frame of the first display window.
The two opposite frames of the other area are respectively and completely overlapped with a part of a fifth frame of the desktop and a part of a sixth frame of the desktop, and the fifth frame and the sixth frame are oppositely arranged and respectively adjacent to two ends of the first frame.
For example, if the first frame is the left frame of the desktop, the second frame is also the left frame of the first display window, the fifth frame is the upper frame of the desktop, the sixth frame is the lower frame of the first display window, and two opposite upper frames and lower frames in other areas are respectively and completely overlapped with a portion of the fifth frame of the desktop and a portion of the sixth frame of the desktop.
Further, the method comprises the following steps:
step S104-1, in response to the area of the other area being zero, hiding the second display window 3, and setting a prompt key 4 for displaying the second display window 3.
For example, as shown in fig. 1D, if the second pixel aspect ratio of the first display window 2 is 1.3 and the first pixel aspect ratio of the desktop 1 is also 1.3, the enlarged first display window 2 will occupy the entire desktop 1, i.e. a full screen display, in which case the disclosed embodiment provides a prompt key 4 and hides the second display window 3, and when viewing of the second display window 3 is required, the hidden second display window 3 can be displayed by the prompt key 4.
According to the embodiment of the disclosure, the display window to be enlarged is compared with the pixel aspect ratio of the desktop 1, the frames which are on the same side and are matched with each other are determined, and the display window is enlarged according to the matching result. The logic judgment steps are simplified, the data processing efficiency is improved, and the flexibility of panoramic intelligent blackboard display is improved.
Example 2
The disclosure further provides an embodiment of a device adapted to the above embodiment, which is configured to implement the method steps described in the above embodiment, and the explanation based on the meaning of the same names is the same as that of the above embodiment, which has the same technical effects as those of the above embodiment, and is not repeated herein.
As shown in fig. 2, the present disclosure provides a content display apparatus 200 including:
a first obtaining unit 201, configured to obtain a first pixel aspect ratio of a desktop and a second pixel aspect ratio of a first display window, where the first display window is a main window of a first process and is displayed on the desktop, and display content in the first display window is adaptive to the first display window;
a response unit 202, configured to determine, in response to a trigger of an enlargement instruction of the first display window, a first frame of the desktop and a second frame of the first display window based on the first pixel aspect ratio and the second pixel aspect ratio, where the second frame and the first frame are the same side frame and are matched with each other, and an extension direction of the first frame is the same as an extension direction of the second frame;
a first amplifying unit 203, configured to amplify the first display window based on the first pixel aspect ratio, and move the first display window such that the second frame completely overlaps the first frame.
Optionally, the response unit 202 includes:
and a first determining subunit configured to determine that the first frame includes a left frame or a right frame of the desktop in response to the second pixel aspect ratio being smaller than the first pixel aspect ratio, and the second frame includes a left frame or a right frame of the first display window.
Optionally, the response unit 202 includes:
and a second determining subunit configured to determine that the first frame includes an upper frame or a lower frame of the desktop in response to the second pixel aspect ratio being greater than or equal to the first pixel aspect ratio, and the second frame includes an upper frame or a lower frame of the first display window.
Optionally, the apparatus further includes:
the second obtaining unit is used for obtaining a third pixel aspect ratio of display content in a second display window before the triggering of the amplifying instruction responding to the first display window, wherein the second display window is a main window of a second process and is displayed on the desktop;
correspondingly, the device further comprises:
a region acquiring unit configured to acquire, in the desktop, a region other than the first display window after the first display window is enlarged based on the first pixel aspect ratio and the first display window is moved so that the second frame completely overlaps the first frame;
and an adjusting unit, configured to adjust the second display window to be displayed in the other area based on the third pixel aspect ratio, so that two opposite borders of the second display window at least partially overlap with two opposite borders of the other area, respectively.
Optionally, the two opposite frames in the other area are respectively and completely overlapped with the third frame of the desktop and the fourth frame of the first display window, the third frame of the desktop is opposite to the first frame, and the fourth frame of the first display window is opposite to the second frame.
Optionally, as shown in fig. 1B, two opposite borders of the other area are respectively overlapped with a part of a fifth border 4 of the desktop and a part of a sixth border 5 of the desktop, where the fifth border is opposite to the sixth border and is respectively adjacent to two ends of the first border.
Optionally, the apparatus further includes:
and the prompting unit is used for hiding the second display window and setting a prompting key for displaying the second display window in response to the fact that the area of the other areas is zero.
According to the embodiment of the disclosure, the display window to be enlarged is compared with the pixel aspect ratio of the desktop, the frames which are on the same side and are matched with each other are determined, and the display window is enlarged according to the matching result. The logic judgment steps are simplified, the data processing efficiency is improved, and the flexibility of panoramic intelligent blackboard display is improved.
Example 3
As shown in fig. 3, the present embodiment provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the one processor to enable the at least one processor to perform the method steps described in the embodiments above.
Example 4
The disclosed embodiments provide a non-transitory computer storage medium storing computer executable instructions that perform the method steps described in the embodiments above.
Example 5
Referring now to fig. 3, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 3 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 3, the electronic device may include a processing means (e.g., a central processor, a graphics processor, etc.) 301 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data required for the operation of the electronic device are also stored. The processing device 301, the ROM 302, and the RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
In general, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 308 including, for example, magnetic tape, hard disk, etc.; and communication means 309. The communication means 309 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 3 shows an electronic device having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device 309, or installed from a storage device 308, or installed from a ROM 302. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing means 301.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.