CN113791788A - Adaptive window adjusting method and device, electronic equipment and medium - Google Patents

Adaptive window adjusting method and device, electronic equipment and medium Download PDF

Info

Publication number
CN113791788A
CN113791788A CN202111358448.7A CN202111358448A CN113791788A CN 113791788 A CN113791788 A CN 113791788A CN 202111358448 A CN202111358448 A CN 202111358448A CN 113791788 A CN113791788 A CN 113791788A
Authority
CN
China
Prior art keywords
window
display screen
irregular
display
resolution
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
CN202111358448.7A
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.)
Beijing Eeo Education Technology Co ltd
Original Assignee
Beijing Eeo Education Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Eeo Education Technology Co ltd filed Critical Beijing Eeo Education Technology Co ltd
Priority to CN202111358448.7A priority Critical patent/CN113791788A/en
Publication of CN113791788A publication Critical patent/CN113791788A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a self-adaptive window adjusting method, a self-adaptive window adjusting device, electronic equipment and a self-adaptive window adjusting medium, which are suitable for a display screen, wherein a window is displayed on the display screen; the method comprises the following steps: judging whether the display resolution of the display screen changes or not; if so, acquiring the reference resolution of the display screen, the changed display resolution and the attribute data of the window; redrawing the window according to the reference resolution of the display screen, the changed display resolution and the attribute data of the window so as to update the window displayed on the display screen; the size of the updated frame displayed on the display screen is the same as that of the frame before updating. According to the method and the device, when the display resolution of the display screen changes, the size of the window body can be adjusted in a self-adaptive mode, so that the size of the window body is kept consistent with the size of the window body before the display resolution changes.

Description

Adaptive window adjusting method and device, electronic equipment and medium
Technical Field
The application relates to the technical field of window display, in particular to a self-adaptive window adjusting method, device, electronic equipment and medium.
Background
A frame is the most important part of the user interface displayed on the display screen, and is a rectangular or irregular area corresponding to an application program presented on the screen, including a frame and a client area, which is a visual interface between the user and the application program that generated the window.
At present, a window displayed on a display screen cannot adapt to dynamic change or high-resolution screen adaptation of the display resolution of the display screen, and the size of the window is changed due to the change of the display resolution of the display screen under the condition that software is not restarted or manually adjusted, so that the display effect of the window is influenced.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method, an apparatus, an electronic device, and a medium for adaptively adjusting a size of a window when a display resolution of a display screen changes, so that the size of the window is consistent with that before the display resolution changes.
The self-adaptive window adjusting method is suitable for a display screen, wherein a window is displayed on the display screen; the method comprises the following steps:
judging whether the display resolution of the display screen changes or not;
if so, acquiring the reference resolution of the display screen, the changed display resolution and the attribute data of the window;
redrawing the window according to the reference resolution of the display screen, the changed display resolution and the attribute data of the window so as to update the window displayed on the display screen; and the size of the updated window displayed on the display screen is the same as that of the window before updating.
In some embodiments, in the adaptive window adjusting method, when the window is an irregular window, the redrawing the window according to the reference resolution, the changed display resolution, and the attribute data of the window of the display screen to update the window displayed on the display screen includes the following steps:
drawing a rectangular window corresponding to the irregular window according to the reference resolution of the display screen, the changed display resolution and the attribute data of the irregular window;
and drawing the irregular window body in the rectangular window body so as to update the irregular window body displayed on the display screen.
In some embodiments, in the adaptive window frame adjusting method, drawing the irregular window frame in the rectangular window frame to update the irregular window frame displayed on the display screen includes:
calculating effective pixel points occupied by the irregular window, wherein the effective pixel points are parts, corresponding to the irregular window, of display pixel points occupied by the rectangular window;
expanding the boundary of the effective pixel point according to a preset expansion algorithm to obtain an expansion edge of the irregular window body so as to update the effective pixel point occupied by the irregular window body, wherein the updated effective pixel point comprises a display pixel point occupied by the expansion edge;
and drawing the irregular window by using the updated effective pixel points so as to update the irregular window displayed on the display screen.
In some embodiments, in the adaptive window frame adjusting method, drawing the irregular window frame in the rectangular window frame to update the irregular window frame displayed on the display screen, further includes: and after the effective pixel points occupied by the irregular window body are updated, shearing the ineffective pixel points in the rectangular window body.
In some embodiments, in the adaptive window frame adjusting method, drawing the irregular window frame in the rectangular window frame to update the irregular window frame displayed on the display screen, further includes: and carrying out transparency processing on effective pixel points occupied by the extension edges which are not used in the drawing process of the irregular window.
In some embodiments, in the adaptive window adjusting method, the boundary of the effective pixel point is expanded according to a preset expansion algorithm to obtain an expansion boundary of the irregular window, specifically: and expanding the boundary of the effective pixel points by a preset number of display pixel points to obtain the expanded boundary of the irregular window.
In some embodiments, in the adaptive window adjusting method, the drawing a rectangular window corresponding to the irregular window according to the reference resolution of the display screen, the changed display resolution, and the attribute data of the window includes:
determining display pixel points occupied by a rectangular window corresponding to the irregular window according to the reference resolution of the display screen, the changed display resolution and the attribute data of the window;
and drawing the rectangular window body corresponding to the irregular window body by using the display pixel points occupied by the rectangular window body corresponding to the irregular window body.
In some embodiments, an adaptive window adjusting apparatus is further provided, which is adapted to a display screen, where a window is displayed on the display screen; the device comprises:
the judging module is used for judging whether the display resolution of the display screen changes or not;
the acquiring module is used for acquiring the reference resolution of the display screen, the changed display resolution and the attribute data of the window when the judging module judges that the resolution of the display screen changes;
the updating module is used for redrawing the window body according to the reference resolution of the display screen, the changed display resolution and the attribute data of the window body so as to update the window body displayed on the display screen; and the size of the updated window displayed on the display screen is the same as that of the window before updating.
In some embodiments, there is also provided an electronic device comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, the processor and the memory communicate via the bus when the electronic device is running, and the machine-readable instructions, when executed by the processor, perform the steps of the adaptive window adjustment method.
In some embodiments, a computer-readable storage medium is also provided, having stored thereon a computer program which, when being executed by a processor, performs the steps of the adaptive window adjustment method.
This application initiative detects and judges whether the display resolution of display screen changes to when display resolution changes, the shared display pixel point number of the adjustment window form that is suitable for certainly, and update the window form that shows on the display screen, and make the window form after the update that shows on the display screen is the same with the size of the window form before the update, thereby realizes the self-adaptation adjustment of window form under the display resolution of difference, need not the user and goes to the attribute data of adjustment window form by oneself, also need not to restart software, has shortened user's operation route, has eliminated user's latency, thereby promotes user's software and uses experience and window display effect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 shows a flowchart of a method of an adaptive window adjustment method according to an embodiment of the present application;
FIG. 2 is a diagram illustrating a display screen resolution setting process according to an embodiment of the present application;
fig. 3 shows a flow chart of the method for redrawing the form according to the display resolution before the change of the display screen, the display resolution after the change, and the attribute data of the form;
fig. 4 shows a flowchart of the method for drawing a rectangular window corresponding to the irregular window according to the reference resolution of the display screen, the changed display resolution, and the attribute data of the window;
fig. 5 is a schematic diagram illustrating a drawing of a completed rectangular window according to an embodiment of the present application;
fig. 6 shows a flowchart of a method for drawing an irregular window in the rectangular window according to the embodiment of the present application;
fig. 7 is a schematic diagram illustrating an area of an effective pixel occupied by an irregular window according to an embodiment of the present application;
fig. 8 is a schematic diagram illustrating an area of an effective pixel after boundary extension according to an embodiment of the present application;
FIG. 9 is a schematic diagram illustrating a complete irregular window body drawn according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an adaptive window adjusting apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram illustrating an update module of a window regulator according to an embodiment of the present application;
fig. 12 is a schematic structural diagram illustrating a second rendering module of the update module according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of another second rendering module of the update module according to the embodiment of the present application;
fig. 14 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that in the embodiments of the present application, the term "comprising" is used to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
At present, a window displayed on a display screen cannot adapt to dynamic change of display resolution of the display screen or high-resolution screen adaptation.
The size of the frame and the content, such as text, displayed in the frame may change when the display resolution of the display screen changes. Thus the displayed size of a frame (including the content displayed in the frame) on the display screen is measured in terms of display pixels, e.g. the frame occupies 100 × 100 pixels, the display resolution is 100 × 100, and then the displayed size of the frame is 100mm × 100 mm; when the display resolution is 200 × 200, the size of the frame displayed is 50mm × 50mm, and the size of the frame is reduced to 1/4 of the original frame size, so that the frame displayed on the display screen cannot change adaptively with the change of the display resolution of the display screen, and the display effect of the frame is affected.
Based on the above, the application provides a self-adaptive window adjusting method, which is suitable for a display screen, wherein a window is displayed on the display screen; as shown in fig. 1, the method comprises the steps of:
s101, judging whether the display resolution of the display screen is changed or not;
s102, if so, acquiring the reference resolution of the display screen, the changed display resolution and the attribute data of the form;
s103, redrawing the window body according to the reference resolution of the display screen, the changed display resolution and the attribute data of the window body so as to update the window body displayed on the display screen; and the size of the updated window displayed on the display screen is the same as that of the window before updating.
In the step S101, in a normal case, as in the display resolution setting process shown in fig. 2, the display resolution of the display screen is changed by operating the display screen control system. Therefore, whether the display resolution of the display screen changes or not can be detected and judged by monitoring the instructions of the display screen control system.
Taking a display screen control system as a windows system as an example, when the resolution of the system changes, the system sends out a message with the changed resolution, and the message sent out by the message with the changed resolution originates from a windows system message mechanism. And when the message of the resolution change is monitored, judging that the display resolution of the display screen is changed. And if the message of the resolution change is not monitored, judging that the display resolution of the display screen is not changed.
In step S102, the reference resolution, also called physical resolution, of the display screen is determined by the hardware structure of the display screen. For example, the screen resolution is 768 × 1366, that is, 768 pixels are horizontally arranged and 1366 pixels are vertically arranged on the screen. After the display resolution of the screen is adjusted to 800 × 600, the system simulates the display effect of 800 × 600 according to a certain algorithm, for example, 800 × 600 pixels are extracted from 1366px × 768px for rendering, and other pixels are filled according to the algorithm, for example, two adjacent pixels are taken as one pixel and filled with the same color.
It can be seen that, when the display resolution of the display screen is reduced, the physical resolution is not changed, and in a popular way, one display pixel may be considered to correspond to a plurality of reference pixels, that is, the display size corresponding to the reference pixels is enlarged.
For example, when the display resolution of the display screen before change is 200 × 200, the display resolution after change is 100 × 100, the reference resolution of the display screen is 400 × 400, and the size of the attribute data of the rectangular window corresponding to the irregular window is 50 × 50, then the rectangular window occupies 50 × 50 display pixels corresponding to 100 × 100 reference pixels before the display resolution of the display screen does not change, that is, the display resolution is 200 × 200.
After the display resolution of the display screen is changed from 200 × 200 to 100 × 100, if the display pixels occupied by the window are not determined again, the window still occupies 50 × 50 display pixels and actually occupies 200 × 200 reference pixels, and the length and width of the window are respectively doubled.
Therefore, in order to ensure that the size of the redrawing window body is consistent with that of the window body before drawing, namely, the number of the reference pixel points occupied by the redrawing window body and the window body before drawing is consistent, the difference value of the number of the reference pixel points occupied by the redrawing window body is kept within the constraint of a reasonable range according to the multiple relation between the reference resolution of the display screen and the changed display resolution, and the number of the display pixel points occupied by the window body is recalculated when the redrawing window body is obtained.
For example, 200 × 200 reference pixels actually occupied by the window remain unchanged, and when the display resolution of the display screen is adjusted to 100 × 100, the window correspondingly occupies 25 × 50 display pixels. And drawing the window body in the display screen according to the position information in the attribute data of the window body, wherein the number of the reference pixel points occupied by the redrawn window body is consistent with the number of the reference pixel points occupied by the previously displayed window body, so that the size of the updated window body displayed on the display screen is the same as that of the window body before updating.
The attribute data of the frame, specifically, the attribute data of the frame before the display resolution is changed, includes position information of the frame, size information of the frame, and the like. The size information refers to information such as the length and width of the window that can identify the size of the window, and the position information may be screen coordinates of the window.
The attribute data of the form can be set by software default or set by the user. When a user opens a certain application and finds that the display effect of the interface window and the content in the window does not meet the requirements (content size, definition and the like), the parameter setting is carried out on the interface window through the display screen control system, and the system parameters are adjusted until the corresponding requirements are met.
Some frames can also adjust the attribute data of the frames in a dragging and stretching mode, for example, a chat dialog box can change the position data of the frames on a display screen through dragging and change the size data displayed on the display screen through stretching.
This application initiative detects and judges whether the display resolution of display screen changes to when display resolution changes, the shared display pixel point number of the adjustment window form that is suitable for certainly, and update the window form that shows on the display screen, and make the window form after the update that shows on the display screen is the same with the size of the window form before the update, thereby realizes the self-adaptation adjustment of window form under the display resolution of difference, need not the user and goes to the attribute data of adjustment window form by oneself, also need not to restart software, has shortened user's operation route, has eliminated user's latency, thereby promotes user's software and uses experience and window display effect.
In step S103, when the window is an irregular window, redrawing the window according to the reference resolution of the display screen, the changed display resolution, and the attribute data of the window to update the window displayed on the display screen, as shown in fig. 3, specifically includes:
s301, drawing a rectangular window body corresponding to the irregular window body according to the reference resolution of the display screen, the changed display resolution and the attribute data of the irregular window body;
s302, drawing the irregular window body in the rectangular window body so as to update the irregular window body displayed on the display screen.
Step S301, as shown in fig. 4, the drawing a rectangular window corresponding to the irregular window according to the reference resolution of the display screen, the changed display resolution, and the attribute data of the window includes:
s401, determining display pixel points occupied by a rectangular window corresponding to the irregular window according to the reference resolution of the display screen, the changed display resolution and the attribute data of the window;
s402, drawing the rectangular window corresponding to the irregular window by using display pixel points occupied by the rectangular window corresponding to the irregular window.
When the window is an irregular window, a rectangular window corresponding to the irregular window needs to be drawn first. Fig. 5 shows a rectangular frame 501 with completed drawing.
Step S302, in the rectangular window, drawing the irregular window to update the irregular window displayed on the display screen, as shown in fig. 6, specifically including:
s601, calculating effective pixel points occupied by the irregular window, wherein the effective pixel points are parts, corresponding to the irregular window, of display pixel points occupied by the rectangular window;
s602, expanding the boundary of the effective pixel point according to a preset expansion algorithm to obtain an expansion edge of the irregular window body so as to update the effective pixel point occupied by the irregular window body, wherein the updated effective pixel point comprises a display pixel point occupied by the expansion edge;
and S603, drawing the irregular window by using the updated effective pixel points so as to update the irregular window displayed on the display screen.
In step S601, an area 701 of the effective pixel point occupied by the irregular window is shown in fig. 7. In step S602, the area of the effective pixel after the boundary extension is shown in fig. 8, where the area includes an extension edge 801. In step S603, the drawn irregular window is as shown in fig. 9.
In general, when a picture with a resolution lower than a reference resolution is displayed, each pixel is expanded to an adjacent pixel for display through a differential algorithm, so that the whole picture is filled, and the actual reference resolution is unchanged. In this process, not all the display pixels are simultaneously amplified by the same factor, which results in a scaling error. For the boundary curve of the irregular window, the magnification times of the pixels on the boundary are different, so that if the effective pixels occupied by the irregular window are calculated strictly according to the attribute of the irregular window, the pixels on the boundary of the irregular window may exceed the area of the effective pixels, and the problems of fuzziness, saw teeth and the like of the boundary of the redrawn irregular window are caused.
Therefore, the boundary of the effective pixel point is expanded, and the area of the effective pixel point is properly expanded, so that the irregular window body can be completely and clearly drawn in the area of the effective pixel point, and the irregular window body can be clearly and smoothly displayed.
In the adaptive window adjusting method, the irregular window is drawn in the rectangular window to update the irregular window displayed on the display screen, and the method further includes: and after the effective pixel points occupied by the irregular window body are updated, shearing the ineffective pixel points in the rectangular window body.
And the non-effective pixel points in the rectangular window are the parts except the effective pixel points in the display pixel points occupied by the rectangular window.
In the prior art, the rectangular window is usually subjected to transparency processing, but the rectangular window after transparency processing still exists actually and still occupies the display area of the display screen, and when the irregular window is operated, such as dragging operation, and arrangement operation of a plurality of irregular windows, the rectangular window may cause certain influence.
Therefore, in this embodiment, the invalid pixel points in the rectangular window are cut, so that the display area of the display screen actually occupied by the irregular window is almost the same as the shape of the irregular window, and a user can conveniently operate the irregular window.
The adaptive window adjusting method according to the embodiment of the present application draws the irregular window in the rectangular window to update the irregular window displayed on the display screen, and further includes: and carrying out transparency processing on effective pixel points occupied by the extension edges which are not used in the drawing process of the irregular window.
In a specific implementation process, the step of transparentizing may also be performed after the rectangular window is drawn, that is, a transparent rectangular window is drawn. And drawing the irregular window in the transparent effective pixel points.
The non-effective pixel points are rectangular windows corresponding to the irregular window bodies, among the occupied display pixel points, the display pixel points occupied by the irregular window bodies are not displayed, the non-effective pixel points do not need to be displayed on a display screen, and therefore the non-effective pixel points need to be processed, so that the drawn rectangular window bodies only display the content of the irregular window bodies.
Therefore, the processing method for processing the invalid pixel points in the display pixel points occupied by the rectangular window is one of the following methods: and shearing the non-effective pixel points, or performing transparentization treatment on the non-effective pixel points.
In the adaptive window adjustment method according to this embodiment, the step of expanding the boundary of the effective pixel point according to a preset expansion algorithm to obtain an expanded boundary of the irregular window specifically includes: and expanding the boundary of the effective pixel points by a preset number of display pixel points to obtain the expanded boundary of the irregular window.
The external expansion algorithm is simple and easy to implement, the calculation amount can be reduced, and the window updating speed is increased.
In the embodiment of the application, after the occupied effective pixel points of the irregular window are calculated, the boundaries of the effective pixel points are expanded by 2 display pixel points.
In the embodiment of the application, a self-adaptive window adjusting device is further provided, which is suitable for a display screen, wherein a window is displayed on the display screen; as shown in fig. 10, the apparatus includes:
a judging module 1001, configured to judge whether a display resolution of the display screen changes;
an obtaining module 1002, configured to obtain a reference resolution of the display screen, a changed display resolution, and attribute data of the window when the determining module determines that the resolution of the display screen changes;
the updating module 1003 redraws the window according to the reference resolution of the display screen, the changed display resolution and the attribute data of the window so as to update the window displayed on the display screen; and the size of the updated window displayed on the display screen is the same as that of the window before updating.
This application window form adjusting device, whether can initiatively detect and judge the display resolution ratio of display screen and change to when display resolution ratio changes, from the shared number of display pixel points of the adjustment window form that is suitable for, and update the window form that shows on the display screen, and make the window form after the update that shows on the display screen is the same with the size of the window form before the update.
In the window adjusting apparatus described in this application, as shown in fig. 11, the update module 1003 specifically includes:
the first drawing module 1101 is used for drawing a rectangular window body corresponding to the irregular window body according to the reference resolution of the display screen, the changed display resolution and the attribute data of the irregular window body;
and the second drawing module 1102 is used for drawing the irregular window body in the rectangular window body so as to update the irregular window body displayed on the display screen.
In some embodiments, in the window adjusting apparatus described in this application, as shown in fig. 12, the second drawing module 1102 specifically includes:
the calculating module 1201 is configured to calculate effective pixel points occupied by the irregular window, where the effective pixel points are portions, corresponding to the irregular window, of display pixel points occupied by the rectangular window;
the outward expansion module 1202 is used for outward expanding the boundary of the effective pixel point according to a preset outward expansion algorithm to obtain an outward expansion edge of the irregular window body so as to update the effective pixel point occupied by the irregular window body, wherein the updated effective pixel point comprises a display pixel point occupied by the outward expansion edge;
the third drawing module 1203 draws the irregular window by using the updated effective pixel points, so as to update the irregular window displayed on the display screen.
In some embodiments, as shown in fig. 13, the second rendering module further includes:
the shearing module 1301 is configured to shear the non-effective pixels in the rectangular window after the effective pixels occupied by the irregular window are updated;
and the transparentizing module 1302 is configured to perform transparentizing processing on effective pixels occupied by the extension edges that are not used in the irregular window drawing process.
An embodiment of the present application further provides an electronic device, as shown in fig. 14, including: a processor 1401, a memory 1402 and a bus 1403, wherein said memory 1402 stores machine readable instructions executable by said processor 1401, said processor 1401 and said memory 1402 communicating via said bus 1403 when the electronic device is operated, and said machine readable instructions when executed by said processor 1401 perform the steps of said adaptive window adaptation method.
The present invention further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the adaptive window adjustment method are performed.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules 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 of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network 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 application 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 functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a platform server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A self-adaptive window adjusting method is characterized by being suitable for a display screen, wherein a window is displayed on the display screen; the method comprises the following steps:
judging whether the display resolution of the display screen changes or not;
if so, acquiring the reference resolution of the display screen, the changed display resolution and the attribute data of the window;
redrawing the window according to the reference resolution of the display screen, the changed display resolution and the attribute data of the window so as to update the window displayed on the display screen; and the size of the updated window displayed on the display screen is the same as that of the window before updating.
2. The adaptive window adjusting method according to claim 1, wherein when the window is an irregular window, the redrawing the window according to the reference resolution, the changed display resolution, and the attribute data of the window to update the window displayed on the display screen comprises the following steps:
drawing a rectangular window corresponding to the irregular window according to the reference resolution of the display screen, the changed display resolution and the attribute data of the irregular window;
and drawing the irregular window body in the rectangular window body so as to update the irregular window body displayed on the display screen.
3. An adaptive window adjustment method according to claim 2,
in the rectangular window, drawing the irregular window to update the irregular window displayed on the display screen, including:
calculating effective pixel points occupied by the irregular window, wherein the effective pixel points are parts, corresponding to the irregular window, of display pixel points occupied by the rectangular window;
expanding the boundary of the effective pixel point according to a preset expansion algorithm to obtain an expansion edge of the irregular window body so as to update the effective pixel point occupied by the irregular window body, wherein the updated effective pixel point comprises a display pixel point occupied by the expansion edge;
and drawing the irregular window by using the updated effective pixel points so as to update the irregular window displayed on the display screen.
4. An adaptive window adjustment method according to claim 3,
in the rectangular window, drawing the irregular window to update the irregular window displayed on the display screen, further comprising: and after the effective pixel points occupied by the irregular window body are updated, shearing the ineffective pixel points in the rectangular window body.
5. An adaptive window adjustment method according to claim 3,
in the rectangular window, drawing the irregular window to update the irregular window displayed on the display screen, further comprising: and carrying out transparency processing on effective pixel points occupied by the extension edges which are not used in the drawing process of the irregular window.
6. An adaptive window adjustment method according to claim 3,
and expanding the boundary of the effective pixel point according to a preset expansion algorithm to obtain an expansion boundary of the irregular window body, specifically: and expanding the boundary of the effective pixel points by a preset number of display pixel points to obtain the expanded boundary of the irregular window.
7. An adaptive window adjustment method according to claim 2,
the drawing of the rectangular window corresponding to the irregular window according to the reference resolution of the display screen, the changed display resolution and the attribute data of the window comprises the following steps:
determining display pixel points occupied by a rectangular window corresponding to the irregular window according to the reference resolution of the display screen, the changed display resolution and the attribute data of the window;
and drawing the rectangular window body corresponding to the irregular window body by using the display pixel points occupied by the rectangular window body corresponding to the irregular window body.
8. A self-adaptive window adjusting device is characterized by being suitable for a display screen, wherein a window is displayed on the display screen; the device comprises:
the judging module is used for judging whether the display resolution of the display screen changes or not;
the acquiring module is used for acquiring the reference resolution of the display screen, the changed display resolution and the attribute data of the window when the judging module judges that the resolution of the display screen changes;
the updating module is used for redrawing the window body according to the reference resolution of the display screen, the changed display resolution and the attribute data of the window body so as to update the window body displayed on the display screen; and the size of the updated window displayed on the display screen is the same as that of the window before updating.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the adaptive window adjustment method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the adaptive window adjustment method according to any one of claims 1 to 7.
CN202111358448.7A 2021-11-17 2021-11-17 Adaptive window adjusting method and device, electronic equipment and medium Pending CN113791788A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111358448.7A CN113791788A (en) 2021-11-17 2021-11-17 Adaptive window adjusting method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111358448.7A CN113791788A (en) 2021-11-17 2021-11-17 Adaptive window adjusting method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN113791788A true CN113791788A (en) 2021-12-14

