CN114661394A - Interface display control method and device, storage medium and processor - Google Patents

Interface display control method and device, storage medium and processor Download PDF

Info

Publication number
CN114661394A
CN114661394A CN202210199830.6A CN202210199830A CN114661394A CN 114661394 A CN114661394 A CN 114661394A CN 202210199830 A CN202210199830 A CN 202210199830A CN 114661394 A CN114661394 A CN 114661394A
Authority
CN
China
Prior art keywords
determining
distance
screen
display
tangent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210199830.6A
Other languages
Chinese (zh)
Inventor
曹颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202210199830.6A priority Critical patent/CN114661394A/en
Publication of CN114661394A publication Critical patent/CN114661394A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity

Abstract

The invention discloses a control method and device for interface display, a storage medium and a processor. Providing a graphical user interface through a screen of a terminal device, the method comprising: responding to a display instruction aiming at a target object, and acquiring at least one circular arc of the outer contour of a screen display area; acquiring a horizontal tangent and a vertical tangent of the circular arc; determining the circle center corresponding to the circular arc based on the horizontal tangent line and the vertical tangent line; determining the distance between the circle center and the edge of the display area according to the circle center and the arc; determining a safety area of the screen according to the distance; the control target object is displayed in the safe area. The method and the device solve the technical problem that the screen adapting efficiency is low due to the fact that the cost for acquiring the data related to the interface is high in the related technology.

Description

