CN117435284A - Display method, system and storage medium - Google Patents

Display method, system and storage medium Download PDF

Info

Publication number
CN117435284A
CN117435284A CN202311389965.XA CN202311389965A CN117435284A CN 117435284 A CN117435284 A CN 117435284A CN 202311389965 A CN202311389965 A CN 202311389965A CN 117435284 A CN117435284 A CN 117435284A
Authority
CN
China
Prior art keywords
pixels
physical
display
logical
actual size
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
CN202311389965.XA
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.)
Fangzhu Wuhan Technology Co ltd
Original Assignee
Fangzhu Wuhan 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 Fangzhu Wuhan Technology Co ltd filed Critical Fangzhu Wuhan Technology Co ltd
Priority to CN202311389965.XA priority Critical patent/CN117435284A/en
Publication of CN117435284A publication Critical patent/CN117435284A/en
Pending legal-status Critical Current

Links

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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention provides a display method, a system and a storage medium, wherein the method comprises the following steps: drawing straight line segments on a display screen according to the specified physical pixel number based on the SDK function provided by the operating system; measuring the length of the straight line segment based on a measuring tool with scales; calculating an actual size value represented by a physical pixel on the display screen according to the specified pixel number and the measured straight line segment length; calculating the mapping relation between the logical pixels and the physical pixels; and mapping the logical pixels to the physical pixels based on the mapping relation, and drawing the content to be displayed on the display screen. The traditional SDK function provided by the operation system is used for acquiring the actual size value represented by the physical pixel of the display, which is affected by a plurality of factors to cause inaccuracy.

Description