Family

ID=78955448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111358448.7A Pending CN113791788A (en) 2021-11-17 2021-11-17 Adaptive window adjusting method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN113791788A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030076340A1 (en) * 2001-09-18 2003-04-24 International Business Machines Corporation Computer system, display device, display controller, image processing method, display resolution change method, and computer program
CN101430633A (en) * 2007-10-26 2009-05-13 米特尔网络公司 Method and apparatus for maintaining a visual appearance of at least one window when a resolution of the screen changes
CN104317968A (en) * 2014-11-18 2015-01-28 苏州科达科技股份有限公司 Page self-adaptive adjusting method and system
CN106502608A (en) * 2016-10-19 2017-03-15 北京奇虎科技有限公司 Display methods, device and terminal device
CN110989958A (en) * 2019-12-13 2020-04-10 威创集团股份有限公司 Method and related device for opening polygonal window on splicing wall

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030076340A1 (en) * 2001-09-18 2003-04-24 International Business Machines Corporation Computer system, display device, display controller, image processing method, display resolution change method, and computer program
CN101430633A (en) * 2007-10-26 2009-05-13 米特尔网络公司 Method and apparatus for maintaining a visual appearance of at least one window when a resolution of the screen changes
CN104317968A (en) * 2014-11-18 2015-01-28 苏州科达科技股份有限公司 Page self-adaptive adjusting method and system
CN106502608A (en) * 2016-10-19 2017-03-15 北京奇虎科技有限公司 Display methods, device and terminal device
CN110989958A (en) * 2019-12-13 2020-04-10 威创集团股份有限公司 Method and related device for opening polygonal window on splicing wall