Interface display control method and device, storage medium and processor
Technical Field
The invention relates to the field of interface control, in particular to a method and a device for controlling interface display, a storage medium and a processor.
Background
At present, after terminal equipment of a full screen appears, terminal elements of the full screen need to be considered in the process of adaptation, at present, in the process of adaptation of various terminal screens, a go-to-official website needs to inquire data related to an interface in the screen, but some manufacturers do not provide related data and need to obtain the data through other channels, so that the cost for obtaining the data related to the interface is high.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
At least some embodiments of the present invention provide a method, an apparatus, a storage medium, and a processor for controlling interface display, so as to at least solve the technical problem that the efficiency of adapting a screen is low due to high cost of acquiring data related to an interface in the related art.
According to an embodiment of the present invention, there is provided a method for controlling interface display, in which a graphical user interface is provided through a screen of a terminal device, the method including: responding to a display instruction aiming at a target object, and acquiring at least one circular arc of the outer contour of a screen display area; acquiring a horizontal tangent and a vertical tangent of the arc; determining the circle center corresponding to the circular arc based on the horizontal tangent line and the vertical tangent line; determining the distance between the circle center and the edge of the display area according to the circle center and the arc; determining a safety area of the screen according to the distance; the control target object is displayed in the safe area.
Optionally, determining a circle center corresponding to the arc based on the horizontal tangent and the vertical tangent includes: acquiring a first vertical line of the horizontal tangent line passing through the first tangent point and acquiring a second vertical line of the vertical tangent line passing through the second tangent point; and determining the intersection point of the first vertical line and the second vertical line in the display area, and taking the intersection point as the circle center corresponding to the circular arc.
Optionally, determining a safety area of the screen according to the distance includes: determining a safety distance according to the product of the distance and a preset numerical value, wherein the safety distance is the shortest distance between a target object and the edge of a display area when the target object is normally displayed in the screen display area; a safety area is determined in the display area according to the safety distance.
Optionally, determining a safety area of the screen according to the distance includes: the safe distance of the screen is obtained according to the following formula: y ═ 1- √ 2/2 × X; the safe distance Y is the shortest distance between a target object and the edge of the display area when the target object is normally displayed in the screen display area, and the distance X is the distance between the circle center and the edge of the display area; a safety area is determined in the display area according to the safety distance.
Optionally, the method further includes: determining a rectangular canvas corresponding to the target object; acquiring a target angle of the rectangular canvas, wherein the vertex of the target angle is superposed with the midpoint of the circular arc, and the bisector of the target angle is perpendicular to the tangent of the circular arc passing through the midpoint; determining a first display position of the rectangular canvas display based on the target angle; a formula is determined based on the first display position.
Optionally, determining a formula according to the first display position includes: determining a target sector based on the circle center and the circular arc; determining a rectangular overlapping area of the rectangular canvas and the target fan shape based on the first display position; determining the target side length of the rectangular overlapping region, wherein the target side length is √ 2/2X; and determining a formula based on the distance between the circle center and the edge of the display area and the difference value of the target side length.
According to another aspect of the embodiments of the present invention, there is also provided an interface control apparatus, including: the first acquisition module is used for responding to a display instruction aiming at the target object and acquiring at least one circular arc of the outer contour of the screen display area; the second acquisition module is used for acquiring a horizontal tangent and a vertical tangent of the arc; the first determining module is used for determining the circle center corresponding to the circular arc based on the horizontal tangent and the vertical tangent; the second determining module is used for determining the distance between the circle center and the edge of the display area according to the circle center and the arc; the third determining module is used for determining a safety area of the screen according to the distance; and the control module is used for controlling the target object to be displayed in the safety area.
According to another aspect of the embodiments of the present invention, there is also provided a non-volatile storage medium having a computer program stored therein, wherein the computer program is configured to execute any one of the above-mentioned interface display control methods when running.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to run a program, where the program is configured to execute any one of the above control methods for interface display when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory and a processor, where the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above methods for controlling interface display.
In at least some embodiments of the present invention, a graphical user interface is provided via a screen of a terminal device, the method comprising: responding to a display instruction aiming at a target object, and acquiring at least one circular arc of the outer contour of a screen display area; acquiring a horizontal tangent and a vertical tangent of the arc; determining the circle center corresponding to the circular arc based on the horizontal tangent line and the vertical tangent line; determining the distance between the circle center and the edge of the display area according to the circle center and the arc; determining a safety area of the screen according to the distance; the target object is controlled to be displayed in the safe area, and the efficiency of adapting the screen is improved. It is easy to notice that in the process, relevant data do not need to be acquired from an external channel, and only a safe area corresponding to the target object needs to be determined according to the circular arc of the screen display area, so that the screen adaptation efficiency can be effectively improved, and the technical problem that the screen adaptation efficiency is low due to the fact that the data related to the interface is acquired at high cost in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a control method of an interface display according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of controlling an interface display according to one embodiment of the present invention;
FIG. 3 is a schematic illustration of a safe distance according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of a first display position according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a control device of an interface according to one embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with one embodiment of the present invention, there is provided an embodiment of a method for controlling an interface display, wherein the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions, and wherein, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different than that illustrated.
The method embodiments may be performed in a mobile terminal, a computer terminal or a similar computing device. Taking the example of the Mobile terminal running on the Mobile terminal, the Mobile terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, a game console, etc. Fig. 1 is a block diagram of a hardware structure of a mobile terminal of a method for controlling interface display according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), a programmable logic device (FPGA), a neural Network Processor (NPU), a Tensor Processor (TPU), an Artificial Intelligence (AI) type processor, etc.) and a memory 104 for storing data. Optionally, the mobile terminal may further include a transmission device 106, an input/output device 108, and a display device 110 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the interface display control method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned interface display control method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
The inputs in the input output Device 108 may come from a plurality of Human Interface Devices (HIDs). For example: keyboard and mouse, game pad, other special game controller (such as steering wheel, fishing rod, dance mat, remote controller, etc.). Some human interface devices may provide output functions in addition to input functions, such as: force feedback and vibration of the gamepad, audio output of the controller, etc.
The display device 110 may be, for example, a head-up display (HUD), a touch screen type Liquid Crystal Display (LCD), and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a Graphical User Interface (GUI) with which a user can interact by touching finger contacts and/or gestures on a touch-sensitive surface, where the human interaction functionality optionally includes the following interactions: executable instructions for creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, emailing, call interfacing, playing digital video, playing digital music, and/or web browsing, etc., for performing the above-described human-computer interaction functions, are configured/stored in one or more processor-executable computer program products or readable storage media.
In a possible implementation manner, an embodiment of the present invention provides a method for controlling interface display. Fig. 2 is a flowchart of a method for controlling an interface display according to an embodiment of the present invention, in which a graphical user interface is provided through a screen of a terminal device, as shown in fig. 2, the method includes the steps of:
step S202, responding to a display instruction aiming at the target object, and acquiring at least one circular arc of the outer contour of the screen display area.
The screen display area is displayed in a graphical user interface provided by a screen of the terminal device. The screen may be a screen of a mobile terminal, a screen of a computer, or the like, and may be a screen of any electronic device. The display area may be a display interface capable of providing a display screen in the screen. Wherein, the outer contour of the display area may be a contour formed by a boundary of the display area. Wherein, the area outside the outline of the display area can not display the picture.
The target object may be a control to be displayed, where the control may be a display icon of an application program.
The display instruction may be an instruction for displaying a control.
The screen display area described above may be an area in which a picture can be displayed in the screen of the terminal device.
The outer contour of the screen display region may be an outer contour of a region where a screen can be displayed.
It should be noted that the screen display area generally includes four corners, and the four corners may be displayed in the shape of a circular arc.
The at least one circular arc may be circular arcs at four corners in the screen display area, wherein the circular arcs may also be referred to as rounded corners.
In an optional embodiment, if the target object is to be displayed in the screen display area of the terminal device, at least one circular arc of the outer contour of the screen display area may be obtained first, the safety area displayed by the target object may be determined according to the at least one circular arc, and the display position of the target object is limited to be within the safety area, so that incomplete display caused by the fact that the area displayed by the target object exceeds the safety area is avoided.
In another alternative embodiment, at least one arc formed by the outer contour of the display area in the screen may be accessed by a program or basic measuring tool (ruler, compasses, etc.). Optionally, data related to at least one arc in the upper right corner of the screen may be obtained.
Step S204, acquiring a horizontal tangent and a vertical tangent of the arc.
Wherein, the horizontal tangent is tangent with the circular arc, and the vertical tangent is tangent with the circular arc.
In an alternative embodiment, a horizontal tangent line tangent to the arc may be obtained, and a vertical tangent line tangent to the arc may also be obtained, so as to determine the center of the circle corresponding to the arc. Optionally, an intersection point of the horizontal tangent line and the vertical tangent line may be obtained, and the intersection point is determined to be the center of the arc.
And step S206, determining the circle center corresponding to the circular arc based on the horizontal tangent and the vertical tangent.
In an alternative embodiment, a first vertical line perpendicular to the horizontal tangent line and a second vertical line perpendicular to the vertical tangent line may be determined according to the horizontal tangent line and the vertical tangent line, a circle center corresponding to the circular arc may be determined according to an intersection point of the first vertical line and the second vertical line, and a distance from the circle center to an edge of the display area may be determined according to the circle center and the circular arc, so that the safety area of the target object may be determined according to the distance.
And step S208, determining the distance between the circle center and the edge of the display area according to the circle center and the arc.
In an alternative embodiment, a center bisector of the circular arc may be made according to the circle center and the circular arc, and the distance between the circle center and the edge of the display area may be determined according to the center bisector.
Step S210, a safety area of the screen is determined according to the distance.
In an optional embodiment, after the distance from the center of the circle to the edge of the display area is obtained, the safe distance of the target object may be determined by combining with the rectangular canvas corresponding to the target object, and optionally, the safe distance may be determined according to the distance from the center of the circle to the edge of the rectangular canvas and the distance from the center of the circle to the edge of the display area. Further, the safety distance can be determined according to the difference between the distance from the circle center to the edge of the display area and the distance from the circle center to the edge of the rectangular canvas.
In another optional embodiment, after the safety distance is acquired, a safety region corresponding to the safety distance may be determined according to the safety distance and an outer contour of the screen display region, wherein the target object may be completely displayed within a display range of the safety region.
In step S212, the control target object is displayed in the safe area.
In an optional embodiment, after the secure area is obtained, the target object may be controlled to be displayed in the secure area, so that the target object may be completely displayed in a screen display area provided by a screen of the terminal device, and a situation of incomplete display is avoided.
Through the steps, the screen of the terminal equipment provides a graphical user interface, and the method comprises the following steps: responding to a display instruction aiming at a target object, and acquiring at least one circular arc of the outer contour of a screen display area; acquiring a horizontal tangent and a vertical tangent of the arc, wherein the horizontal tangent is tangent to the arc, and the vertical tangent is tangent to the arc; determining the circle center corresponding to the circular arc based on the horizontal tangent line and the vertical tangent line; determining the distance between the circle center and the edge of the display area according to the circle center and the arc; determining a safety area of the screen according to the distance; the target object is controlled to be displayed in the safe area, and the efficiency of adapting the screen is improved. It is easy to notice that in the process, relevant data do not need to be acquired from an external channel, and only a safe area corresponding to the target object needs to be determined according to the circular arc of the screen display area, so that the screen adaptation efficiency can be effectively improved, and the technical problem that the screen adaptation efficiency is low due to the fact that the data related to the interface is acquired at high cost in the related technology is solved.
Optionally, determining a circle center corresponding to the arc based on the horizontal tangent and the vertical tangent includes: acquiring a first vertical line of the horizontal tangent line passing through the first tangent point and acquiring a second vertical line of the vertical tangent line passing through the second tangent point; and determining the intersection point of the first vertical line and the second vertical line in the display area, and taking the intersection point as the circle center corresponding to the circular arc.
The first tangent point is a tangent point of the horizontal tangent line and the circular arc, and the second tangent point is a tangent point of the vertical tangent line and the circular arc, which is tangent to the second tangent point.
In an alternative embodiment, a first vertical line passing through a horizontal tangent of the first tangent point may be obtained, a second vertical line passing through a vertical tangent of the second tangent point may also be obtained, the first vertical line and the second vertical line may be vertically intersected in the display area, and a center of a circle corresponding to the arc may be determined as a focus of the vertical intersection.
It should be noted that the lengths of the first vertical line and the second vertical line are the same. The closed figure formed by the first vertical line, the second vertical line and the circular arc can be in a fan shape.
Optionally, determining a safety area of the screen according to the distance includes: determining a safety distance according to the product of the distance and a preset numerical value, wherein the safety distance is the shortest distance from the target object to the edge of a display area when the target object is normally displayed in the screen display area; a safety area is determined in the display area according to the safety distance.
In an alternative embodiment, the shortest distance from the target object to the edge of the display area may be determined by the following formula:
Y=[(2-√2)/2]*X≈0.3X;
wherein 0.3 may be a predetermined value, and X may be a distance.
In another optional embodiment, the safe distance of the target object in the normal display of the screen display area may be determined according to the product of the distance and a preset value, in order to facilitate the target object to be displayed in more areas, the shortest distance from the target object to the edge of the display area may be obtained, and the safe area may be determined in the display area according to the safe distance, so that the target object may be displayed in the larger area.
Optionally, determining a safety area of the screen according to the distance includes: the safe distance of the screen is obtained according to the following formula: y ═ 1- √ 2/2 × X; the safe distance Y is the shortest distance between a target object and the edge of the display area when the target object is normally displayed in the screen display area, and the distance X is the distance between the circle center and the edge of the display area; a safety area is determined in the display area according to the safety distance.
Fig. 3 is a schematic diagram of a safe distance according to an embodiment of the present invention. The circular arc can be the upper right corner of the screen as shown in fig. 3, the first vertical line and the second vertical line can be determined according to the horizontal tangent line and the vertical tangent line of the circular arc, the intersection point between the first vertical line and the second vertical line can be obtained, therefore, the distance between the X and the edge of the display area can be determined, and the safety distance can be determined according to the distance between the distance and the circle center to the edge of the rectangular canvas. According to the safe distance, a safe area which can be displayed by the target object in the display area can be determined.
Through the steps, the safe distance between the rectangular canvas and the outer contour of the display area can be accurately obtained by using a simple geometric algorithm, and an unknown numerical value of a formula can be obtained by using a basic measuring tool or a preset program on the side on the premise of no official data, so that the safe distance of the preset control can be quickly obtained.
In another alternative embodiment, the above X may be obtained according to the ppi of the screen in the terminal device. Where ppi may refer to pixel density, which refers to the number of pixels per inch in development, in ppi, an abbreviation for "pixel per inch". The screen pixel density is related to the screen size and the screen resolution, and under a single change condition, the smaller the screen size, the higher the resolution, the larger the pixel density, and vice versa. The pixel resolution of a typical computer image is 72ppi (px per inch). In this case, 1px is 0.04cm, and 1cm is 25 px. Many end devices are 300ppi, when 1px is 0.009 cm. The screen resolution, also called "screen aspect ratio", refers to the number of pixel points in the vertical and horizontal directions, and is generally expressed in px. The screen resolution determines the setting of how much information is displayed on the computer screen, measured in horizontal and vertical pixels. For the same size screen, when the screen resolution is low (e.g., 640x480), there are few pixels displayed on the screen and the size of a single pixel is large. When the screen resolution is high (for example 1600 × 1200), a large number of pixels are displayed on the screen, and the size of a single pixel is small. A pixel point, which is a minimum unit in an image represented by a sequence of numbers; when the picture size takes a pixel as a unit, the picture size and the actual size in reality can be converted mutually by specifying the fixed resolution of the picture; the 1920 × 1080 pixels are the number of pixels, that is, 1920px 1080px, which means that there are 1920 pixels in the height of the mobile phone and 1080 pixels in the width.
In another alternative embodiment, the safety distance may be directly determined as a fixed value of 100px, without considering the calculation accuracy of the circular arc.
Optionally, the method further comprises: determining a rectangular canvas corresponding to the target object; acquiring a target angle of the rectangular canvas, wherein the vertex of the target angle is superposed with the midpoint of the circular arc, and the bisector of the target angle is perpendicular to the tangent of the circular arc passing through the midpoint; determining a first display position of the rectangular canvas display based on the target angle; a formula is determined based on the first display position.
The rectangular canvas may be a rectangular canvas corresponding to the target object, and for each display icon of the control or the application program, the rectangular canvas corresponding to each display icon on the screen has the same area as the rectangular canvas corresponding to each display icon of the control or the application program. Optionally, for different controls and application programs, the areas of the rectangular canvas corresponding to the controls and application programs may also be different, and at this time, the rectangular canvas corresponding to the target object needs to be acquired. Alternatively, the rectangular canvas may be a square canvas, but is not limited thereto.
The target angle may be a corner of the rectangular canvas tangent to the circular arc.
The target angle of the rectangular canvas needs to coincide with the middle point of the circular arc, so that the obtained formula is accurate.
The first display position may be a display position of the rectangular canvas when the target corner of the rectangular canvas coincides with the midpoint of the circular arc.
In an optional embodiment, a rectangular canvas corresponding to a target object may be determined, and a target angle of the rectangular canvas may be obtained, where the target angle coincides with a midpoint of an arc, and a bisector of the target angle is perpendicular to a tangent of the arc passing through the midpoint, a first display position of the rectangular canvas may be determined according to the target angle, after the first display position is determined, the rectangular canvas may be fixed in the first display position, and a formula may be determined according to the first display position.
Optionally, a formula is determined according to the first display position, including: determining a target sector based on the circle center and the circular arc; determining a rectangular overlapping area of the rectangular canvas and the target fan shape based on the first display position; determining the target side length of the rectangular overlapping region, wherein the target side length is √ 2/2X; and determining a formula based on the distance between the circle center and the edge of the display area and the difference value of the target side length.
FIG. 4 is a schematic diagram of a first display position according to an embodiment of the invention. The target sector may be a closed figure consisting of the first vertical line, the second vertical line, the intersection point and the arc. The target angle may be an angle tangent to a midpoint of the circular arc, an overlapping region between the rectangular canvas at the first display position and the target fan may be the rectangular overlapping region, that is, the rectangular region displayed in the drawing may obtain a side length overlapping the rectangular overlapping region and the side length of the target fan, and may be a coincidence line between any one side of the fan and the canvas in fig. 4, and the target side length may be determined according to the coincidence line, that is, square root 2/2X, optionally, a region composed of a diagonal line of the target angle and the target side length and a side of the rectangular canvas may be an isosceles triangle, and a waist length of the isosceles triangle, that is, the target side length may be determined according to the pythagorean theorem. And then determining a formula according to the difference between the distance between the circle center and the edge of the display area and the target side length, wherein the control safety distance Y in fig. 4 can be obtained according to the difference between the fillet radius X and the target side length.
In an alternative embodiment, the closed region formed by the first vertical line, the second vertical line and the circular arc may be determined as the target fan.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
According to another aspect of the embodiments of the present invention, there is also provided an interface control apparatus, as shown in fig. 5, the apparatus including: a first obtaining module 502, a second obtaining module 504, a first determining module 506, a second determining module 508, a third determining module 510, and a control module 512.
The first acquisition module is used for responding to a display instruction aiming at a target object and acquiring at least one circular arc of the outer contour of a screen display area; the second acquisition module is used for acquiring a horizontal tangent and a vertical tangent of the arc; the first determining module is used for determining the circle center corresponding to the circular arc based on the horizontal tangent line and the vertical tangent line; the second determining module is used for determining the distance between the circle center and the edge of the display area according to the circle center and the arc; the third determining module is used for determining a safe area of the screen according to the distance; the control module is used for controlling the target object to be displayed in the safety area.
Optionally, the first determining module includes: a first acquisition unit configured to acquire a first vertical line of a horizontal tangent line passing through the first tangent point and a second vertical line of a vertical tangent line passing through the second tangent point; and the first determining unit is used for determining the intersection point of the first vertical line and the second vertical line in the display area, and taking the intersection point as the center of the circle corresponding to the circular arc.
Optionally, the third determining module includes: the second determining unit is used for determining a safe distance according to the product of the distance and a preset numerical value, wherein the safe distance is the shortest distance between a target object and the edge of a display area when the target object is normally displayed in the screen display area; a third determination unit for determining a safety region in the display region according to the safety distance.
Optionally, the third determining unit is configured to obtain a safe distance of the screen according to the following formula: y ═ 1- √ 2/2 × X; the safe distance Y is the shortest distance between a target object and the edge of the display area when the target object is normally displayed in the screen display area, and the distance X is the distance between the circle center and the edge of the display area; the third determination unit is further configured to determine a safety area in the display area according to the safety distance.
Optionally, the apparatus further comprises: the fourth determining module is used for determining a rectangular canvas corresponding to the target object; the third acquisition module is used for acquiring a target angle of the rectangular canvas, wherein the vertex of the target angle is superposed with the middle point of the circular arc, and the bisector of the target angle is mutually vertical to the tangent of the circular arc passing through the middle point; a fifth determining module for determining a first display position of the rectangular canvas display based on the target angle; and the sixth determining module is used for determining a formula according to the first display position.
Optionally, the fifth determining module includes: a fourth determination unit for determining a target sector based on the circle center and the arc; a fifth determination unit configured to determine a rectangular overlapping area of the rectangular canvas and the target fan based on the first display position; a sixth determining unit, configured to determine a target side length of the rectangular overlapping region, where the target side length is √ 2/2 × X; and the seventh determining unit is used for determining a formula based on the distance between the circle center and the edge of the display area and the difference value of the target side length.
It should be noted that the first obtaining module 502, the second obtaining module 504, the first determining module 506, the second determining module 508, the third determining module 510, and the control module 512 correspond to steps S202 to S212, and the six modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the contents disclosed in steps S202 to S212.
It should be noted that, the above units and modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the units and the modules are all positioned in the same processor; alternatively, the units and modules may be located in different processors in any combination.
Embodiments of the present invention also provide a non-volatile storage medium having a computer program stored therein, wherein the computer program is configured to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned nonvolatile storage medium may be configured to store a computer program for executing the steps of:
s1, responding to the display instruction aiming at the target object, and acquiring at least one circular arc of the outer contour of the screen display area;
s2, acquiring a horizontal tangent and a vertical tangent of the arc;
s3, determining the circle center corresponding to the circular arc based on the horizontal tangent and the vertical tangent;
s4, determining the distance between the circle center and the edge of the display area according to the circle center and the arc;
s5, determining a safety area of the screen according to the distance;
and S6, displaying the control target object in the safe area.
Optionally, in this embodiment, the nonvolatile storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, responding to the display instruction aiming at the target object, and acquiring at least one circular arc of the outer contour of the screen display area;
s2, acquiring a horizontal tangent and a vertical tangent of the arc;
s3, determining the circle center corresponding to the circular arc based on the horizontal tangent and the vertical tangent;
s4, determining the distance between the circle center and the edge of the display area according to the circle center and the circular arc;
s5, determining a safety area of the screen according to the distance;
and S6, displaying the control target object in the safe area.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional implementation, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for controlling interface display, wherein a graphical user interface is provided through a screen of a terminal device, the method comprising:
responding to a display instruction aiming at a target object, and acquiring at least one circular arc of the outer contour of a screen display area;
acquiring a horizontal tangent and a vertical tangent of the arc;
determining the circle center corresponding to the circular arc based on the horizontal tangent and the vertical tangent;
determining the distance between the circle center and the edge of the display area according to the circle center and the arc;
determining a safety area of the screen according to the distance;
and controlling the target object to be displayed in the safety area.
2. The method of claim 1, wherein determining a center of a circle corresponding to the arc based on the horizontal tangent and the vertical tangent comprises:
obtaining a first vertical line of the horizontal tangent line passing through a first tangent point and obtaining a second vertical line of the vertical tangent line passing through a second tangent point;
and determining the intersection point of the first vertical line and the second vertical line in the display area, and taking the intersection point as the circle center corresponding to the circular arc.
3. The method of claim 1, wherein determining the safe area of the screen according to the distance comprises:
determining a safe distance according to the product of the distance and a preset numerical value, wherein the safe distance is the shortest distance between the target object and the edge of the display area when the target object is normally displayed in the screen display area;
and determining a safety area in the display area according to the safety distance.
4. The method of claim 1, wherein determining the safe area of the screen according to the distance comprises:
obtaining the safe distance of the screen according to the following formula:
Figure FDA0003527095840000011
when the target object is normally displayed in the screen display area, the safe distance Y is the shortest distance from the target object to the edge of the display area, and the distance X is the distance between the circle center and the edge of the display area;
and determining a safety area in the display area according to the safety distance.
5. The method of claim 4, further comprising:
determining a rectangular canvas corresponding to the target object;
acquiring a target angle of the rectangular canvas, wherein the vertex of the target angle is superposed with the midpoint of the circular arc, and the bisector of the target angle is perpendicular to the tangent of the circular arc passing through the midpoint;
determining a first display position of the rectangular canvas display based on the target angle;
determining the formula according to the first display position.
6. The method of claim 5, wherein determining the formula based on the first display position comprises:
determining a target sector based on the circle center and the arc;
determining a rectangular overlap area of the rectangular canvas and the target fan based on the first display position;
determining the length of the target side of the rectangular overlapped area, wherein the length of the target side is
Figure FDA0003527095840000021
And determining the formula based on the distance between the circle center and the edge of the display area and the difference value of the target side length.
7. An apparatus for controlling an interface display, wherein a graphic user interface is provided through a screen of a terminal device, the apparatus comprising:
the first acquisition module is used for responding to a display instruction aiming at a target object and acquiring at least one circular arc of the outer contour of the screen display area;
the second acquisition module is used for acquiring a horizontal tangent and a vertical tangent of the arc;
the first determining module is used for determining the circle center corresponding to the circular arc based on the horizontal tangent and the vertical tangent;
the second determining module is used for determining the distance between the circle center and the edge of the display area according to the circle center and the circular arc;
a third determining module, configured to determine a safety area of the screen according to the distance;
and the control module is used for controlling the target object to be displayed in the safety area.
8. A non-volatile storage medium, in which a computer program is stored, wherein the computer program is configured to execute, when running, the control method of interface display recited in any one of claims 1 to 6.
9. A processor for running a program, wherein the program is configured to execute the control method of the interface display according to any one of claims 1 to 6 when running.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the method for controlling the interface display according to any one of claims 1 to 6.
CN202210199830.6A 2022-03-01 2022-03-01 Interface display control method and device, storage medium and processor Pending CN114661394A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210199830.6A CN114661394A (en) 2022-03-01 2022-03-01 Interface display control method and device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210199830.6A CN114661394A (en) 2022-03-01 2022-03-01 Interface display control method and device, storage medium and processor