Display method, system and storage medium
Technical Field
The invention relates to the field of man-machine interaction of computer desktop design and processing software, in particular to a display method, a display system and a storage medium.
Background
Since the computer enters the graphical operating system, the computer becomes the standard of design and processing software, and visual interaction operation brings great visual intuitiveness and convenient operation for a user, and also causes more originality and reduces operation errors.
Among such software, there is a software requiring a relatively high display accuracy, and the design result of such design software is often used for manufacturing of final objects, such as machine parts design software, word processing software, packaging design software, typesetting software, etc., and such software is intended for users (designers) to pursue the accuracy of the display size on the screen, that is, when displayed in 100% mode, displaying one A4 sheet on the screen, that is, the true A4 sheet size. The size of 2CM displayed on the screen is the actual size of 2CM, and when displayed in 200% zoom-in mode, 4CM displayed on the screen is the actual size of 2CM, and when displayed in 50% zoom-out mode, 1CM displayed on the screen is the actual size of 2CM.
If there is a significant error in the size of the screen display content object, in addition to the reduced intuitiveness, if the error ratio of the display width and the height (X-axis and Y-axis) is not uniform, it may also cause a distortion of the graphic, such as a circle displayed as an ellipse and a square displayed as a rectangle, causing intuitive trouble to the designer.
In practical applications, the accuracy of such display of software mainly depends on the accuracy of the SDK function provided by the operating system to obtain data, while the accuracy of the data provided by the operating system mainly depends on the accuracy of the production and processing of the display manufacturer and the matching degree between the provided device driving information and the actual product, so that the inaccuracy of the data of the actual size represented by one physical pixel obtained by the SDK function provided by the operating system may result in the inaccuracy of the size of the content finally displayed.
Disclosure of Invention
The invention provides a display method, a display system and a storage medium aiming at the technical problems existing in the prior art.
According to a first aspect of the present invention, there is provided a display method comprising:
step 1, drawing horizontal and vertical straight line segments on a display screen according to the specified physical pixel number based on an SDK function provided by an operating system for each display in a software and hardware state;
step 2, measuring the length of the straight line segment based on a measuring tool with scales;
step 3, calculating an actual size value represented by a physical pixel on the display screen according to the number of the specified pixels and the length of the measured straight line segment;
step 4, calculating the mapping relation between the logical pixels and the physical pixels based on the actual size value represented by the logical pixels defined in the software and the calculated actual size value represented by the physical pixels;
step 5, when the display is needed, calculating the corresponding logical pixel number according to the actual size of the content to be displayed and the actual size value represented by the logical pixel defined in the software;
and 6, mapping the logical pixels to the physical pixels according to the number of the logical pixels and the mapping relation between the logical pixels and the physical pixels, and drawing and displaying on a display screen based on the physical pixels.
On the basis of the technical scheme, the invention can also make the following improvements.
Optionally, the drawing, based on the SDK function provided by the operating system, a straight line segment on the display screen with a specified number of physical pixels includes:
setting a specified physical pixel number in a horizontal direction and a physical pixel number in a vertical direction respectively;
drawing a horizontal straight line segment based on an SDK function provided by an operating system according to the physical pixel number in the horizontal direction;
and drawing a vertical straight line segment based on the SDK function provided by the operating system according to the physical pixel number in the vertical direction.
Optionally, the measuring the length of the straight line segment based on the measuring tool includes:
the length of the horizontal straight line segment and the length of the vertical straight line segment are respectively measured based on a measuring tool with scales.
Optionally, the calculating the mapping relationship between the logical pixel and the physical pixel based on the actual size value represented by the logical pixel defined in the software and the calculated actual size value represented by the physical pixel includes:
calculating the actual size represented by one physical pixel in the horizontal direction and the actual size represented by one physical pixel in the vertical direction according to the designated physical pixel number, the measured length of the horizontal straight line segment and the measured length of the vertical straight line segment;
a first mapping relation between logical pixels and physical pixels in the horizontal direction is calculated based on the size value represented by the logical pixels in the horizontal direction defined inside the software and the calculated actual size represented by one physical pixel in the horizontal direction, and a second mapping relation between logical pixels and physical pixels in the vertical direction is calculated based on the size value represented by the logical pixels in the vertical direction defined inside the software and the calculated actual size represented by one physical pixel in the vertical direction.
Optionally, the calculating the corresponding logical pixel number according to the actual size of the content to be displayed and the actual size value represented by the logical pixel defined in the software includes:
calculating the number of logic pixels in the horizontal direction according to the width size of the content to be displayed and the actual size value represented by the logic pixels in the horizontal direction defined by the software;
the number of logical pixels in the vertical direction is calculated based on the height dimension of the content to be displayed and the actual dimension value represented by the logical pixels in the vertical direction defined inside the software.
Optionally, the method further comprises:
repeating the steps 1 to 3 for a plurality of times, and calculating the actual size value represented by the physical pixels for a plurality of times;
and calculating the average value of the actual size values represented by the physical pixels for a plurality of times, and taking the average value as the actual size value represented by one physical pixel on the display screen.
Optionally, the method further comprises:
when the state of the software and hardware of the display is changed, the steps 1 to 6 need to be re-executed, wherein the change of the state of the software and hardware of the display comprises changing the display, changing the display resolution, switching the master-slave position of the display, adjusting the aspect ratio of the display or changing the window mode of the remote desktop.
Optionally, the step 1 of drawing a straight line segment on the display screen with a specified number of physical pixels includes:
inputting the appointed physical pixel number on a physical pixel input interface, and drawing a straight line segment on a display screen, wherein the physical pixel input interface supports mouse wheel rolling to modify the appointed physical pixel number in real time;
the specified number of physical pixels is modified by the mouse wheel scrolling such that the length of the straight line segment measured by the measurement tool is at the tick mark in order to accurately read the length of the straight line segment.
According to a second aspect of the present invention, there is provided a display system comprising:
the drawing module is used for drawing straight line segments on the display screen according to the specified physical pixel number based on the SDK function provided by the operating system for each display in the software and hardware states;
a measuring module for measuring the length of the straight line segment based on a measuring tool with scales;
the first calculation module is used for calculating an actual size value represented by one physical pixel on the display screen according to the specified pixel number and the measured length of the straight line segment;
the second calculation module is used for calculating the mapping relation between the logical pixels and the physical pixels based on the actual size value represented by the logical pixels defined in the software and the calculated actual size value represented by the physical pixels;
the third calculation module is used for calculating the corresponding logical pixel number according to the actual size of the content to be displayed and the actual size value represented by the logical pixel defined in the software when the content to be displayed is required to be displayed;
and the display module is used for mapping the logical pixels to the physical pixels according to the number of the logical pixels and the mapping relation between the logical pixels and the physical pixels, and displaying on a display screen based on the physical pixels.
According to a third aspect of the present invention, there is provided a computer-readable storage medium having stored thereon a computer management class program which, when executed by a processor, implements the steps of a display method.
According to the display method, the display system and the storage medium, the actual size value represented by the physical pixel of the display is obtained based on the SDK function provided by the operating system, and is affected by a plurality of factors to cause inaccuracy.
Drawings
FIG. 1 is a flow chart of a display method provided by the invention;
FIG. 2 is a schematic diagram showing the overall flow of the method;
FIG. 3 is a schematic diagram of a display system according to the present invention;
fig. 4 is a schematic hardware structure of a possible computer readable storage medium according to the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. In addition, the technical features of each embodiment or the single embodiment provided by the invention can be combined with each other at will to form a feasible technical scheme, and the combination is not limited by the sequence of steps and/or the structural composition mode, but is necessarily based on the fact that a person of ordinary skill in the art can realize the combination, and when the technical scheme is contradictory or can not realize, the combination of the technical scheme is not considered to exist and is not within the protection scope of the invention claimed.
In the display field of a display, the accuracy of display content depends on the accuracy of the actual size represented by one physical pixel on the display, at present, data is mainly obtained through an SDK function provided by an operating system, mainly the size of a displayable area of the display screen and the resolution of the display are obtained through the SDK function, and the actual size represented by one physical pixel on the display screen can be calculated according to the size of the displayable area of the display screen and the resolution of the display. The size of the displayable area of the display screen provided by the operating system mainly depends on the precision of the production and processing of the display manufacturer and the matching degree of the provided device driving information and the actual product, and the accuracy of the high-end product of the famous manufacturer is higher, and the common product is worse.
Even in high-end products, when the display area of the display is manually adjusted due to the fact that non-standard resolution display, extended screen display, remote desktop mode use and the like are adopted in actual application, the situation that data acquired by the SDK function of the system is inconsistent with actual data often occurs, and therefore display accuracy is reduced.
And for the common display, as the common display manufacturer does not generally provide special equipment drive, and the system uses universal compatible drive, the matching degree of the display information acquired by the system and the actual product is lower, and the display accuracy is lower. Also, when such a display is used as an extended screen display or in a remote desktop mode, the data acquired by the system SDK does not match the actual data, and the display accuracy is low.
Currently, in order to achieve that the display size is substantially close to the actual size on the display, software is usually implemented by the following method:
the displays commonly used are grid displays (whether older CRT displays or currently mainstream liquid crystal displays) which are displayed by means of point light emission on the screen, which light emission points are arranged in a matrix form constituting the whole screen display. Each light emitting point on the screen is a physical pixel. The number of light emitting points in the horizontal and vertical directions constitutes the display size in this direction. The size of the software display, no matter how many conversions the middle needs to undergo, eventually falls to the number of physical pixels on the screen, so it is critical to solve the problem to obtain the actual size represented by one physical pixel. In the current general method, the current display resolution of the display card can be obtained through the SDK function provided by the system, that is, the number of the displayed physical image number (the wide-high matrix, the number can be the number of physical light spots on the non-actual screen, but is just the set value of the display card) set by the current system, and the display area size of the display can also be obtained through the SDK function, and the size of the screen corresponding to the physical pixel of one system can be obtained by dividing the two.
However, due to manufacturing accuracy issues of the display manufacturer, matching issues of the display driver providing information, and adjustability of the display itself (e.g., adjustable aspect ratio, adjustable display area position and size, etc.), and the use of remote desktop, etc., factors affect the size of the system acquisition and the actual display area size, and it is this difference that determines the size of the single physical pixel decision calculated by this method, which results in inaccurate software display depending on this value.
Based on this, the present invention provides a display method, which can calibrate the value of the actual size represented by one physical pixel obtained by the SDK, so that the size of the content object can be accurately displayed by software according to the calibrated data, that is, when the content object is displayed in 100% mode, the length of 1cm of the content displayed on the screen is the actual length of 1cm, and the content object is obtained by achieving the actual visibility, so that the user (designer) of the software can visually have an accurate visual feeling.
As shown in fig. 1 and fig. 2, the display method includes:
step 1, drawing horizontal and vertical straight line segments on a display screen according to specified physical pixel numbers based on SDK functions provided by an operating system for the display in each software and hardware state.
It will be appreciated that the actual size represented by a physical pixel is also different for displays in different hardware and software states, and therefore, for displays in different hardware and software states, it is necessary to obtain the actual display size value represented by a physical pixel.
In the invention, the number of physical pixels can be specified, and straight line segments of the specified number of physical pixels can be drawn on the display screen based on the SDK function provided by the operating system.
Wherein the actual display size value represented by one physical pixel of the display includes an actual display size represented by one physical pixel in a horizontal direction and an actual display size represented by one pixel in a vertical direction. Therefore, when drawing straight line segments on the display screen, the specified physical pixel number in the horizontal direction and the physical pixel number in the vertical direction are set respectively; drawing a horizontal straight line segment based on an SDK function provided by an operating system according to the physical pixel number in the horizontal direction; and drawing a vertical straight line segment based on the SDK function provided by the operating system according to the physical pixel number in the vertical direction.
It will be appreciated that using the SDK function provided by the operating system, two straight line segments of specified physical pixel values, one horizontal and one vertical, are drawn on the display screen in the environment in which the software is to be run. The assigned physical pixel values may be measured and calculated using values that are relatively easy to measure and calculate at the resolution of the currently prevailing display, such as 500, and may be different horizontally and vertically. The specific physical pixel values may be either predefined or entered by the user on the interface.
And 2, measuring the length of the straight line segment based on a measuring tool with scales.
It will be appreciated that after drawing two horizontal and vertical straight line segments, the user directly measures the length of the drawn straight line segment on the screen using a measuring tool such as a graduated ruler, the horizontal and vertical straight line segments are measured separately, the length of the horizontal straight line segment and the length of the vertical straight line segment are measured, and the measured values are entered on the interface (the measured values may be kept in 1 decimal in millimeters with respect to the accuracy of the usual measuring tool).
It should be noted that, the length of the straight line displayed on the measuring tool is preferably not more than the disposable range of the measuring tool by the user, so that the user is supported to input the physical pixel value at the interface, and the user can adjust the input physical pixel value to the extent of being convenient for measurement according to the length of the straight line segment by visual inspection.
The physical pixel number input interface can be adjusted to support the real-time modification of the scrolling of the mouse wheel due to the fact that visual reading errors are easy to generate when the common graduated scale is used for measurement, and the straight line segment drawn on the screen in a physical pixel mode is updated in real time along with the change of the input numerical value until the length of the straight line segment is accurately matched with an integer graduated line (such as 10CM,14CM and 18 CM) of the graduated scale, at the moment, the size value of the graduated scale is input, and the physical pixel value of the interface is formed into a group of paired calculation data.
And 3, calculating the actual size value represented by one physical pixel on the display screen according to the designated pixel number and the measured length of the straight line segment.
It is understood that the actual size represented by 1 physical pixel is calculated from the physical pixel value and the measured size value and recorded. Wherein, according to the specified physical pixel number, the measured length of the horizontal straight line segment and the measured length of the vertical straight line segment, the actual size represented by one physical pixel in the horizontal direction and the actual size represented by one physical pixel in the vertical direction are calculated respectively.
It should be noted that, in order to ensure the accuracy of the calculated actual display size represented by one physical pixel, the steps 1 to 3 should be repeated multiple times, and the actual size value represented by the physical pixel multiple times should be calculated; and calculating the average value of the actual size values represented by the physical pixels for a plurality of times, and taking the average value as the actual size value represented by one physical pixel on the display screen.
And 4, calculating the mapping relation between the logical pixels and the physical pixels based on the actual size value represented by the logical pixels defined in the software and the calculated actual size value represented by the physical pixels.
It will be appreciated that desktop processing software, when it comes to calculating and displaying the size of a content object, typically uses two values, LP and DP, where LP is intended to be a logical pixel, and may be generally considered as a basic unit for internal operations of the software, i.e., a logical unit. DP is intended to mean a physical pixel, which is a pixel in the resolution of the display card, and a physical light point on the display when the display is used at the optimal resolution. The logic pixels are used in the software, and the physical pixels are used for displaying when the actual display is performed on the display screen, so that the mapping relation between the logic pixels and the physical pixels needs to be calculated when the display is realized, and the logic pixels defined in the software are mapped to the physical pixels for displaying.
Since different displays have different physical pixel resolutions, such as 640 x 480, 800 x 600, 1024 x 768, 1920 x 1080, 2048 x 1080,4096 x 2160, etc., the different displays have different display area sizes and different numbers of physical pixels, and even though the same display is used, the operating system can be set to different resolutions by setting the display card.
Since the displays are different in size and different in resolution, in order to make the display sizes of the same content of the same software not too different on different displays, the correspondence between the logical pixels and the physical pixels needs to be calculated and set, for example, when the display uses 640 x 480 resolution, 10 logical pixels are set to correspond to 1 physical pixel, and when the display uses 1280 x 960 resolution, 5 logical pixels may need to correspond to 1 physical pixel, so that the same content object can look almost the same.
The software is converted by comparing the actual length represented by 1 logical pixel with the actual length represented by 1 physical pixel in the actual setting. For example, the basic unit 1 logical pixel used by the software internal calculation represents 0.01mm, and the 1 physical pixel of the graphics card represents 0.3mm, then the correlation can be set by mapping 30 logical pixels to 1 physical pixel. The resolution of different displays is different, and the size represented by each physical pixel is different, but after the operation mapping, the content measured by the same internal unit can be displayed on different displays to be the same size.
Based on the above mapping principle of logical pixels and physical pixels, the accuracy of the drawing is guaranteed, and most importantly, what the actual size represented by the obtained 1 physical pixel is. The current general method is to use the SDK function provided by the operating system to obtain the corresponding value, for example, windows system, using GetDeviceCaps (HORZRES) to obtain the number of physical pixels in the width direction currently set by the display card, using GetDeviceCaps (HORZSIZE) to obtain the size in millimeters of the display area in the width direction of the display, and dividing the two to obtain the size value on the display corresponding to one physical pixel.
However, in the foregoing situations, such as setting the display card to a non-standard resolution, manufacturing the display with insufficient precision, using a non-standard aspect ratio for the display, not providing a special device driver for the display manufacturer, manually adjusting the position size of the display area of the display, and accessing the display using various remote desktop software, the display size obtained by the system function is different from the actual display area size, thereby causing errors in calculating the actual size represented by 1 physical pixel, and also causing mapping errors between the logical pixel and the physical pixel, and finally causing errors in drawing the size on the screen by software.
It will be appreciated that the above step 3 calculates the actual display size represented by one physical pixel in the horizontal direction and the actual display size represented by one physical pixel in the vertical direction. And recording the calculation result into a configuration file to be used as a display calculation reference in the current software and hardware operation environment. When the application software is initialized, the numerical value in the configuration file is read and used as a reference value of the display hardware environment, and the size value represented by a self-defined internal logic unit (logic pixel) is compared with the numerical value to determine the mapping relation between the logic pixel and the physical pixel.
In calculating the mapping relationship between logical pixels and physical pixels, it is necessary to calculate the mapping relationship between logical pixels and physical pixels in the horizontal direction and the mapping relationship between logical pixels and physical pixels in the vertical direction. For example, if one logical pixel represents an actual size of 0.01mm and one physical pixel represents a time size of 0.3mm, then 30 logical pixels can be mapped to 1 physical pixel, and a mapping relationship between the logical pixels and the physical pixels is obtained.
Specifically, a first mapping relationship of logical pixels and physical pixels in the horizontal direction is calculated based on a size value represented by logical pixels in the horizontal direction defined inside the software and the calculated actual size represented by one physical pixel in the horizontal direction, and a second mapping relationship of logical pixels and physical pixels in the vertical direction is calculated based on a size value represented by logical pixels in the vertical direction defined inside the software and the calculated actual size represented by one physical pixel in the vertical direction.
And 5, when the display is needed, calculating the corresponding logical pixel number according to the actual size of the content to be displayed and the actual size value represented by the logical pixel defined in the software.
It is understood that the number of logical pixels in the horizontal direction is calculated based on the width size of the content to be displayed and the actual size value represented by the logical pixels in the horizontal direction defined inside the software; the number of logical pixels in the vertical direction is calculated based on the height dimension of the content to be displayed and the actual dimension value represented by the logical pixels in the vertical direction defined inside the software.
Specifically, for example, the width of the content to be displayed is 100mm, the height is 200mm, and the actual size value represented by one logical pixel is 0.1mm, so that 1000 logical pixels are required when the content to be displayed is required to be displayed, and 2000 logical pixels are required in the vertical direction.
And step 6, mapping the logical pixels to the physical pixels according to the number of the logical pixels and the mapping relation between the logical pixels and the physical pixels, and displaying on a display screen based on the physical pixels.
It is to be understood that step 5 calculates the number of logical pixels in the horizontal direction and the number of logical pixels in the vertical direction, maps the logical pixels in the horizontal direction to the physical pixels in the horizontal direction, and similarly maps the logical pixels in the vertical direction to the physical pixels in the vertical direction, based on the first mapping relationship and the second mapping relationship calculated in step 4. The content to be displayed is drawn on the display screen based on the physical pixels in the horizontal direction and the physical pixels in the vertical direction.
It should be noted that, when the software and hardware state of the display changes, steps 1 to 6 need to be re-executed, where the change of the software and hardware state of the display includes changing the display, changing the display resolution, switching the master-slave position of the display, adjusting the aspect ratio of the display, or changing the window mode of the remote desktop.
Specifically, this value can be used continuously when the software and hardware use conditions are unchanged. If the software and hardware usage conditions change, such as changing the display, changing the display resolution, switching the master-slave position of the display, adjusting the aspect ratio of the display, changing the window mode of the remote desktop, and the like, recalibration is required.
Referring to fig. 3, there is provided a display system of the present invention, the system comprising a drawing module 301, a measuring module 302, a first calculating module 303, a second calculating module 304, a third calculating module 305 and a display module 306, wherein:
a drawing module 301, configured to draw, for each display in a software and hardware state, a straight line segment on the display screen with a specified number of physical pixels based on an SDK function provided by the operating system;
a measuring module 302 for measuring the length of the straight line segment based on a measuring tool with graduations;
a first calculation module 303, configured to calculate an actual size value represented by one physical pixel on the display screen according to the specified pixel number and the measured length of the straight line segment;
the second calculating module 304 is configured to calculate a mapping relationship between the logical pixel and the physical pixel based on the actual size value represented by the logical pixel defined in the software and the calculated actual size value represented by the physical pixel;
the third calculation module 305 is configured to calculate, when display is required, a corresponding number of logical pixels according to an actual size of the content to be displayed and an actual size value represented by the logical pixels defined in the software;
and the display module 306 is used for mapping the logical pixels to the physical pixels according to the logical pixel number and the mapping relation between the logical pixels and the physical pixels, and drawing and displaying on a display screen based on the physical pixels.
It can be understood that, in the display system provided by the present invention, corresponding to the display method provided in the foregoing embodiments, relevant technical features of the display system may refer to relevant technical features of the display method, which are not described herein again.
Referring to fig. 4, fig. 4 is a schematic diagram of an embodiment of a computer readable storage medium according to the present invention. As shown in fig. 4, the present embodiment provides a computer-readable storage medium 400 on which a computer program 411 is stored, which computer program 411, when executed by a processor, implements the steps of a display method.
The display method, the display system and the storage medium provided by the embodiment of the invention are mainly applied to the field of man-machine interaction of computer desktop design and processing software, and mainly ensure that the software can accurately display the actual size of the content under various use scenes (including being used as a main display, being used as an extension display, being used as a non-standard resolution, being used as a non-standard aspect ratio, being used as a remote desktop mode and the like) by a common computer display (including an old CRT (cathode ray tube) display and a current mainstream LCD) under the limitation of common desktop computer hardware conditions, so that a user of the software can obtain more visual experience.
The invention uses the SDK function provided by the operating system to draw the straight line segment of the appointed physical pixel number on the display in a direct physical pixel drawing mode, wherein the straight line segment comprises a horizontal line segment and a vertical line segment, and a user is required to directly measure the length of the straight line segment on a screen by using measuring tools such as a graduated scale and the like and input a numerical value. According to the number of physical pixels used for drawing and the length size recorded by a customer, calculating the actual size corresponding to 1 physical pixel in the environment, based on the calculated actual size corresponding to 1 physical pixel, based on the assumed size of an internal logic unit, calculating the mapping corresponding relation between the internal logic unit and the physical pixel, based on the corresponding relation, the object size measured by the internal logic unit is drawn by the physical pixel on a display, namely, the screen display consistent with the actual size is obtained, and the method has the following advantages:
(1) The method has wide application range, can ensure that the real size of the content object can be accurately displayed on the screen after being calibrated by the method of the invention, and can truly realize the effect of obtaining the content object after being calibrated by the method of the invention, wherein the real size of the content object can be accurately displayed on the screen no matter the professional display or the common display, the main display or the extended display, the display card adopts the standard resolution or the non-standard resolution, the display card adopts the standard aspect ratio or the non-standard aspect ratio, the display area position and the display size are manually adjusted no matter whether the display is used or not, and the display area position and the display area size are used in a local or remote desktop mode
(2) The method related by the scheme is simple to operate, low in cost, free of additional hardware and good in effect.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and for those portions of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. A display method, comprising:
step 1, drawing horizontal and vertical straight line segments on a display screen according to the specified physical pixel number based on an SDK function provided by an operating system for each display in a software and hardware state;
step 2, measuring the length of the straight line segment based on a measuring tool with scales;
step 3, calculating an actual size value represented by a physical pixel on the display screen according to the number of the specified pixels and the length of the measured straight line segment;
step 4, calculating the mapping relation between the logical pixels and the physical pixels based on the actual size value represented by the logical pixels defined in the software and the calculated actual size value represented by the physical pixels;
step 5, when the display is needed, calculating the corresponding logical pixel number according to the actual size of the content to be displayed and the actual size value represented by the logical pixel defined in the software;
and 6, mapping the logical pixels to the physical pixels according to the number of the logical pixels and the mapping relation between the logical pixels and the physical pixels, and drawing and displaying on a display screen based on the physical pixels.
2. The display method according to claim 1, wherein drawing a straight line segment on the display screen with a specified number of physical pixels based on the SDK function provided by the operating system, comprises:
setting a specified physical pixel number in a horizontal direction and a physical pixel number in a vertical direction respectively;
drawing a horizontal straight line segment based on an SDK function provided by an operating system according to the physical pixel number in the horizontal direction;
and drawing a vertical straight line segment based on the SDK function provided by the operating system according to the physical pixel number in the vertical direction.
3. The display method according to claim 2, wherein the measuring the length of the straight line segment based on the measuring tool includes:
the length of the horizontal straight line segment and the length of the vertical straight line segment are respectively measured based on a measuring tool with scales.
4. A display method according to claim 3, wherein calculating the mapping relationship between logical pixels and physical pixels based on the actual size value represented by the logical pixels defined in the software and the calculated actual size value represented by the physical pixels comprises:
calculating the actual size represented by one physical pixel in the horizontal direction and the actual size represented by one physical pixel in the vertical direction according to the designated physical pixel number, the measured length of the horizontal straight line segment and the measured length of the vertical straight line segment;
a first mapping relation between logical pixels and physical pixels in the horizontal direction is calculated based on the size value represented by the logical pixels in the horizontal direction defined inside the software and the calculated actual size represented by one physical pixel in the horizontal direction, and a second mapping relation between logical pixels and physical pixels in the vertical direction is calculated based on the size value represented by the logical pixels in the vertical direction defined inside the software and the calculated actual size represented by one physical pixel in the vertical direction.
5. The display method according to claim 4, wherein calculating the corresponding logical pixel number based on the actual size of the content to be displayed and the actual size value represented by the logical pixel defined in the software comprises:
calculating the number of logic pixels in the horizontal direction according to the width size of the content to be displayed and the actual size value represented by the logic pixels in the horizontal direction defined by the software;
the number of logical pixels in the vertical direction is calculated based on the height dimension of the content to be displayed and the actual dimension value represented by the logical pixels in the vertical direction defined inside the software.
6. The display method according to claim 1, characterized by further comprising:
repeating the steps 1 to 3 for a plurality of times, and calculating the actual size value represented by the physical pixels for a plurality of times;
and calculating the average value of the actual size values represented by the physical pixels for a plurality of times, and taking the average value as the actual size value represented by one physical pixel on the display screen.
7. The display method according to claim 1, characterized by further comprising:
when the state of the software and hardware of the display is changed, the steps 1 to 6 need to be re-executed, wherein the change of the state of the software and hardware of the display comprises changing the display, changing the display resolution, switching the master-slave position of the display, adjusting the aspect ratio of the display or changing the window mode of the remote desktop.
8. The display method according to claim 1, wherein the step 1 of drawing a straight line segment on the display screen with a specified number of physical pixels includes:
inputting the appointed physical pixel number on a physical pixel input interface, and drawing a straight line segment on a display screen, wherein the physical pixel input interface supports mouse wheel rolling to modify the appointed physical pixel number in real time;
the specified number of physical pixels is modified by the mouse wheel scrolling such that the length of the straight line segment measured by the measurement tool is at the tick mark in order to accurately read the length of the straight line segment.
9. A display system, comprising:
the drawing module is used for drawing straight line segments on the display screen according to the specified physical pixel number based on the SDK function provided by the operating system for each display in the software and hardware states;
a measuring module for measuring the length of the straight line segment based on a measuring tool with scales;
the first calculation module is used for calculating an actual size value represented by one physical pixel on the display screen according to the specified pixel number and the measured length of the straight line segment;
the second calculation module is used for calculating the mapping relation between the logical pixels and the physical pixels based on the actual size value represented by the logical pixels defined in the software and the calculated actual size value represented by the physical pixels;
the third calculation module is used for calculating the corresponding logical pixel number according to the actual size of the content to be displayed and the actual size value represented by the logical pixel defined in the software when the content to be displayed is required to be displayed;
and the display module is used for mapping the logical pixels to the physical pixels according to the number of the logical pixels and the mapping relation between the logical pixels and the physical pixels, and drawing and displaying on a display screen based on the physical pixels.
10. A computer-readable storage medium, on which a computer-management-class program is stored, which, when executed by a processor, implements the steps of the display method according to any one of claims 1-8.
CN202311389965.XA 2023-10-24 2023-10-24 Display method, system and storage medium Pending CN117435284A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311389965.XA CN117435284A (en) 2023-10-24 2023-10-24 Display method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311389965.XA CN117435284A (en) 2023-10-24 2023-10-24 Display method, system and storage medium

