CN107967162A - One kind is based on Windows systematic difference program high-resolution display methods - Google Patents

One kind is based on Windows systematic difference program high-resolution display methods Download PDF

Info

Publication number
CN107967162A
CN107967162A CN201711169820.3A CN201711169820A CN107967162A CN 107967162 A CN107967162 A CN 107967162A CN 201711169820 A CN201711169820 A CN 201711169820A CN 107967162 A CN107967162 A CN 107967162A
Authority
CN
China
Prior art keywords
scaling
fzoom
window
dpi
application program
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
CN201711169820.3A
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.)
Shenzhen Futu Network Technology Co Ltd
Original Assignee
Shenzhen Futu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Futu Network Technology Co Ltd filed Critical Shenzhen Futu Network Technology Co Ltd
Priority to CN201711169820.3A priority Critical patent/CN107967162A/en
Publication of CN107967162A publication Critical patent/CN107967162A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

Landscapes

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

Abstract

The invention discloses one kind to be based on Windows systematic difference program high-resolution display methods, it includes having the following steps:Step S1, starts application program;Step S2, selects scalable manner:If selecting self-defined scaling, step S3 is performed, if the adaptive high clear screen of selection, performs step S4;Step S3, judges whether self-defined scaling fZoomIf so, step S5 is then performed, if it is not, then carrying out self-defined scaling setting;Step S4, calculates scaling fZoom;Step S5, application program create window and control;Step S6, performs window and control location scaling calculating, window and control word calculates and window and the calculating of control picture;Step S7, the high definition for completing window and control are shown;Step S8, exits application program.DPI conversion scales when the present invention is according to DPI when arranging and using application program are handled to carry out Coordinate Logic conversion and window scaling, show the window in application program, word and picture high-resolution.

Description