Publications (1)

Publication Number Publication Date
CN114661394A true CN114661394A (en) 2022-06-24

Family

ID=82027656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210199830.6A Pending CN114661394A (en) 2022-03-01 2022-03-01 Interface display control method and device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN114661394A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115237289A (en) * 2022-07-01 2022-10-25 杭州涂鸦信息技术有限公司 Hot area range determining method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108648677A (en) * 2018-05-14 2018-10-12 昆山国显光电有限公司 Show platen edge display control method, control device and display device
CN109308205A (en) * 2018-08-09 2019-02-05 腾讯科技(深圳)有限公司 Display adaptation method, device, equipment and the storage medium of application program
CN110297342A (en) * 2019-06-28 2019-10-01 上海天马有机发光显示技术有限公司 A kind of display panel and display device
CN111276088A (en) * 2020-03-26 2020-06-12 Tcl华星光电技术有限公司 Pixel compensation method
CN112261242A (en) * 2020-10-21 2021-01-22 合肥芯颖科技有限公司 Image data processing method and device
CN112486616A (en) * 2020-11-30 2021-03-12 维沃移动通信有限公司 Interface display method, interface display device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108648677A (en) * 2018-05-14 2018-10-12 昆山国显光电有限公司 Show platen edge display control method, control device and display device
CN109308205A (en) * 2018-08-09 2019-02-05 腾讯科技(深圳)有限公司 Display adaptation method, device, equipment and the storage medium of application program
US20200409545A1 (en) * 2018-08-09 2020-12-31 Tencent Technology (Shenzhen) Company Limited Display adaptation method and apparatus for application, and storage medium
CN110297342A (en) * 2019-06-28 2019-10-01 上海天马有机发光显示技术有限公司 A kind of display panel and display device
CN111276088A (en) * 2020-03-26 2020-06-12 Tcl华星光电技术有限公司 Pixel compensation method
CN112261242A (en) * 2020-10-21 2021-01-22 合肥芯颖科技有限公司 Image data processing method and device
CN112486616A (en) * 2020-11-30 2021-03-12 维沃移动通信有限公司 Interface display method, interface display device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115237289A (en) * 2022-07-01 2022-10-25 杭州涂鸦信息技术有限公司 Hot area range determining method, device, equipment and storage medium
CN115237289B (en) * 2022-07-01 2024-02-23 杭州涂鸦信息技术有限公司 Hot zone range determining method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
EP3951721A1 (en) Method and apparatus for determining occluded area of virtual object, and terminal device
CN111957040B (en) Detection method and device for shielding position, processor and electronic device
CN110052021B (en) Game object processing method, mobile terminal device, electronic device, and storage medium
CN110448904B (en) Game view angle control method and device, storage medium and electronic device
CN111383345B (en) Virtual content display method and device, terminal equipment and storage medium
CN110377215B (en) Model display method and device and terminal equipment
CN106168894B (en) Content display method and mobile terminal
CN111450529B (en) Game map acquisition method and device, storage medium and electronic device
CN111135565B (en) Terrain splicing method and device in game scene, processor and electronic device
CN113262490A (en) Virtual object marking method and device, processor and electronic device
CN114661394A (en) Interface display control method and device, storage medium and processor
CN105278751A (en) Method and apparatus for implementing human-computer interaction, and protective case
US10318131B2 (en) Method for scaling down effective display area of screen, and mobile terminal
CN113318428A (en) Game display control method, non-volatile storage medium, and electronic device
US20150091836A1 (en) Touch control input method and system, computer storage medium
CN110677586B (en) Image display method, image display device and mobile terminal
CN110658976A (en) Touch track display method and electronic equipment
CN112190944A (en) Virtual building model construction method and device and electronic device
JP5768533B2 (en) Electronic device and program
CN109582269B (en) Physical splicing screen display method and device and terminal equipment
CN103577051A (en) Method and device for controlling menu
US10048834B2 (en) Information processing method and electronic device
CN110610454A (en) Method and device for calculating perspective projection matrix, terminal device and storage medium
KR20180088859A (en) A method for changing graphics processing resolution according to a scenario,
CN114742970A (en) Processing method of virtual three-dimensional model, nonvolatile storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination