Screen capture method, device, electronic device, and storage medium
By using a multi-finger sliding operation to obtain the sliding starting position and the sub-window relationship, the problem of inaccurate and complicated screenshots in split-screen display mode is solved, and the screenshot operation is simplified and accurately positioned.
Patent Information
- Application Number
- CN202210878190.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-25
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-07-25
Smart Images

Figure CN115933954B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic devices, and more specifically, to a screenshot method, device, electronic device, and storage medium. Background Art
[0002] With the development of science and technology, electronic devices are becoming more and more widely used and have more and more functions. They have become one of the necessities in people's daily lives. At present, electronic devices generally support split-screen display. However, when the electronic device is in split-screen display, when the user needs to take a screenshot, the current screenshot operation has the problem of unclear screenshot object, resulting in inaccurate screenshots and complicated screenshot operations. Summary of the Invention
[0003] In view of the above problems, the present application proposes a screenshot method, device, electronic device and storage medium to solve the above problems.
[0004] In a first aspect, an embodiment of the present application provides a screenshot method, which is applied to an electronic device, and the method includes: displaying a target interface, wherein the target interface includes a first window and a second window superimposed on the first window, and the first window is divided into at least two sub-windows; in response to a multi-finger sliding operation applied to the target interface, obtaining multiple sliding starting positions corresponding to the multi-finger sliding operation; determining a positional relationship between the multiple sliding starting positions and the at least two sub-windows as a first positional relationship, and determining a positional relationship between the second window and the at least two sub-windows as a second positional relationship; and based on the first positional relationship and the second positional relationship, capturing the display content of the target interface.
[0005] In a second aspect, an embodiment of the present application provides a screenshot device, which is applied to an electronic device, and the device includes: a target interface display module, which is used to display a target interface, wherein the target interface includes a first window and a second window superimposed on the first window, and the first window is divided into at least two sub-windows; a sliding starting position acquisition module, which is used to respond to a multi-finger sliding operation acting on the target interface and obtain multiple sliding starting positions corresponding to the multi-finger sliding operation; a position relationship determination module, which is used to determine the position relationship between the multiple sliding starting positions and the at least two sub-windows as a first position relationship, and determine the position relationship between the second window and the at least two sub-windows as a second position relationship; a display content interception module, which is used to intercept the display content of the target interface based on the first position relationship and the second position relationship.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor executes the above method.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which program code is stored, and the program code can be called by a processor to execute the above method.
[0008] The screenshot method, device, electronic device and storage medium provided by the embodiments of the present application display a target interface, wherein the target interface includes a first window and a second window superimposed on the first window, the first window is divided into at least two sub-windows, and responds to a multi-finger sliding operation on the target interface, obtains multiple sliding starting positions corresponding to the multi-finger sliding operation, determines the positional relationship between the multiple sliding starting positions and the at least two sub-windows as the first positional relationship, and determines the positional relationship between the second window and the at least two sub-windows as the second positional relationship, and captures the display content of the target interface based on the first positional relationship and the second positional relationship, thereby determining the object to be screenshotted based on the multiple sliding starting positions of the multi-finger sliding operation and taking a screenshot, without the need for tedious cropping and dragging, and without worrying about floating window coverage, thereby improving the speed and accuracy of screenshots. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A schematic structural diagram showing a folded state of an electronic device that can be used in the toolbar display method provided in an embodiment of the present application;
[0011] Figure 2 A schematic structural diagram showing an electronic device in an expanded state that can be used in a method for displaying a toolbar provided in an embodiment of the present application;
[0012] Figure 3 A schematic structural diagram of another electronic device that can be used for the toolbar display method provided in an embodiment of the present application is shown;
[0013] Figure 4 A schematic diagram showing a process flow of a screenshot method provided by an embodiment of the present application is shown;
[0014] Figure 5A first interface diagram of an electronic device provided in an embodiment of the present application is shown;
[0015] Figure 6 A first interaction diagram of an electronic device provided in an embodiment of the present application is shown;
[0016] Figure 7 A second interface diagram of an electronic device provided in an embodiment of the present application is shown;
[0017] Figure 8 A second interaction diagram of an electronic device provided in an embodiment of the present application is shown;
[0018] Figure 9 A third interface diagram of an electronic device provided in an embodiment of the present application is shown;
[0019] Figure 10 A schematic diagram showing a process flow of a screenshot method provided by an embodiment of the present application is shown;
[0020] Figure 11 Shows the application Figure 10 Schematic diagram of the process of step S240 of the screenshot method shown;
[0021] Figure 12 Shows the application Figure 11 Schematic diagram of the process of step S241 of the screenshot method shown;
[0022] Figure 13 Shows the application Figure 12 Schematic diagram of the process of step S2412 of the screenshot method shown;
[0023] Figure 14 Shows the application Figure 13 Schematic diagram of the process of step S24121 of the screenshot method shown;
[0024] Figure 15 A fourth interface diagram of an electronic device provided in an embodiment of the present application is shown;
[0025] Figure 16 A third interaction schematic diagram of an electronic device provided in an embodiment of the present application is shown;
[0026] Figure 17 A fifth interface diagram of an electronic device provided in an embodiment of the present application is shown;
[0027] Figure 18 A fourth interaction schematic diagram of an electronic device provided in an embodiment of the present application is shown;
[0028] Figure 19 A sixth interface diagram of an electronic device provided in an embodiment of the present application is shown;
[0029] Figure 20 A schematic diagram showing a process flow of a screenshot method provided by an embodiment of the present application is shown;
[0030] Figure 21 A seventh interface diagram of an electronic device provided in an embodiment of the present application is shown;
[0031] Figure 22 A fifth interaction diagram of the electronic device provided in an embodiment of the present application is shown;
[0032] Figure 23 A schematic diagram showing a process flow of a screenshot method provided by an embodiment of the present application is shown;
[0033] Figure 24 A schematic diagram showing a process flow of a screenshot method provided by an embodiment of the present application is shown;
[0034] Figure 25 A schematic diagram of a framework of a screenshot method that can be used in an embodiment of the present application is shown;
[0035] Figure 26 A module block diagram of a screenshot device provided by an embodiment of the present application is shown;
[0036] Figure 27 A block diagram of an electronic device for executing a screenshot method according to an embodiment of the present application is shown;
[0037] Figure 28 A storage unit for storing or carrying program codes for implementing the screenshot method according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0038] In order to enable people skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0039] When people use electronic devices to browse information, if they see content of interest, users can quickly save the content of interest in the form of pictures, so screenshot technology came into being. At present, screenshots are usually taken for a single window on the screen. For electronic devices with folding screens or other electronic devices with larger screens, if the electronic device receives a user's screenshot operation when displaying content on multiple windows, there may be a problem that it is unclear whether the screenshot object is a certain window or all windows, resulting in inaccurate screenshots and complicated screenshot operations. At present, in the split-screen display mode, when a user's screenshot operation is received, two bubble pop-ups will appear on the screenshot pop-up window, previewing the screenshot of the split-screen area. After the user clicks on the bubble to enter the editing page, the cropping box automatically selects the image range of the clicked segment area for the user to crop to obtain a split-screen screenshot, resulting in cumbersome screenshot operations.
[0040] To address the above issues, the inventors, after extensive research, have discovered and proposed the screenshot method, device, electronic device, and storage medium provided in the embodiments of this application. By determining the target for screenshot based on multiple sliding starting positions using a multi-finger sliding operation, the screenshot is taken. This eliminates the need for tedious cropping and dragging, and eliminates the need to worry about floating window coverage, thereby improving the speed and accuracy of screenshots. The specific screenshot method is described in detail in the subsequent embodiments.
[0041] The following describes the application environment of the screenshot method provided in the embodiment of the present application.
[0042] See also Figure 1 The electronic device 100 may be, but is not limited to, a mobile phone, a tablet computer, a game console, a smart wearable device, a vehicle-mounted device, or other electronic devices. The electronic device 100 of this embodiment is described using a mobile phone as an example.
[0043] The electronic device 100 includes a foldable housing assembly 110, a flexible display 120, and electronic components (not shown). The electronic components are disposed within the foldable housing assembly 110, and the flexible display 120 is placed on the foldable housing assembly 110. The foldable housing assembly 110 is used to support the flexible display 120 and protect the electronic components. The electronic components may include, but are not limited to, a central processing unit, memory, camera, receiver, fingerprint module, etc. The specific electronic components are not limited in the embodiments of this application.
[0044] The foldable housing assembly 110 includes a first housing 111, a second housing 112, and a hinge mechanism 113. The first housing 111 and the second housing 112 are respectively connected to either side of the hinge mechanism 113. The second housing 112 can be folded or unfolded relative to the first housing 111 via the hinge mechanism 113, allowing the foldable housing assembly 110 to drive the flexible display 120 to fold or unfold. When the foldable housing assembly 110 and the flexible display 120 are folded, the electronic device 100 is relatively small, making it easy to store and carry. When the foldable housing assembly 110 and the flexible display 120 are unfolded, the electronic device 100 is relatively large, making it easier to display information.
[0045] See also Figure 2 In this embodiment, the flexible display screen 120 includes a first display portion 121 connected to the first housing 111, a second display portion 122 connected to the second housing 112, and a bendable display portion 123 connected to the first display portion 121 and the second display portion 122. The first display portion 121, the second display portion 122, and the bendable display portion 123 can form a plurality of display areas (for example, two display areas, three display areas, four display areas, etc., N display areas) in correspondence. The first display portion 121 and the second display portion 122 fold or unfold relative to each other as the first housing 111 and the second housing 112 fold or unfold, respectively. The bendable display portion 123 bends or flattens as the first display portion 121 and the second display portion 122 fold or unfold. In some embodiments, the first display portion 121, the second display portion 122, and the bendable display portion 123 may be an integral structure, making the flexible display screen 120 a single-piece flexible display screen; alternatively, in other embodiments, the bendable display portion 123 may be a bendable flexible portion, while the first display portion 121 and the second display portion 122 may be non-flexible portions, and the first display portion 121 and the second display portion 122 may be folded or unfolded relative to each other via the bendable display portion 123. In this embodiment, when the first housing 111 and the second housing 112 are in a superimposed state, the first display portion 121 and the second display portion 122 are separated, giving the electronic device 100 a structure with an outward-folding screen. This allows the user to view the display content of the flexible display screen 120 even when folded, thereby improving the convenience of using the electronic device 100. In some other embodiments, when the first shell 111 and the second shell 112 are overlapped, the first display portion 121 and the second display portion 122 are close to each other, so that the electronic device 100 presents an inward folding screen structure to protect the flexible display screen 120 from scratches and damage.
[0046] It should be understood that the naming of the above-mentioned first display portion 121, the second display portion 122 and the bent display portion 123 is only provided for the convenience of description and does not serve as a structural limitation of the flexible display screen 120. In actual application scenarios, the first display portion 121, the second display portion 122 and the bent display portion 123 may have no obvious boundaries, or the flexible display screen 120 may appear in other divided structures. For example, the flexible display screen 120 includes a first display portion 121 and a second display portion 122 connected to the first display portion 121, and the first display portion 121 and the second display portion 122 can rotate relative to each other to fold or unfold.
[0047] See also Figure 3 In addition to the aforementioned folding screen electronic device, the electronic device 100 may also be a non-folding screen electronic device. It should be noted that in this embodiment, the shape and structure of the electronic device 100 are not limited, as long as they are applicable to this solution.
[0048] See also Figure 4 , Figure 4 The flowchart of the screenshot method provided by an embodiment of the present application is shown. The method is used to determine the screenshot object by multiple sliding starting positions based on a multi-finger sliding operation, without the need for tedious cropping and dragging, and without worrying about floating window coverage, thereby improving the speed and accuracy of screenshots. In a specific embodiment, the method is applied to Figure 8 The screenshot device 200 and the electronic device 100 ( Figure 9 ). The following will take electronic devices as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic devices used in this embodiment can include smart phones, tablet computers, wearable electronic devices, etc., which are not limited here. Figure 4 The process shown is described in detail, and the screenshot method may specifically include the following steps:
[0049] Step S110: displaying a target interface, wherein the target interface includes a first window and a second window superimposed and displayed on the first window, and the first window is divided into at least two sub-windows.
[0050] In this embodiment, the electronic device may display a target interface, wherein the target interface may include a first window and a second window superimposed and displayed on the first window, and the first window is divided into at least two sub-windows.
[0051] In some embodiments, the first window can be understood as a lower window in the target interface, and the second window can be understood as an upper window in the target interface, wherein the second window is displayed superimposed on the first window, that is, the upper window is displayed superimposed on the lower window. As an operative embodiment, the size of the second window can be smaller than the size of the first window, that is, when the second window is displayed superimposed on the first window, it covers part of the area of the first window.
[0052] In some embodiments, when the second window is displayed superimposed on the first window, the superimposed position of the second window on the first window can be fixed, or the superimposed position of the second window on the first window can be changed as needed. For example, if the superimposed position of the second window on the first window is fixed, the superimposed position of the second window on the first window can be unchanged by default, or it can be unchanged after the user selects a position; if the superimposed position of the second window on the first window is changed as needed, the superimposed position of the second window on the first window can be changed according to the drag operation acting on the second window, or it can be changed according to the rotation of the electronic device, etc., which are not limited here. As a way, the second window being superimposed on the first window may include: the second window can be displayed floating on the first window.
[0053] In some embodiments, the first window is divided into at least two sub-windows. For example, when the first window is dual-split, the first window can be divided into two sub-windows, such as a first sub-window and a second sub-window; when the first window is tri-split, the first window can be divided into three sub-windows, such as a first sub-window, a second sub-window, and a third sub-window. Of course, in this embodiment, the first window can also be divided into more windows, which will not be repeated here.
[0054] In some embodiments, the content displayed in the first window and the second window may be the same or different, and the content displayed in the first window and the content displayed in the second window may be provided by the same application or different applications. The content displayed in the at least two sub-windows may be the same or different, and the content displayed in the at least two sub-windows may be provided by the same application or different applications, etc., which are not limited here.
[0055] See also Figure 5 , Figure 5 1 shows a first interface diagram of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device displays a target interface, which includes a first window and a second window 20 superimposed on the first window, wherein the first window includes a first sub-window 11 and a second sub-window 12.
[0056] Step S120: In response to a multi-finger sliding operation on the target interface, a plurality of sliding start positions corresponding to the multi-finger sliding operation are obtained.
[0057] In this embodiment, during the display of the target interface, a touch operation on the target interface may be detected. The touch operation may include a single-finger click operation, a multi-finger click operation, a single-finger press operation, a multi-finger press operation, a single-finger slide operation, a multi-finger slide operation, a single-finger long press operation, a multi-finger long press operation, etc., without limitation herein. When a multi-finger slide operation on the target interface is detected, the multi-finger slide operation on the target interface may be responded to and multiple slide start positions corresponding to the multi-finger slide operation may be obtained.
[0058] In some embodiments, during the display of a target interface, a touch operation applied to the target interface may be detected. Upon detecting a multi-finger sliding operation applied to the target interface, it may be detected whether the sliding direction of the multi-finger sliding operation satisfies a preset sliding direction, and whether the sliding distance of the multi-finger sliding operation satisfies a preset sliding distance. Upon determining that the sliding direction of the multi-finger sliding operation satisfies the preset sliding direction and the sliding distance of the multi-finger sliding operation satisfies the preset sliding distance, multiple sliding starting positions corresponding to the multi-finger sliding operation may be obtained. In one practicable embodiment, the preset sliding direction includes a downward slide.
[0059] In some embodiments, a multi-finger sliding operation on a target interface may refer to a sliding operation on multiple touch points on the target interface. Therefore, in this embodiment, during the display of the target interface, a detection may be performed to determine whether a sliding operation on multiple touch points has occurred. When a sliding operation on multiple touch points is detected, it may be determined that a multi-finger sliding operation on the target interface has been detected. For example, when it is detected that multiple touch points on the target interface have slid downward by a preset sliding distance, multiple sliding starting positions corresponding to the multi-finger sliding operation may be obtained.
[0060] In some embodiments, a coordinate system can be established with the center point of the electronic device as the origin and the horizontal and vertical axes of the electronic device as the coordinate axis directions, or a coordinate system can be established with a vertex of the electronic device as the origin and the horizontal and vertical axes of the electronic device as the coordinate axis directions. Then, obtaining multiple sliding starting positions corresponding to the multi-finger sliding operation can include: obtaining coordinate information of each of the multiple starting positions corresponding to the multi-finger sliding operation in the coordinate system. For example, assuming that the multi-finger sliding operation is a three-finger sliding operation, then the coordinate information of each of the three starting positions corresponding to the three-finger sliding operation in the coordinate system can be obtained.
[0061] As an practicable approach, the multiple sliding start positions corresponding to the multiple sliding operations may include: the multiple initial landing positions corresponding to the multi-finger sliding operation on the target interface. Therefore, the multiple sliding start positions corresponding to the multi-finger sliding operation can be obtained by obtaining the multiple initial landing positions corresponding to the multi-finger sliding operation on the target interface.
[0062] In some embodiments, in addition to obtaining multiple sliding start positions corresponding to the multi-finger sliding operation, the positions of the at least two sub-windows, the position of the second window, and the position of the first window may also be obtained. For example, when a coordinate system is established, the coordinate information of each of the at least two sub-windows in the coordinate system may also be obtained, the coordinate information of the second window in the coordinate system may be obtained, and / or the coordinate information of the first window in the coordinate system may be obtained, etc., without limitation herein.
[0063] Step S130: determining a positional relationship between the plurality of sliding start positions and the at least two sub-windows as a first positional relationship, and determining a positional relationship between the second window and the at least two sub-windows as a second positional relationship.
[0064] In this embodiment, the positional relationship between the multiple sliding starting positions and at least two sub-windows can be determined, and the positional relationship between the multiple sliding starting positions and at least two sub-windows can be used as the first positional relationship; and the positional relationship between the second window and at least two sub-windows can be determined, and the positional relationship between the second window and at least two sub-windows can be used as the second positional relationship.
[0065] In some embodiments, when multiple sliding starting positions and the positions of at least two sub-windows are obtained, the positional relationship between the multiple sliding starting positions and the at least two sub-windows can be determined as a first positional relationship based on the multiple sliding starting positions and the positions of at least two sub-windows; when the position of the second window and the positions of at least two sub-windows are obtained, the positional relationship between the second window and the at least two sub-windows can be determined as a second positional relationship based on the position of the second window and the positions of at least two sub-windows.
[0066] As an implementable method, when the coordinate information of a multi-finger sliding operation and the coordinate information of at least two sub-windows are obtained, the positional relationship between the multiple sliding starting positions and the at least two sub-windows can be determined as a first positional relationship based on the coordinate information of the multi-finger sliding operation and the coordinate information of at least two sub-windows; when the coordinate information of a second window and the coordinate information of at least two sub-windows are obtained, the positional relationship between the second window and the at least two sub-windows can be determined as a second positional relationship based on the coordinate information of the second window and the coordinate information of at least two sub-windows.
[0067] In some embodiments, the first position relationship may include: multiple sliding starting positions are all located in one sub-window of at least two sub-windows; or, multiple sliding starting positions are not all located in one sub-window of at least two sub-windows, wherein multiple sliding starting positions are not all located in one sub-window of at least two sub-windows may include: multiple sliding starting positions are located in two sub-windows; multiple sliding starting positions are located in three sub-windows; multiple sliding starting positions are located in four sub-windows; multiple sliding starting positions are located in five sub-windows, etc., which are not limited here.
[0068] In some embodiments, the second positional relationship may include: the second window is completely superimposed on one of the at least two sub-windows; or the second window is partially superimposed on one of the at least two sub-windows. The second window partially superimposing on one of the at least two sub-windows may include: a larger area of the second window is superimposed on one sub-window and the remaining area is superimposed on the other sub-window; approximately half of the second window is superimposed on one sub-window and the remaining area is superimposed on the other sub-window; a smaller area of the second window is superimposed on one sub-window and the remaining area is superimposed on the other sub-window, etc., which are not limited herein.
[0069] Step S140: Based on the first position relationship and the second position relationship, intercept the display content of the target interface.
[0070] In this embodiment, when the first position relationship and the second position relationship are obtained, the display content of the target interface can be intercepted based on the first position relationship and the second position relationship.
[0071] In some embodiments, intercepting the display content of the target interface may include: intercepting the display content of the second window and the display content in the first window that is not covered by the second window; intercepting the display content of the second window and the display content in a sub-window that is not covered by the second window; intercepting the display content of a sub-window; intercepting part of the display content of the second window and the display content in a sub-window that is not covered by the second window, etc., which are not limited here.
[0072] See also Figure 6 , Figure 6 1 shows a first interactive schematic diagram of an electronic device provided by an embodiment of the present application. Figure 6As shown, the electronic device displays a target interface, which includes a first window and a second window 20 superimposed on the first window, wherein the first window includes a first sub-window 11 and a second sub-window 12. When multiple sliding start positions are all located within the first sub-window 11, the display content of the second window 20 within the first sub-window 11 and the display content within the first sub-window 11 not covered by the second window 20 are intercepted.
[0073] See also Figure 7 , Figure 7 Schematic diagram of the second interface of the electronic device provided in the embodiment of the present application is shown. Figure 7 As shown, through Figure 6 By capturing the display content of the second window 20 in the first sub-window 11 and the display content in the first sub-window 11 not covered by the second window 20 in the manner shown, a first screenshot 30 can be obtained, wherein the first screenshot 30 can be displayed floating on the first sub-window 11.
[0074] See also Figure 8 , Figure 8 Schematic diagram of the second interaction of the electronic device provided in the embodiment of the present application is shown. Figure 8 As shown, the electronic device displays a target interface, which includes a first window 10 and a second window 20 superimposed on the first window 10, wherein the first window includes a first sub-window 11 and a second sub-window 12. When multiple sliding start positions are simultaneously located within the first sub-window 11 and the second sub-window 12, the display content of the second window 20 and the display content within the first sub-window 11 and the second sub-window 12 that is not covered by the second window 20 are intercepted.
[0075] See also Figure 9 , Figure 9 FIG. 1 shows a third interface diagram of an electronic device provided in an embodiment of the present application. Figure 9 As shown, through Figure 8 By capturing the display content of the second window 20 and the display content of the first sub-window 11 and the second sub-window 12 that is not covered by the second window 20 in the manner shown, a second screenshot 40 can be obtained, wherein the first screenshot 40 can be displayed floating on the first sub-window 11.
[0076] A screenshot method provided by an embodiment of the present application displays a target interface, wherein the target interface includes a first window and a second window superimposed on the first window, the first window is divided into at least two sub-windows, and in response to a multi-finger sliding operation on the target interface, a plurality of sliding starting positions corresponding to the multi-finger sliding operation are obtained, a positional relationship between the plurality of sliding starting positions and the at least two sub-windows is determined as a first positional relationship, and a positional relationship between the second window and the at least two sub-windows is determined as a second positional relationship, and based on the first positional relationship and the second positional relationship, the display content of the target interface is captured, so that the object to be screenshotted is determined by taking a screenshot based on the plurality of sliding starting positions of the multi-finger sliding operation, without the need for tedious cropping and dragging, and without worrying about floating window coverage, thereby improving the speed and accuracy of screenshots.
[0077] See also Figure 10 , Figure 10 The flowchart of the screenshot method provided by an embodiment of the present application is shown. The method is applied to the above electronic device. Figure 10 The process shown is described in detail, and the screenshot method may specifically include the following steps:
[0078] Step S210: displaying a target interface, wherein the target interface includes a first window and a second window superimposed and displayed on the first window, and the first window is divided into at least two sub-windows.
[0079] Step S220: In response to a multi-finger sliding operation on the target interface, a plurality of sliding start positions corresponding to the multi-finger sliding operation are obtained.
[0080] Step S230: determining a positional relationship between the plurality of sliding start positions and the at least two sub-windows as a first positional relationship, and determining a positional relationship between the second window and the at least two sub-windows as a second positional relationship.
[0081] For the detailed description of steps S210 to S230 , please refer to steps S110 to S130 , which will not be repeated here.
[0082] Step S240: If it is determined based on the first position relationship that the multiple sliding starting positions are all located in the target sub-window of the at least two sub-windows, then based on the second position relationship, the display content in the second window and the display content in the target sub-window are intercepted, wherein the target sub-window is any one of the at least two sub-windows.
[0083] In this embodiment, when the first position relationship is obtained, it can be determined based on the first position relationship whether the multiple sliding starting positions are all located in any one sub-window (target sub-window) of the at least two sub-windows. If the multiple sliding starting positions are all located in the target sub-window of the at least two sub-windows, it can be considered that the user has triggered a split-screen screenshot, and based on the second position relationship, the display content in the second window and the display content in the target sub-window can be captured.
[0084] In some embodiments, when a coordinate system is established, coordinate information of each of the multiple sliding start positions can be obtained, and the coordinate areas of each of the at least two sub-windows can be obtained. Based on this, the coordinate information of each of the multiple sliding start positions can be compared with the coordinate areas of each of the at least two sub-windows to determine whether the coordinate information of the multiple sliding start positions are all located within the coordinate area of the target sub-window among the multiple sub-windows. If it is determined that the coordinate information of the multiple sliding start positions are all located within the coordinate area of the target sub-window, it can be determined that the multiple sliding start positions are all located within the target sub-window; if it is determined that the coordinate information of the multiple sliding start positions are not all located within the target sub-window (one of the sub-windows), it can be determined that the multiple sliding start positions are not all located within the target sub-window.
[0085] As an implementable manner, assuming that the at least two sub-windows include a first sub-window and a second sub-window, and the multi-finger sliding operation includes a three-finger sliding operation, then it can be determined whether the three sliding starting positions are all located in the first sub-window or whether they are all located in the second sub-window, wherein if it is determined that the three sliding starting positions are all located in the first sub-window or all located in the second sub-window, it can be determined that the multiple sliding starting positions are all located in the target sub-window, and if two sliding starting positions are located in the first sub-window and one sliding starting position is located in the second sub-window, or if one sliding starting position is located in the first sub-window and two sliding starting positions are located in the second sub-window, it can be determined that the multiple sliding starting positions are not all located in the target sub-window.
[0086] In some embodiments, based on the second position relationship, intercepting the display content in the second window and the display content in the target sub-window may include: if the second position relationship indicates that the second window is not located in the target sub-window, then the display content in the target sub-window can be intercepted; if the second position relationship indicates that the second window is completely located in the target sub-window, then the display content in the second window and the display content in the target sub-window not covered by the second window can be intercepted; if the second position relationship indicates that the area where the second window is located in the target sub-window meets the first preset condition, then the display content in the second window and the display content in the target sub-window not covered by the second window can be intercepted; if the second position relationship indicates that the area where the second window is located in the target sub-window meets the second preset condition, then the display content in the second window located in the target sub-window and the display content in the target sub-window not covered by the second window can be intercepted; if the second position relationship indicates that the area where the second window is located in the target sub-window meets the third preset condition, then the display content of the target sub-window can be intercepted.
[0087] See also Figure 11 , Figure 11 Shows the application Figure 10 The flowchart of step S240 of the screenshot method is shown below. Figure 11 The process shown is described in detail, and the method may specifically include the following steps:
[0088] Step S241: If it is determined based on the second positional relationship that the second window and the target sub-window have an overlapping area, then based on the overlapping area, the display content in the second window and the display content in the target sub-window are intercepted.
[0089] In this embodiment, when the first position relationship and the second position relationship are obtained, it can be determined based on the first position relationship whether the multiple sliding starting positions are all located in the target sub-window of the at least two sub-windows; if the multiple sliding starting positions are all located in the target sub-window of the at least two sub-windows, it can be determined based on the second position relationship whether there is an overlapping area between the second window and the target sub-window.
[0090] In some embodiments, when a coordinate system is established, the coordinate area of the target sub-window and the coordinate area of the second window can be obtained. Based on this, the coordinate area of the target sub-window and the coordinate area of the second window can be compared to determine whether the coordinate area of the target sub-window and the coordinate area of the second window have the same coordinate area. If it is determined that the coordinate area of the target sub-window and the coordinate area of the second window have the same coordinate area, it can be determined that the second window and the target sub-window have an overlapping area; if it is determined that the coordinate area of the target sub-window and the coordinate area of the second window do not have the same coordinate area, it can be determined that the second window and the target sub-window do not have an overlapping area.
[0091] In some embodiments, it may be determined whether the display content in the target sub-window is obscured by the display content in the second window. If it is determined that the display content in the target sub-window is obscured by the display content in the second window, it may be determined that an overlapping area exists between the second window and the target sub-window; if it is determined that the display content in the target sub-window is not obscured by the display content in the second window, it may be determined that no overlapping area exists between the second window and the target sub-window.
[0092] Among them, when it is determined that there is an overlapping area between the second window and the target sub-window, the display content in the second window and the display content in the target sub-window can be intercepted based on the overlapping area. As an implementable method, when it is determined that there is an overlapping area between the second window and the target sub-window, the size of the overlapping area can be obtained, and based on the size of the overlapping area, the display content in the second window and the display content in the target sub-window can be intercepted. As another implementable method, when it is determined that there is an overlapping area between the second window and the target sub-window, the ratio of the overlapping area to the second window can be obtained, and based on the ratio, the display content in the second window and the display content in the target sub-window can be intercepted, etc., which are not limited here.
[0093] See also Figure 12 , Figure 12 Shows the application Figure 11 The flowchart of step S241 of the screenshot method shown in FIG. Figure 12 The process shown is described in detail, and the method may specifically include the following steps:
[0094] Step S2411: If it is determined based on the second positional relationship that the second window and the target sub-window have an overlapping area, then the ratio between the area of the second window within the target sub-window and the area of the second window is obtained.
[0095] In this embodiment, if it is determined that the second window and the target sub-window have an overlapping area, the ratio of the area of the second window within the target sub-window to the area of the second window can be obtained. For example, assuming that the area of the second window within the target sub-window is S1 and the area of the second window is S2, the ratio of the area of the second window within the target sub-window to the area of the second window is: S1 / S2.
[0096] In some embodiments, when a coordinate system is established, the horizontal and vertical lengths of the second window in the coordinate system can be obtained, and the area size of the second window in the coordinate system can be determined based on the horizontal and vertical lengths of the second window in the coordinate system. In addition, the horizontal and vertical lengths of the overlapping area in the coordinate system can be obtained, and the area size of the overlapping area in the coordinate system can be determined based on the horizontal and vertical lengths of the overlapping area in the coordinate system. Based on this, the ratio between the area of the second window within the target sub-window and the area of the second window can be determined based on the area size of the second window in the coordinate system and the area size of the overlapping area in the coordinate system.
[0097] Step S2412: Based on the ratio, intercept the display content in the second window and the display content in the target sub-window.
[0098] In this embodiment, when the ratio between the area of the second window within the target sub-window and the area of the second window is obtained, the display content within the second window and the display content within the target sub-window can be intercepted based on the ratio. If the ratio is different, the intercepted display content can be different.
[0099] See also Figure 13 , Figure 13 Shows the application Figure 12 The flowchart of step S2412 of the screenshot method shown in FIG. Figure 13 The process shown is described in detail, and the method may specifically include the following steps:
[0100] Step S24121: If the ratio is greater than a first ratio threshold, all display content in the second window and the display content in the target sub-window that is not covered by the second window are intercepted.
[0101] In some embodiments, the electronic device may pre-set and store a first ratio threshold and a second ratio threshold, wherein the first ratio threshold is greater than the second ratio threshold. The first ratio threshold is used as a basis for determining the ratio between the area of the second window located within the target sub-window and the area of the second window, and the second ratio threshold is used as a basis for determining the ratio between the area of the second window located within the target sub-window and the area of the second window. Therefore, in this embodiment, when the ratio is obtained, the ratio can be compared with the first ratio threshold and the second ratio threshold respectively to determine the size relationship between the ratio and the first ratio threshold and the second ratio threshold.
[0102] In some embodiments, if the ratio is greater than a first ratio threshold, it can be determined that the area of the second window within the target sub-window accounts for a higher proportion, that is, it is determined that most of the area of the second window is located within the target sub-window. At this time, it can be considered that when the user takes a screenshot, there is a high possibility that he or she desires to capture all the displayed content within the second window. Therefore, all the displayed content within the second window and the displayed content in the target sub-window that is not covered by the second window can be captured.
[0103] As an implementable method, since there is still a part of the area of the second window that is not located within the target sub-window, when it is determined that the ratio is greater than the first ratio, the second window can be controlled to automatically move toward the target sub-window, and when it is determined that the second window moves to be completely located within the target sub-window, all the display content in the second window and the display content in the target sub-window that is not covered by the second window can be intercepted.
[0104] As another feasible method, since there is still a part of the area of the second window that is not located within the target sub-window, when it is determined that the ratio is greater than the first ratio, the second window can be reduced proportionally, and when it is determined that the second window is reduced to be completely located within the target sub-window, all the display content in the second window and the display content in the target sub-window that is not covered by the second window can be captured.
[0105] As another feasible method, since there is still a part of the area of the second window that is not located in the target sub-window, therefore, when it is determined that the ratio is greater than the first ratio, the display position and display size of the second window can be kept unchanged, and the display content in the second window can be reduced proportionally. When it is determined that the display content in the second window is reduced to be completely located in the target sub-window, all the display content in the second window and the display content in the target sub-window that is not covered by the second window can be intercepted.
[0106] See also Figure 14 , Figure 14 Shows the application Figure 13The flowchart of step S24121 of the screenshot method shown in FIG. Figure 14 The process shown is described in detail, and the method may specifically include the following steps:
[0107] Step S241211: If the ratio is greater than the first ratio threshold, the second window is proportionally reduced to a size consistent with the size of the overlapping area.
[0108] In some embodiments, if it is determined that the ratio is greater than a first ratio threshold, the second window may be proportionally reduced to match the size of the overlapping area. For example, assuming the size of the second window's area is S1 and the size of the overlapping area is S2, the size of the second window's area may be proportionally reduced from S1 to S2. It will be understood that, through the above approach, the entire display content of the second window can be located within the target sub-window, and the second window's coverage of the target sub-window can remain unchanged.
[0109] Step S241212: intercepting all the display contents in the second window that has been scaled down and the display contents in the target sub-window that are not covered by the second window.
[0110] In some embodiments, when the second window is scaled down to a size consistent with the overlapping area, all display content within the scaled-down second window and the display content within the target sub-window that is not covered by the second window can be captured to ensure the integrity of the display content within the captured second window and avoid affecting the display content within the captured target sub-window.
[0111] Step S24122: If the ratio is greater than a second ratio threshold and less than or equal to the first ratio threshold, intercepting the display content in the second window that covers the target sub-window and the display content in the target sub-window that is not covered by the second window.
[0112] In some embodiments, if the ratio is greater than the second ratio threshold and less than or equal to the first ratio threshold, it can be determined that the area of the second window located in the target sub-window accounts for a moderate proportion, that is, it is determined that part of the area of the second window is located in the target sub-window and part of the area is located outside the target sub-window. At this time, it can be considered that when taking a screenshot, the user is more likely to want to capture the display content of the second window located in the target sub-window, and then the display content in the second window that covers the target sub-window and the display content in the target window that is not covered by the second window can be captured.
[0113] Step S24123: If the ratio is less than or equal to the second ratio threshold, intercepting the display content in the target sub-window.
[0114] In some embodiments, if the ratio is less than or equal to a second ratio threshold, it can be determined that the proportion of the area of the second window located in the target sub-window is low, that is, it is determined that most of the area of the second window is located outside the target sub-window. At this time, it can be considered that when the user takes a screenshot, there is a greater possibility that he or she does not expect to capture the display content in the second window, and the display content in the target sub-window can be captured.
[0115] As an implementable method, since a portion of the second window is still located within the target sub-window, when it is determined that the ratio is less than or equal to the second ratio, the second window can be controlled to automatically move in a direction away from the target sub-window, and when it is determined that the second window moves completely outside the target sub-window, the display content within the target sub-window can be captured.
[0116] As another feasible method, since a part of the area of the second window is still located in the target sub-window, when it is determined that the ratio is less than or equal to the second ratio, the second window can be reduced proportionally, and when it is determined that the second window is reduced to the point where it is completely out of the target sub-window, the display content in the target sub-window can be captured.
[0117] As another feasible method, since a part of the area of the second window is still located in the target sub-window, when it is determined that the ratio is less than or equal to the second ratio, the display position and display size of the second window can be kept unchanged, and the display content in the second window can be reduced proportionally. When it is determined that the display content in the second window is reduced to the point where it is completely out of the target sub-window, the display content in the target sub-window can be captured.
[0118] Step S242: If it is determined based on the second positional relationship that the second window and the target sub-window do not have an overlapping area, then the display content in the target sub-window is intercepted.
[0119] Wherein, if it is determined that there is no overlapping area between the second window and the target sub-window, the display content in the target sub-window can be intercepted. In some embodiments, if it is determined based on the first position that the multiple sliding starting positions are all located within the target sub-window, the object to be intercepted is the display content in the target sub-window and the display content superimposed on the target sub-window. If it is determined based on the second position relationship that there is no overlapping area between the second window and the target sub-window, it can be determined that no other content is superimposed on the target sub-window, and the display content in the target sub-window can be directly intercepted.
[0120] Step S250: If it is determined based on the first position relationship that the multiple sliding start positions are not all located in the target sub-window of the at least two sub-windows, then intercepting the display content in the second window and the display content in the first window that is not covered by the second window.
[0121] In this embodiment, when the first position relationship is obtained, it can be determined based on the first position relationship whether the multiple sliding starting positions are all located in any one sub-window (target sub-window) of the at least two sub-windows. If the multiple sliding starting positions are not all located in the target sub-window of the at least two sub-windows, it can be considered that the user has triggered a full screenshot, and the display content in the second window and the display content in the first window that is not covered by the second window can be directly captured.
[0122] Based on the above approach, during a multi-finger swipe operation to take a screenshot, even if a second window is displayed superimposed on the first window (at least two sub-windows), i.e., a non-full-screen floating window such as a floating window / floating bubble is displayed on the upper layer of the split-screen view, at least two sub-windows (i.e., still within the lower split-screen area) are still used as the judgment criteria. Specifically, if the multiple sliding starting positions of the multi-finger swipe operation all fall within a split-screen area, the captured object is associated with the split-screen window; if the multiple sliding starting positions of the multi-finger swipe operation do not all fall within a split-screen area, the captured object is associated with the full-screen window.
[0123] Wherein, if it is determined based on the first positional relationship that the multiple sliding starting positions are all located within a target sub-window of the at least two sub-windows, the content related to the target sub-window (split screen) can be used as the interception object, that is, the display content of the second window located within the target sub-window and the display content of the target sub-window not covered by the second window are intercepted. If it is determined based on the first positional relationship that the multiple sliding starting positions are not located within the target sub-window, the content related to the first window (full screen) can be used as the interception object, that is, the display content of the second window and the display content of the first window not covered by the second window are intercepted.
[0124] In some embodiments, when the second window is not superimposed on the first window, it can be detected whether the multiple sliding starting positions corresponding to the multi-finger sliding operation are all located in the target sub-window. If the multiple sliding starting positions are all located in the target sub-window, the display content in the target sub-window can be intercepted. If the multiple sliding starting positions are not all located in the target sub-window, the display content in the first window can be intercepted.
[0125] See also Figure 15 , Figure 15 FIG. 4 shows a fourth interface diagram of an electronic device provided in an embodiment of the present application. Figure 15As shown, the electronic device displays a target interface, which includes a first window 10 , wherein the first window 10 includes a first sub-window 11 and a second sub-window 12 .
[0126] See also Figure 16 , Figure 16 FIG. 3 shows a third interactive schematic diagram of an electronic device provided in an embodiment of the present application. Figure 16 As shown, the electronic device displays a target interface, which includes a first window 10, wherein the first window includes a first sub-window 11 and a second sub-window 12. When multiple sliding start positions are all located in the first sub-window 11, the display content in the first sub-window 11 is intercepted.
[0127] See also Figure 17 , Figure 17 Schematic diagram of the fifth interface of the electronic device provided in the embodiment of the present application is shown. Figure 17 As shown, through Figure 16 When the display content in the first sub-window 11 is captured in the manner shown, a third screenshot 50 can be obtained, wherein the third screenshot 50 can be displayed in a floating manner on the first sub-window 11 .
[0128] See also Figure 18 , Figure 18 FIG. 4 shows a fourth interactive schematic diagram of an electronic device provided in an embodiment of the present application. Figure 18 As shown, the electronic device displays a target interface, which includes a first window 10, wherein the first window includes a first sub-window 11 and a second sub-window 12. When multiple sliding start positions are simultaneously located in the first sub-window 11 and the second sub-window 12, the display content of the first window 10.
[0129] See also Figure 19 , Figure 19 Schematic diagram of the sixth interface of the electronic device provided in the embodiment of the present application is shown. Figure 19 As shown, through Figure 18 When the display content of the first window 10 is captured in the manner shown, a fourth screenshot 60 can be obtained, wherein the first screenshot 60 can be displayed in a floating manner on the first sub-window 11 .
[0130] Compared with the screenshot method provided by an embodiment of the present application, Figure 1The screenshot method shown in this embodiment also intercepts the display content in the second window and the display content in the target subwindow based on the second position relationship when it is determined based on the first position relationship that multiple sliding starting positions are all located in the target subwindow of at least two subwindows; and intercepts the display content in the second window and the display content in the first window that is not covered by the second window when it is determined based on the first position relationship that multiple sliding starting positions are not all located in the target subwindow of at least two subwindows, thereby determining regional screenshot or full screenshot according to the positional relationship between multiple sliding starting positions and subwindows to improve the diversity and speed of screenshots.
[0131] See also Figure 20 , Figure 20 The flowchart of the screenshot method provided by an embodiment of the present application is shown. The method is applied to the above electronic device. Figure 20 The process shown is described in detail. The screenshot method shown may include the following steps:
[0132] Step S310: displaying a target interface, wherein the target interface includes a first window and a second window superimposed and displayed on the first window, and the first window is divided into at least two sub-windows.
[0133] Step S320: In response to a multi-finger sliding operation on the target interface, a plurality of sliding start positions corresponding to the multi-finger sliding operation are obtained.
[0134] Step S330: determining a positional relationship between the plurality of sliding start positions and the at least two sub-windows as a first positional relationship, and determining a positional relationship between the second window and the at least two sub-windows as a second positional relationship.
[0135] For the detailed description of steps S310 to S330 , please refer to steps S110 to S130 , which will not be repeated here.
[0136] Step S340: If it is determined based on the first position relationship that the multiple sliding starting positions are all located in the target sub-window of the at least two sub-windows, then based on the second position relationship, the display content in the second window and the display content in the target sub-window are intercepted, wherein the target sub-window is any one of the at least two sub-windows.
[0137] Step S350: If it is determined based on the first position relationship that the multiple sliding start positions are not all located in the target sub-window of the at least two sub-windows, then intercepting the display content in the second window and the display content in the first window that is not covered by the second window.
[0138] For the detailed description of steps S340 to S350 , please refer to steps S240 to S250 , which will not be repeated here.
[0139] Step S360: In response to the screenshot editing instruction, the screenshot to be edited is displayed and a cropping frame is displayed on the screenshot to be edited.
[0140] In this embodiment, the electronic device may include a screenshot to be edited, wherein the screenshot to be edited may be obtained by capturing the display content in the second window and the display content in the first window not covered by the second window, or may be previously obtained and stored locally in the electronic device, or may be obtained from a server via a network, which is not limited here.
[0141] In this embodiment, the electronic device can respond to the screenshot editing instruction by displaying the screenshot to be edited and displaying a cropping frame on the screenshot to be edited, wherein the cropping frame is used to crop the screenshot to be edited. In some embodiments, when the electronic device obtains the screenshot to be edited, it can detect whether the screenshot editing instruction has been received. If it is determined that the screenshot editing instruction has been received, it can respond to the screenshot editing instruction, enter the screenshot editing page, display the screenshot to be edited on the screenshot editing page, and display a cropping frame on the screenshot to be edited.
[0142] See also Figure 21 , Figure 21 FIG. 7 shows a seventh interface diagram of an electronic device provided in an embodiment of the present application. Figure 21 As shown, the electronic device can display a screenshot to be edited 60 and display a cropping frame 70 on the screenshot to be edited, wherein the screenshot to be edited 60 includes a target dividing line 61.
[0143] Step S370: In response to a drag operation on the cropping frame or a drag operation on the screenshot to be edited, changing a display position of the cropping frame on the screenshot to be edited.
[0144] In some embodiments, during the display of the screenshot to be edited and the cropping frame, operations on the screenshot to be edited and the cropping frame can be detected. As one approach, if a drag operation on the cropping frame is detected, the display position of the cropping frame on the screenshot to be edited can be changed based on the drag operation on the cropping frame. As another approach, if a drag operation on the screenshot to be edited is detected, the display position of the cropping frame on the screenshot to be edited can be changed based on the drag operation on the screenshot to be edited.
[0145] Among them, changing the display position of the cropping frame on the screenshot to be edited may include: gradually moving the display position of the cropping frame closer to the middle position of the screenshot to be edited, gradually moving the display position of the cropping frame closer to the edge position of the screenshot to be edited, etc., which is not limited here.
[0146] In some embodiments, changing the display position of the cropping frame on the screenshot to be edited may include: changing the display position of the screenshot to be edited while keeping the display position of the cropping frame unchanged; or, changing the display position of the cropping frame while keeping the display position of the screenshot to be edited unchanged.
[0147] Step S380: When the display position of the cropping frame on the screenshot to be edited moves to a position where the distance from the target dividing line is less than a distance threshold, the cropping frame is controlled to automatically move to a position overlapping with the target dividing line.
[0148] In this embodiment, the screenshot to be edited is a screenshot of a split-screen interface, that is, the screenshot to be edited includes screenshots of display contents of at least two sub-windows, where each two adjacent sub-windows are separated by a target dividing line.
[0149] In some embodiments, the electronic device may pre-set and store a distance threshold value, which is used as a basis for determining the distance between the cropping frame and the target dividing line. Therefore, in this embodiment, in the process of changing the display position of the cropping frame on the screenshot to be edited, the distance between the cropping frame and the target dividing line may be obtained, and the distance may be compared with the distance threshold value to determine whether the distance is less than the distance threshold value. In the case where it is determined that the distance is less than the distance threshold value, it indicates that the display position of the cropping frame on the screenshot to be edited is about to be moved close to the target dividing line, that is, the user expects to move the cropping frame to the target dividing line to crop the screenshot to be edited, and the cropping frame may be controlled to automatically move to a position overlapping with the target dividing line, that is, the cropping frame may be automatically adsorbed onto the target dividing line to improve the accuracy and convenience of cropping.
[0150] See also Figure 22 , Figure 22 FIG. 5 shows a fifth interactive diagram of an electronic device provided in an embodiment of the present application. Figure 22 As shown, the user can drag the cropping frame 70 to move on the screenshot to be edited 60. When the distance between the display position of the cropping frame 70 and the display position of the target dividing line 61 on the screenshot to be edited 60 is less than the distance threshold, the cropping frame 70 is automatically adsorbed onto the target dividing line 61.
[0151] Step S390: When it is determined that the cropping frame overlaps with the target dividing line, outputting prompt information, wherein the prompt information is used to prompt cropping.
[0152] In some embodiments, if it is determined that the cropping frame overlaps the target dividing line, a prompt message for cropping may be output, wherein the prompt message may include text prompt message, vibration prompt message, highlight prompt message, voice prompt message, etc., which are not limited here.
[0153] Compared with the screenshot method provided by an embodiment of the present application, Figure 1 The screenshot method shown in the embodiment also intercepts the display content in the second window and the display content in the target subwindow based on the second position relationship when it is determined based on the first position relationship that the multiple sliding starting positions are all located in the target subwindow of the at least two subwindows; when it is determined based on the first position relationship that the multiple sliding starting positions are not all located in the target subwindow of the at least two subwindows, intercepts the display content in the second window and the display content in the first window that is not covered by the second window; in response to the screenshot editing instruction, displays the screenshot to be edited and displays a cropping frame on the screenshot to be edited; in response to the action on the cropping instruction, The dragging operation on the frame or the dragging operation on the screenshot to be edited changes the display position of the cropping frame on the screenshot to be edited. When the display position of the cropping frame on the screenshot to be edited moves to a distance less than the distance threshold from the target dividing line, the cropping frame is controlled to automatically move to a position overlapping with the target dividing line. When it is determined that the cropping frame overlaps with the target dividing line, a prompt message for prompting cropping is output. Therefore, when cropping the screenshot, when the cropping frame is about to approach the split-screen dividing line, it is automatically adsorbed to the dividing line and a prompt is output, which can improve the cropping efficiency and operation experience.
[0154] See also Figure 23 , Figure 23 The flowchart of the screenshot method provided by an embodiment of the present application is shown. The method is applied to the above electronic device. Figure 23 The process shown is described in detail, and the screenshot method may specifically include the following steps:
[0155] Step S410: displaying a target interface, wherein the target interface includes a first window and a second window superimposed and displayed on the first window, and the first window is divided into at least two sub-windows.
[0156] Step S420: In response to a multi-finger sliding operation on the target interface, a plurality of sliding start positions corresponding to the multi-finger sliding operation are obtained.
[0157] Step S430: determining a positional relationship between the plurality of sliding start positions and the at least two sub-windows as a first positional relationship, and determining a positional relationship between the second window and the at least two sub-windows as a second positional relationship.
[0158] Step S440: Based on the first position relationship and the second position relationship, intercept the display content of the target interface.
[0159] For the detailed description of steps S410 to S440 , please refer to steps S110 to S140 , which will not be repeated here.
[0160] Step S450: Floatingly displaying the captured screenshot on the target interface.
[0161] In this embodiment, when a screenshot is obtained by taking a screenshot of the display content of the target interface based on the first position relationship and the second position relationship, the screenshot obtained can be displayed in a floating manner on the target interface for the user to perform further processing on the screenshot obtained, for example, sharing the screenshot obtained, taking a long screenshot, etc., which is not limited here.
[0162] Compared with the screenshot method provided by an embodiment of the present application, Figure 1 The screenshot method shown in this embodiment also captures the display content of the display interface to obtain a screenshot, and then displays the screenshot in a floating manner on the target interface, so that the user can process the screenshot in time, thereby improving the user's screenshot experience.
[0163] See also Figure 24 , Figure 24 The flowchart of the screenshot method provided by an embodiment of the present application is shown. The method is applied to the above electronic device. Figure 24 The process shown is described in detail, and the screenshot method may specifically include the following steps:
[0164] Step S510: displaying a target interface, wherein the target interface includes a first window and a second window superimposed and displayed on the first window, and the first window is divided into at least two sub-windows.
[0165] The detailed description of step S510 can be found in step S110 and will not be repeated here.
[0166] Step S520: In response to a multi-finger sliding operation on the target interface, obtaining a display area corresponding to the target interface.
[0167] In this embodiment, the display area corresponding to the target interface can be obtained. As one approach, assuming that the target interface is displayed in the displayable area of the electronic device, the display area of the displayable area can be obtained as the display area corresponding to the target interface. As another approach, if a coordinate system is established, the coordinate area corresponding to the target interface in the coordinate system can be obtained, and the display area of the target interface can be determined based on the coordinate area corresponding to the target interface in the coordinate system.
[0168] Step S530: When the display area is greater than the area threshold, obtain multiple sliding start positions corresponding to the multi-finger sliding operation.
[0169] In some embodiments, the electronic device may pre-set and store an area threshold, which is used as a basis for determining the display area corresponding to the target interface. Therefore, in this embodiment, when the display area is obtained, the display area can be compared with the area threshold to determine whether the display area is greater than the area threshold. If it is determined that the display area is greater than the area threshold, it can be considered that the display area of the display interface meets the requirements for split-screen screenshot, and subsequent steps can be continued.
[0170] Step S540: determining a positional relationship between the plurality of sliding start positions and the at least two sub-windows as a first positional relationship, and determining a positional relationship between the second window and the at least two sub-windows as a second positional relationship.
[0171] Step S550: Based on the first position relationship and the second position relationship, intercept the display content of the target interface.
[0172] For the detailed description of steps S540 to S550 , please refer to steps S130 to S140 , which will not be repeated here.
[0173] Compared with the screenshot method provided by an embodiment of the present application, Figure 1 The screenshot method shown in this embodiment also supports the multi-finger screenshot function when the display area corresponding to the target interface is larger than the area threshold, thereby adapting to large-screen electronic devices and improving the screenshot experience.
[0174] See also Figure 25 , Figure 25 A schematic diagram of a framework that can be used for the screenshot method provided in the embodiment of the present application is shown. As an example, the electronic device used in this embodiment may include a system gesture module, a system UI framework module, a screenshot module, and a system display service module, and the system gesture module, the system UI framework module, the screenshot module, and the system display service module cooperate with each other to provide their respective capabilities. Among them, the system gesture module provides multi-finger gesture judgment and finger coordinate point collection capabilities, the system UI framework module provides information such as the area size of the left and right windows in split-screen mode, the screenshot module implements the core split-screen screenshot business logic, and the system display service module provides screen image content to the screenshot module.
[0175] During implementation, the user touches the screen with multiple fingers and slides down a certain distance. After the system gesture module detects the gesture, it determines whether the sliding direction and sliding distance meet the multi-finger screenshot triggering conditions. If so, it immediately calls the screenshot interface to launch the screenshot application process, and transmits the coordinates of the multiple finger touch points when multiple fingers fall on the screen to the screenshot application through the screenshot interface. After the screenshot application is started, it first detects whether the screen that needs to be screenshotted meets the split-screen screenshot conditions. For example, it determines whether it is currently being applied to a tablet device by reading the system feature; determines whether it is currently being applied to the large-screen unfolded state of a foldable device by reading the system attribute value; and determines whether it is currently being displayed in split screen by calling the system split-screen interface. Among them, when it is determined that the conditions for split-screen screenshot are met, the interface provided by the system UI framework is called to read the coordinate information of the split-screen interface (at least two sub-windows), and then the coordinate information of the multiple sliding starting positions obtained from the gesture module is compared with the coordinate information of the split-screen interface. If the coordinates of the multiple sliding start positions are all within the coordinate range of one of the split-screen interfaces, the split-screen screenshot logic is triggered; otherwise, the full-screen screenshot logic is triggered. If the screenshot application determines that the user is taking a split-screen screenshot, it passes the obtained coordinate information of the split-screen interface to the display service screenshot interface, obtains the screen image content of the corresponding area, and the screenshot application then displays the image content as a screenshot for the user to preview.
[0176] It is understandable that in this example, when judging whether the user's multi-finger screenshot operation is a split-screen gesture, the coordinates of the initial touch points of the user's multiple fingers are used for judgment when using multi-finger gestures. The subsequent displacement of the user's fingers on the screen does not affect the judgment, that is, if the initial landing point of the user's multiple fingers is on the left half of the screen, and a finger has moved to the right half of the screen when the screenshot function is triggered by sliding down, it is also considered that the user has triggered the left half-screen split-screen screenshot function. In addition, when there are non-full-screen floating windows, bubbles, prompt boxes and other obstructions above the split-screen page, it does not affect the logical judgment of the split-screen screenshot. If the user's operation is a split-screen gesture, the screen content on the current split screen is captured, that is, what you see is what you get.
[0177] See also Figure 26 , Figure 26 The module block diagram of the screenshot device provided by an embodiment of the present application is shown. The screenshot device 200 is applied to the above electronic device. Figure 26 As illustrated in the block diagram, the screenshot device 200 includes: a target interface display module 210, a sliding start position acquisition module 220, a position relationship determination module 230, and a display content interception module 240, wherein:
[0178] The target interface display module 210 is configured to display a target interface, wherein the target interface includes a first window and a second window superimposed on the first window, and the first window is divided into at least two sub-windows.
[0179] The sliding start position acquisition module 220 is configured to respond to a multi-finger sliding operation on the target interface and acquire a plurality of sliding start positions corresponding to the multi-finger sliding operation.
[0180] Furthermore, the sliding start position acquisition module 220 includes: a display area acquisition submodule and a sliding start position acquisition submodule, wherein:
[0181] The display area acquisition submodule is configured to respond to a multi-finger sliding operation on the target interface and acquire a display area corresponding to the target interface.
[0182] The sliding start position acquisition submodule is used to acquire multiple sliding start positions corresponding to the multi-finger sliding operation when the display area is greater than the area threshold.
[0183] The position relationship determining module 230 is configured to determine a position relationship between the plurality of sliding start positions and the at least two sub-windows as a first position relationship, and determine a position relationship between the second window and the at least two sub-windows as a second position relationship.
[0184] The display content interception module 240 is configured to intercept the display content of the target interface based on the first position relationship and the second position relationship.
[0185] Furthermore, the display content interception module 240 includes: a first display content interception submodule and a second display content interception submodule, wherein:
[0186] A first display content interception submodule is used to intercept the display content in the second window and the display content in the target subwindow based on the second position relationship if it is determined based on the first position relationship that the multiple sliding starting positions are all located in the target subwindow among the at least two subwindows, wherein the target subwindow is any one of the at least two subwindows.
[0187] Furthermore, the first display content interception submodule includes: a first display content interception unit and a second display content interception unit, wherein:
[0188] The first display content intercepting unit is configured to intercept the display content in the second window and the display content in the target sub-window based on the overlapping area if it is determined that the second window and the target sub-window have an overlapping area based on the second positional relationship.
[0189] Furthermore, the first display content interception unit includes: a ratio acquisition subunit and a display content interception subunit, wherein:
[0190] The ratio acquisition subunit is configured to acquire the ratio between the area of the second window located in the target subwindow and the area of the second window if it is determined based on the second positional relationship that the second window and the target subwindow have an overlapping area.
[0191] The display content intercepting sub-unit is configured to intercept the display content in the second window and the display content in the target sub-window based on the ratio.
[0192] Furthermore, the display content interception sub-unit includes: a first display content interception sub-sub-module, a second display content interception sub-sub-module and a third display content interception sub-sub-module, wherein:
[0193] The first display content interception sub-submodule is configured to intercept all display content in the second window and display content in the target sub-window that is not covered by the second window if the ratio is greater than a first ratio threshold.
[0194] Furthermore, the first display content interception sub-submodule includes: a zoom-out sub-subunit and a display content interception sub-subunit, wherein:
[0195] The shrinking sub-subunit is configured to shrink the second window proportionally to a size consistent with the overlapping area if the ratio is greater than the first ratio threshold.
[0196] The display content interception sub-sub-unit is used to intercept all the display contents in the second window that has been scaled down and the display contents in the target sub-window that are not covered by the second window.
[0197] The second display content interception sub-submodule is configured to intercept the display content in the second window that covers the target sub-window and the display content in the target sub-window that is not covered by the second window if the ratio is greater than a second ratio threshold and less than or equal to the first ratio threshold.
[0198] The third display content interception sub-submodule is configured to intercept the display content in the target sub-window if the ratio is less than or equal to the second ratio threshold.
[0199] The second display content intercepting unit is configured to intercept the display content in the target sub-window if it is determined based on the second positional relationship that the second window and the target sub-window do not have an overlapping area.
[0200] The second display content interception submodule is used to intercept the display content in the second window and the display content in the first window that is not covered by the second window if it is determined based on the first position relationship that the multiple sliding starting positions are not all located in the target subwindow of the at least two subwindows.
[0201] Furthermore, the display content interception module 240 further includes: a cropping frame display submodule, a display position change submodule, and a movement control submodule, wherein:
[0202] The cropping frame display submodule is used to display the screenshot to be edited and display a cropping frame on the screenshot to be edited in response to the screenshot editing instruction.
[0203] The display position changing submodule is configured to change the display position of the cropping frame on the screenshot to be edited in response to a drag operation on the cropping frame or a drag operation on the screenshot to be edited.
[0204] The movement control submodule is used to control the cropping frame to automatically move to a position overlapping with the target dividing line when the display position of the cropping frame on the screenshot to be edited moves to a distance less than a distance threshold from the target dividing line.
[0205] Furthermore, the display content interception module 240 further includes:
[0206] The prompt information output submodule is used to output prompt information when it is determined that the cropping frame overlaps with the target dividing line, wherein the prompt information is used to prompt cropping.
[0207] Furthermore, the screenshot device 200 further includes:
[0208] The screenshot display module is used to suspend and display the screenshot obtained on the target interface.
[0209] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0210] In several embodiments provided in this application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0211] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.
[0212] See also Figure 27 , which shows a structural block diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 can be an electronic device capable of running applications, such as a smartphone, a tablet computer, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more programs are configured to execute the method described in the aforementioned method embodiment.
[0213] The processor 110 may include one or more processing cores. The processor 110 utilizes various interfaces and circuits to connect various components within the electronic device 100. It executes instructions, programs, code sets, or instruction sets stored in the memory 120, and accesses data stored in the memory 120 to perform various functions and process data within the electronic device 100. Optionally, the processor 110 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 110 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing displayed content; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 110 and may be implemented separately via a communication chip.
[0214] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the electronic device 100 during use (such as a phone book, audio and video data, chat history data), etc.
[0215] See also Figure 28 , which shows a block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 300 stores program code, which can be called by a processor to execute the method described in the above method embodiment.
[0216] The computer-readable storage medium 300 can be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 300 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 300 has storage space for program code 310 for executing any of the method steps described above. These program codes can be read from or written to one or more computer program products. The program code 310 can be compressed, for example, in a suitable form.
[0217] In summary, the screenshot method, device, electronic device and storage medium provided by the embodiments of the present application display a target interface, wherein the target interface includes a first window and a second window superimposed on the first window, the first window is divided into at least two sub-windows, and responds to a multi-finger sliding operation on the target interface, obtains multiple sliding starting positions corresponding to the multi-finger sliding operation, determines the positional relationship between the multiple sliding starting positions and the at least two sub-windows as the first positional relationship, and determines the positional relationship between the second window and the at least two sub-windows as the second positional relationship, and captures the display content of the target interface based on the first positional relationship and the second positional relationship, thereby determining the object to be screenshotted based on the multiple sliding starting positions of the multi-finger sliding operation for screenshotting, without the need for tedious cropping and dragging, and without worrying about floating window coverage, thereby improving the speed and accuracy of screenshots.
[0218] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A screenshot method, characterized in that: Applied to electronic equipment, the method includes: Displaying a target interface, wherein the target interface includes a first window and a second window superimposed and displayed on the first window, and the first window is divided into at least two sub-windows; In response to a multi-finger sliding operation on the target interface, obtaining a plurality of sliding start positions corresponding to the multi-finger sliding operation; determining a positional relationship between the plurality of sliding start positions and the at least two sub-windows as a first positional relationship, and determining a positional relationship between the second window and the at least two sub-windows as a second positional relationship; Based on the first position relationship and the second position relationship, intercepting the display content of the target interface; The intercepting of the display content of the target interface based on the first position relationship and the second position relationship includes: If it is determined based on the first positional relationship that the multiple sliding start positions are all located in a target sub-window among the at least two sub-windows, then based on the second positional relationship, intercepting the display content in the second window and the display content in the target sub-window, wherein the target sub-window is any one of the at least two sub-windows; The intercepting of the display content in the second window and the display content in the target sub-window based on the second position relationship includes: If it is determined based on the second positional relationship that the second window and the target sub-window have an overlapping area, obtaining a ratio between an area of the second window located in the target sub-window and an area of the second window; Based on the ratio, the display content in the second window and the display content in the target sub-window are intercepted.
2. The method according to claim 1, characterized in that The intercepting the display content of the target interface based on the first position relationship and the second position relationship further includes: If it is determined based on the first position relationship that the multiple sliding start positions are not all located in the target sub-window of the at least two sub-windows, the display content in the second window and the display content in the first window not covered by the second window are intercepted.
3. The method according to claim 1, characterized in that The intercepting the display content in the second window and the display content in the target sub-window based on the second position relationship further includes: If it is determined based on the second positional relationship that no overlapping area exists between the second window and the target sub-window, the display content in the target sub-window is intercepted.
4. The method according to claim 1, wherein The intercepting, based on the ratio, the display content in the second window and the display content in the target sub-window includes: If the ratio is greater than a first ratio threshold, intercepting all display content in the second window and display content in the target sub-window that is not covered by the second window; If the ratio is greater than a second ratio threshold and less than or equal to the first ratio threshold, intercepting the display content in the second window that covers the target sub-window and the display content in the target sub-window that is not covered by the second window; or If the ratio is less than or equal to the second ratio threshold, the display content in the target sub-window is intercepted.
5. The method according to claim 4, characterized in that If the ratio is greater than a first ratio threshold, intercepting all display content in the second window and display content in the target sub-window that is not covered by the second window, includes: If the ratio is greater than the first ratio threshold, scaling down the second window to a size consistent with the overlapping area; All displayed contents in the scaled-down second window and displayed contents in the target sub-window that are not covered by the second window are intercepted.
6. The method according to claim 2, characterized in that After intercepting the display content in the second window and the display content in the first window that is not covered by the second window, the method further includes: In response to the screenshot editing instruction, displaying the screenshot to be edited and displaying a cropping frame on the screenshot to be edited; In response to a drag operation on the cropping frame or a drag operation on the screenshot to be edited, changing a display position of the cropping frame on the screenshot to be edited; When the display position of the cropping frame on the screenshot to be edited moves to a position where the distance from the target dividing line is less than a distance threshold, the cropping frame is controlled to automatically move to a position overlapping with the target dividing line.
7. The method according to claim 6, characterized in that The method further comprises: When it is determined that the cropping frame overlaps with the target dividing line, prompt information is output, wherein the prompt information is used to prompt cropping.
8. The method according to any one of claims 1 to 7, characterized in that After intercepting the display content of the target interface based on the first position relationship and the second position relationship, the method further includes: The captured screenshot is displayed in a suspended manner on the target interface.
9. The method according to any one of claims 1 to 7, characterized in that The step of responding to a multi-finger sliding operation on the target interface and obtaining a plurality of sliding start positions corresponding to the multi-finger sliding operation includes: In response to a multi-finger sliding operation on the target interface, obtaining a display area corresponding to the target interface; When the display area is greater than an area threshold, a plurality of sliding start positions corresponding to the multi-finger sliding operation are acquired.
10. A screenshot device, characterized in that: Applied to electronic equipment, the device comprises: a target interface display module, configured to display a target interface, wherein the target interface includes a first window and a second window superimposed and displayed on the first window, and the first window is divided into at least two sub-windows; a sliding start position acquisition module, configured to respond to a multi-finger sliding operation on the target interface and acquire a plurality of sliding start positions corresponding to the multi-finger sliding operation; a position relationship determining module, configured to determine a position relationship between the plurality of sliding start positions and the at least two sub-windows as a first position relationship, and to determine a position relationship between the second window and the at least two sub-windows as a second position relationship; A display content interception module is configured to obtain a ratio between an area of the second window within the target subwindow and an area of the second window if it is determined based on the first position relationship that the multiple sliding starting positions are all within a target subwindow among the at least two subwindows, and if it is determined based on the second position relationship that the second window and the target subwindow have an overlapping area; and based on the ratio, intercept the display content within the second window and the display content within the target subwindow, wherein the target subwindow is any one of the at least two subwindows.
11. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory is coupled to the processor and stores instructions. When the instructions are executed by the processor, the processor performs the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Screen capturing method and related equipment
CN110737386A
Multi-window screen capture method and device and terminal equipment
CN113552986A