Similar Documents

Publication Publication Date Title
TWI540501B (en) Display control method for application program interface and device thereof
CA2630238C (en) Method and apparatus for maintaining a visual appearance of at least one window when a resolution of the screen changes
CN103177709A (en) Method and device for displaying characters
CN107908604B (en) Report form graph generation method and device, computer equipment and storage medium
US9983774B2 (en) Authoring and consuming offline an interactive data analysis document
US20170177292A1 (en) System configuring a human machine interface on multiple displays
CN113791788A (en) Adaptive window adjusting method and device, electronic equipment and medium
CN112199139B (en) Self-adaptive adjustment method and device for system scaling
CN105389308B (en) Webpage display processing method and device
CN112905287A (en) Window text display control method and device, vehicle and readable medium
CN113791857B (en) Application window background fuzzy processing method and device in Linux system
CN115423919B (en) Image rendering method, device, equipment and storage medium
CN111176530A (en) 3D model display method and device in WeChat applet
US9311114B2 (en) Dynamic display overlay
CN114117274A (en) Data rendering method and device, computer equipment and storage medium
JP2005267158A (en) Character size control method, device, and program
CN110825282B (en) Picture display method and device, electronic equipment and storage medium
CN112419137A (en) Method and device for displaying mask picture and method and device for displaying mask picture
CN111580909A (en) Picture generation method, device, equipment and storage medium
CN111124239A (en) Medical film reading method and device
CN117420977B (en) Cross-screen text scrolling display system, method, electronic equipment and storage medium
CN114500735B (en) Display processing method, computing device and readable storage medium
JP2002328802A (en) Window display control method
JPH0721311A (en) On-line character segmenting device
JPH06236171A (en) Window display system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20211214

RJ01 Rejection of invention patent application after publication