Publications (1)

Publication Number Publication Date
CN117435284A true CN117435284A (en) 2024-01-23

Family

ID=89545606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311389965.XA Pending CN117435284A (en) 2023-10-24 2023-10-24 Display method, system and storage medium

Country Status (1)

Country Link
CN (1) CN117435284A (en)

Similar Documents

Publication Publication Date Title
US10054417B2 (en) Multiple display electronic caliper
US10600216B2 (en) Automatic data visualization system
US20060008779A1 (en) Computer method for controlling a display, and graphical tools for on-screen analysis
CN101354621A (en) Method and apparatus for determining touch screen calibration parameter
CN101751174B (en) Writing pen obliquity correcting method
US20130251195A1 (en) Electronic device and method for measuring point cloud of object
CN103646411A (en) Chart analysis system and method
US20140218409A1 (en) Terminal device and drawing display program for terminal device
CN101089678A (en) Detection device for flat display picture and detection method thereof
US20110025717A1 (en) Graphical interface with data presence indicators
CN107030527B (en) Remote display device for metering in personal area network
CN111352630B (en) Measuring program compiling device and measuring program compiling method
JP5392794B2 (en) Measuring device and measuring program
CN117435284A (en) Display method, system and storage medium
US9478052B2 (en) Visualization method and system based on quartile graph display data
CN101866242B (en) Method for correcting coordinates of electronic panel displaying, touching and positioning system
CN112148139B (en) Gesture recognition method and computer readable storage medium
CN112116678A (en) Irregular virtual pointer display method for liquid crystal instrument and liquid crystal instrument
CN111681277A (en) Method and device for measuring geometric attributes in image, electronic equipment and storage medium
US20130096709A1 (en) Computing device and method for generating engineering tolerances of a manufactured object
WO2021167604A1 (en) Display rendering of nonlinearly scaled 3d parts
JP5746651B2 (en) Numerical calculation device
WO2023002639A1 (en) Cad drawing method for auto meshing of finite element method model
CN106445316A (en) Screen menu display method and device
Saini et al. GUI for Coordinate Measurement of an Image for the Estimation of Geometric Distortion of an Opto-electronic 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