One kind is based on Windows systematic difference program high-resolution display methods
Technical field
The present invention relates to application program display methods, more particularly to one kind to be based on Windows systematic difference program high definitions Clear display methods.
Background technology
High clear screen generally refers to the screen of more than 2k resolution ratio, and corresponding one of windows platform programming is important Concept is DPI, i.e. the pixel number of per inch.In interface and exploitation, default screen is DPI=96, but works as display energy The resolution ratio of support is higher, and the corresponding DPI values of corresponding the best visual effect also can be bigger, such as when resolution ratio is 2880*1800 When, the optimal DPI of Win10 system recommendations is 192, is 2 times of acquiescence.Under Windows interface display clearly whether, two it is important because Element, when:During compiling of application, for the DPI (=96) of interface arrangement;Second,:Real use should program when, currently The DPI of screen;The former DPI is just secured after application program generation, and the latter DPI is the screen difference according to specifically used person And it is different, it is unintelligible if the effect of both inconsistent so interface displays.
In the prior art, Microsoft DPI Virtualization are also one for one of the processing under compatible difference DPI A technology, Microsoft just introduces a set of mechanism and opens this DPI Virtualization, acquiescence since Windows vista Set mechanism, application program can be still 96 arrangement interface elements by DPI, and all coordinates are operated and drawn and can all be set at Virtual Space, system can be responsible for Coordinate Logic conversion and the processing of window scaling, and then overall scaling projects to real screen again.But The greatly compatible operation of old program of Microsoft DPI Virtualization this set mechanism, but its at the same time there is compatibility The drawbacks of bringing, it is first to be plotted in Virtual Space that it, which renders principle, and then overall scaling projects to real screen again, for window Upper font and picture, all can be relatively fuzzyyer.
The content of the invention
The technical problem to be solved in the present invention is, in view of the deficiencies of the prior art, there is provided one kind is based on Windows systems Application program high-resolution display methods, DPI when this method is according to arrangement and DPI conversion scales during using application program come Coordinate Logic conversion and the processing of window scaling are carried out, shows the window in application program, word and picture high-resolution.
In order to solve the above technical problems, the present invention adopts the following technical scheme that.
One kind is based on Windows systematic difference program high-resolution display methods, it includes having the following steps:Step S1, Start application program;Step S2, selects scalable manner:If selecting self-defined scaling, step S3 is performed, if selection is adaptive High clear screen is answered, then performs step S4;Step S3, judges whether self-defined scaling fZoomIf so, then perform step S5, if it is not, then opening application program system sets window, carries out self-defined scaling setting, is provided with backed off after random application Program, and it is back to step S1;Step S4, calculates scaling fZoom;Step S5, application program create window and control;Step Rapid S6, performs window and control location scaling calculating, window and control word calculates and window and the calculating of control picture;Step S7, the high definition for completing window and control are shown;Step S8, exits application program.
Preferably, in the step S4, calculating the process of scaling fZoom includes:Utilize GetDeviceCaps functions The DPI of present displays is calculated1, the DPI of non-high clear screen is set as 96, then has fZoom=DPI1/ DPI=DPI1/96。
Preferably, in the step S3, carrying out the process of self-defined scaling setting includes:The application program is preset Have scaling fZoom input frames, by the scaling fZoom input frames key in numerical value and realize scaling from Definition is set.
Preferably, the adjacent of the scaling fZoom input frames is equipped with optimal proportion prompt message.
Preferably, loss of significance repair process has been further included in the step S4:The application program is preset with correction amount S, then it is PixelRound (pixel)=(pixel to repair algorithm>0S:-S).
Preferably, in the step S6, window and control location scaling calculating process include:Set top left co-ordinate point as CPoint (x, y), size are CSize (w, h), and left pixel is x, and upper pixel is y, and scaling uses x ' to represent x after calculating, and is represented with y ' Y, CPoint (x, y) is represented with Point ', represents CSize (w, h) with Size ', then has algorithm:X '=x*fZoom+ PixelRound;Y '=y*fZoom+PixelRound;Point '=(x ', y ');Size '=(w*fZoom+PixelRound, h*fZoom+PixelRound)。
Preferably, in the step S6, window and control word calculating process include:Set Font size is fSize, contracting FSize is represented with fSize ', then have algorithm after putting:FSize '=fSize/ (DPI1/ DPI) * fZoom=fSize*fZoom/ (DPI1/DPI)。
Preferably, in the step S6, window and control picture calculating process include:Picture width is set as w, picture is a height of H, represents w after scaling with w ', represents h with h ', then has algorithm:W '=(w/2*fZoom+PixelRound);H '=(h/2* fZoom+PixelRound)。
It is disclosed by the invention to be based in Windows systematic difference program high-resolution display methods, according to DPI when arranging And DPI conversion scales during using application program are handled to carry out Coordinate Logic conversion and window scaling, then it is rendered directly to true In real screen, not by the excessive of Virtual Space, the window in application program, word and picture is set to be maintained at high-resolution shape State.Meanwhile the present invention is provided with self-defined scaling function, user-defined scaling can be used to replace acquisition system DPI and the scaling calculated, scaling at this time is user-defined, so the effect of interface display is namely by certainly Definition, and then realize imitative high definition screen display effect.
Brief description of the drawings
Fig. 1 is the flow chart of application program high-resolution display methods of the present invention.
Fig. 2 adjusts principle schematic for scaling fZoom.
Fig. 3 is that self-defined scaling sets window sectional drawing in the preferred embodiment of the present invention.
Embodiment
The present invention is described in more detail with reference to the accompanying drawings and examples.
The invention discloses one kind to be based on Windows systematic difference program high-resolution display methods, refer to Fig. 1, its Including having the following steps:
Step S1, starts application program;
Step S2, selects scalable manner:If selecting self-defined scaling, step S3 is performed, if selection is adaptive high Clear screen, then perform step S4;
Step S3, judges whether self-defined scaling fZoomIf so, step S5 is then performed, if it is not, then opening Application program system sets window, carries out self-defined scaling setting, is provided with backed off after random application program, and is back to step Rapid S1;
Step S4, calculates scaling fZoom;
Step S5, application program create window and control;
Step S6, performs window and the calculating of control location scaling, window and control word calculates and window and control picture Calculate;
Step S7, the high definition for completing window and control are shown;
Step S8, exits application program.
In the above method, DPI during according to arrangement and DPI conversion scales during using application program carry out Coordinate Logic Conversion and the processing of window scaling, then be rendered directly in real screen, not by the excessive of Virtual Space, make in application program Window, word and picture be maintained at high-resolution state.Meanwhile the present invention is provided with self-defined scaling function, can be used User-defined scaling replaces acquisition system DPI and the scaling calculated, and scaling at this time is that user makes by oneself Justice, so the effect of interface display is namely by self-defined, and then realize imitative high definition screen display effect.
The technical principle of the method for the present invention refer to Fig. 2, and wherein f is writing a Chinese character in simplified form for fZoom, is set using DPI=96 as at interface Default screen DPI when meter and exploitation, system DPI is obtained when using application program1, the arrangements of all window elements the ratio such as makees Scaling, scaling fZoom=DPI1/DPI;As design window position for [x, y, w, h] (x, y represent upper left point coordinates, w, H represents width and height), as the DPI under high clear screen1When=192, scaling fZoom=DPI1/ DPI=192/96=2, Then the window's position in application program need to accordingly be adjusted to [x*fZoom, y*fZoom, w*fZoom, h*fZoom]=>[x*2,y* 2,w*2,h*2]。
On the calculating of scaling fZoom, in the step S4, calculating the process of scaling fZoom includes:Utilize The DPI of present displays is calculated in GetDeviceCaps functions1, the DPI of non-high clear screen is set as 96, then has fZoom= DPI1/ DPI=DPI1/96。
It refer to Fig. 1 and Fig. 3, in the step S3, carrying out the process of self-defined scaling setting includes:The application Program is preset with scaling fZoom input frames, and scaling is realized by keying in numerical value to the scaling fZoom input frames The self-defined setting of ratio.
Wherein, fZoom can be with User Defined, such as user can be with self-defined scaling fZoom, and in basic principle According to system DPI1Calculate fZoom=DPI1Effect same/DPI, is as shown in Figure 3 fZoom=150%=1.5, also Equivalent to DPI1=144, last fZoom=DPI1/ DPI=144/96=1.5.Prompting text after " self-defined scaling " option In word, optimal proportion is exactly the ratio that current windows systems are set, and changes value herein, afterwards login application program again, New value can come into force.It should be noted that:If choosing " consistent with system scaling (DPI settings) ", for original substantially Computational methods in reason.
Fig. 3 is refer to, in a preferred embodiment, the adjacent of the scaling fZoom input frames is equipped with optimal proportion Prompt message.
Further, loss of significance repair process has been further included in the step S4:The application program is preset with amendment S is measured, then it is PixelRound (pixel)=(pixel to repair algorithm>0S:-S).
As a kind of preferred embodiment, in the step S6, window and control location scaling calculating process include:Set upper left Angular coordinate point is CPoint (x, y), and size is CSize (w, h), and left pixel is x, and upper pixel is y, and scaling is represented after calculating with x ' X, y is represented with y ', and CPoint (x, y) is represented with Point ', represents CSize (w, h) with Size ', then has algorithm:
X '=x*fZoom+PixelRound;
Y '=y*fZoom+PixelRound;
Point '=(x ', y ');
Size '=(w*fZoom+PixelRound, h*fZoom+PixelRound).
In the present embodiment, in the step S6, window and control word calculating process include:Set Font size is FSize, represents fSize with fSize ' after scaling, then has algorithm:
FSize '=fSize/ (DPI1/ DPI) * fZoom=fSize*fZoom/ (DPI1/DPI)。
In the above process, such as No. 10 font fsize=10;(being represented after scaling with fSize '), due to the use of
When " CreateFontIndirect " creates font, according to DPI1Original font size fSize is carried out Scale, i.e. it has been to be multiplied by (DPI that fsize is actual1/ DPI), then when algorithm is changed in the present embodiment, it is necessary to Divided by (DPI the conversion of original system is first taken off, i.e.,1/ DPI) multiplied by with fRoom.
As a kind of preferred embodiment, in the step S6, window and control picture calculating process include:Set picture width as W, a height of h of picture, represent w after scaling with w ', represent h with h ', then have algorithm:
W '=(w/2*fZoom+PixelRound);
H '=(h/2*fZoom+PixelRound).
In theory, to reach optimal visual effect, it is desirable to provide the picture resource under various scalings, it is clear that this It is infeasible in practical application, preferable scheme is to provide two sets of picture resources, and it is 1.0 and 2.0 to correspond to scaling respectively, When scaling is more than 1.0,2.0 high clear screen, and bi-directional scaling picture will be loaded.
It is disclosed by the invention to be based on Windows systematic difference program high-resolution display methods, its by specific algorithm, DPI conversion scales during according to DPI when arranging and using application program are handled to carry out Coordinate Logic conversion and window scaling, It is rendered directly to again in real screen, not by the excessive of Virtual Space, protects window, word and picture in application program Hold high-resolution state.Compared to existing technologies, the present invention can not only the perfect high-definition effect for supporting high clear screen, while also can from Defined parameters adjust interface display size to realize imitative high clear screen, such as scaling quotation font, are imitated with the Reading the Tape for reaching optimal Fruit, greatly improves user experience.
The above is preferred embodiments of the present invention, is not intended to limit the invention, all technology models in the present invention Interior done modification, equivalent substitution or improvement etc. are enclosed, should be included in the range of of the invention protect.

Claims (8)

1. one kind is based on Windows systematic difference program high-resolution display methods, it is characterised in that including having the following steps:
Step S1, starts application program;
Step S2, selects scalable manner:If selecting self-defined scaling, step S3 is performed, if the adaptive high clear screen of selection, Then perform step S4;
Step S3, judges whether self-defined scaling fZoomIf so, step S5 is then performed, if it is not, then opening application Programming system sets window, carries out self-defined scaling setting, is provided with backed off after random application program, and be back to step S1;
Step S4, calculates scaling fZoom;
Step S5, application program create window and control;
Step S6, performs window and control location scaling calculating, window and control word calculates and window and the calculating of control picture;
Step S7, the high definition for completing window and control are shown;
Step S8, exits application program.
2. it is based on Windows systematic difference program high-resolution display methods as claimed in claim 1, it is characterised in that institute State in step S4, calculating the process of scaling fZoom includes:Current display is calculated using GetDeviceCaps functions The DPI of device1, the DPI of non-high clear screen is set as 96, then has fZoom=DPI1/ DPI=DPI1/96。
3. it is based on Windows systematic difference program high-resolution display methods as claimed in claim 1, it is characterised in that institute State in step S3, carrying out the process of self-defined scaling setting includes:It is defeated that the application program is preset with scaling fZoom Enter frame, the self-defined setting of scaling is realized by keying in numerical value to the scaling fZoom input frames.
4. it is based on Windows systematic difference program high-resolution display methods as claimed in claim 3, it is characterised in that institute The adjacent for stating scaling fZoom input frames is equipped with optimal proportion prompt message.
5. it is based on Windows systematic difference program high-resolution display methods as claimed in claim 1, it is characterised in that institute State and loss of significance repair process has been further included in step S4:The application program is preset with correction amount S, then repairs algorithm and be PixelRound (pixel)=(pixel>0S:-S).
6. it is based on Windows systematic difference program high-resolution display methods as claimed in claim 5, it is characterised in that institute State in step S6, window and control location scaling calculating process include:Top left co-ordinate point is set as CPoint (x, y), size For CSize (w, h), left pixel is x, and upper pixel is y, and scaling uses x ' to represent x after calculating, and represents y with y ', is represented with Point ' CPoint (x, y), represents CSize (w, h) with Size ', then has algorithm:
X '=x*fZoom+PixelRound;
Y '=y*fZoom+PixelRound;
Point '=(x ', y ');
Size '=(w*fZoom+PixelRound, h*fZoom+PixelRound).
7. it is based on Windows systematic difference program high-resolution display methods as claimed in claim 5, it is characterised in that institute State in step S6, window and control word calculating process include:Set Font size is fSize, is represented after scaling with fSize ' FSize, then have algorithm:
FSize '=fSize/ (DPI1/ DPI) * fZoom=fSize*fZoom/ (DPI1/DPI)。
8. it is based on Windows systematic difference program high-resolution display methods as claimed in claim 5, it is characterised in that institute State in step S6, window and control picture calculating process include:Picture width is set as w, a height of h of picture, is represented with w ' after scaling W, represents h with h ', then has algorithm:
W '=(w/2*fZoom+PixelRound);
H '=(h/2*fZoom+PixelRound).
CN201711169820.3A 2017-11-22 2017-11-22 One kind is based on Windows systematic difference program high-resolution display methods Pending CN107967162A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711169820.3A CN107967162A (en) 2017-11-22 2017-11-22 One kind is based on Windows systematic difference program high-resolution display methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711169820.3A CN107967162A (en) 2017-11-22 2017-11-22 One kind is based on Windows systematic difference program high-resolution display methods

Publications (1)

Publication Number Publication Date
CN107967162A true CN107967162A (en) 2018-04-27

Family

ID=62001360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711169820.3A Pending CN107967162A (en) 2017-11-22 2017-11-22 One kind is based on Windows systematic difference program high-resolution display methods

Country Status (1)

Country Link
CN (1) CN107967162A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221716A (en) * 2019-05-17 2019-09-10 冯锦荣 System DPI value setting method based on Windows10 system
CN111258467A (en) * 2020-01-07 2020-06-09 腾讯科技(深圳)有限公司 Interface display method and device, computer equipment and storage medium
CN112256368A (en) * 2020-10-19 2021-01-22 四川长虹电器股份有限公司 Method for quickly adapting Android application screen
CN114153359A (en) * 2021-11-17 2022-03-08 麒麟软件有限公司 High-definition zooming method under user-defined window layout

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744595A (en) * 2013-12-30 2014-04-23 广州华多网络科技有限公司 Self-adaption display method and configuration file generating method and device
CN104317968A (en) * 2014-11-18 2015-01-28 苏州科达科技股份有限公司 Page self-adaptive adjusting method and system
CN105760178A (en) * 2016-03-17 2016-07-13 网易(杭州)网络有限公司 Method and device for performing adaption on interface control
CN107301045A (en) * 2017-06-12 2017-10-27 青岛海信电器股份有限公司 Window display method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744595A (en) * 2013-12-30 2014-04-23 广州华多网络科技有限公司 Self-adaption display method and configuration file generating method and device
CN103744595B (en) * 2013-12-30 2017-03-22 广州华多网络科技有限公司 Self-adaption display method and device
CN104317968A (en) * 2014-11-18 2015-01-28 苏州科达科技股份有限公司 Page self-adaptive adjusting method and system
CN105760178A (en) * 2016-03-17 2016-07-13 网易(杭州)网络有限公司 Method and device for performing adaption on interface control
CN107301045A (en) * 2017-06-12 2017-10-27 青岛海信电器股份有限公司 Window display method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
匿名: "关于Windows高DPI的一些简单总结", 《博客园》 *
匿名: "写一个DPI自适应的Win32程序", 《CSDN》 *
微软: "开发可识别DPI的应用程序", 《DOCS.MICROSOFT》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221716A (en) * 2019-05-17 2019-09-10 冯锦荣 System DPI value setting method based on Windows10 system
CN111258467A (en) * 2020-01-07 2020-06-09 腾讯科技(深圳)有限公司 Interface display method and device, computer equipment and storage medium
CN112256368A (en) * 2020-10-19 2021-01-22 四川长虹电器股份有限公司 Method for quickly adapting Android application screen
CN114153359A (en) * 2021-11-17 2022-03-08 麒麟软件有限公司 High-definition zooming method under user-defined window layout

Similar Documents

Publication Publication Date Title
CN107967162A (en) One kind is based on Windows systematic difference program high-resolution display methods
CN103823620B (en) Screen adaption method and device
CN101807299B (en) Image processing for changing predetermined texture characteristic amount of face image
CN102662563B (en) Window resolution self-adaption processing method and device
WO2017016171A1 (en) Window display processing method, apparatus, device and storage medium for terminal device
US11829686B2 (en) 3D model validation and optimization system and method thereof
CN107402734A (en) A kind of method that text definition is automatically adjusted with screen resolution
JP3833212B2 (en) Image processing apparatus, image processing program, and readable recording medium
CN108241505A (en) A kind of page adaptation method and device
CN105468617A (en) Method and device for regulating webpage content color
CN107766038A (en) It is a kind of to carry out the method that profile is cut out and beautified to UI controls based on android system
CN109992188B (en) Method and device for realizing scrolling display of iOS mobile terminal text
CN113313027A (en) Image processing method, image processing device, electronic equipment and storage medium
WO2019055698A1 (en) 3d model validation and optimization system and method thereof
CN102768763A (en) Method and device for outlining characters
CN115705133A (en) Method and device for automatically adapting display screen, electronic equipment and medium
CN103324741B (en) A kind of webpage zoom on electronic equipment and the method and apparatus of alignment
KR101779380B1 (en) System and method for providing vector and bitmap overlay font
CN103324738B (en) A kind of method and apparatus of alignment after webpage zoom on electronic equipment
CN106325956A (en) Application program icon adjusting method and device
CN113986428A (en) Picture correction method and device and electronic equipment
US20080036775A1 (en) Method for generating characters
CN111782158A (en) Method for generating dot matrix font of code spraying equipment and printing equipment
JP3991061B1 (en) Image processing system
CN112445551A (en) Method and device for solving automatic line feed problem of Textview control

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: 20180427

RJ01 Rejection of invention patent application after publication