a is a screenshot of a web browser application displaying a typical web page that contains a graphical image.
b is a screenshot of a web browser application displaying a typical web page and showing a magnified version of the graphical image shown in
a is a screenshot of a word processing application displaying a typical dialog box window.
b is a screenshot of a word processing application displaying a magnified version of the dialog box shown in
Embodiments of the invention provide a system and method for selectively displaying a portion of a display screen. Many specific details of certain embodiments of the invention are set forth in the following description and in
The computer system 100 includes a processor 104 coupled to a host memory 108 through a memory/bus interface 112. The memory/bus interface 112 is coupled to an expansion bus 116, such as an industry standard architecture (ISA) bus or a peripheral component interconnect (PCI) bus. The computer system 100 also includes one or more input devices 120, such as a keypad, a mouse or a handheld stylus, coupled to the processor 104 through the expansion bus 116 and the memory/bus interface 112. The input devices 120 allow an operator or an electronic device to input data to the computer system 100. One or more output devices 120 are coupled to the processor 104 to provide output data generated by the processor 104. The output devices 124 are coupled to the processor 104 through the expansion bus 116 and memory/bus interface 112. Examples of output devices 124 include printers and a sound card driving audio speakers. One or more data storage devices 128 are coupled to the processor 104 through the memory/bus interface 112 and the expansion bus 116 to store data in, or retrieve data from, storage media (not shown). Examples of storage devices 128 and storage media include fixed disk drives, floppy disk drives, tape cassettes and compact-disc read-only memory drives.
The computer system 100 further includes a graphics processing system 132 coupled to the processor 104 through the expansion bus 116 and memory/bus interface 112. Optionally, the graphics processing system 132 may be coupled to the processor 104 and the host memory 108 through other types of architectures. For example, the graphics processing system 132 may be coupled through the memory/bus interface 112 and a high speed bus 136, such as an accelerated graphics port (AGP), to provide the graphics processing system 132 with direct memory access (DMA) to the host memory 108. That is, the high-speed bus 136 and memory bus interface 112 allow the graphics processing system 132 to read and write host memory 108 without the intervention of the processor 104. Thus, data may be transferred to, and from, the host memory 108 at transfer rates much greater than over the expansion bus 116. A display 140 is coupled to the graphics processing system 132 to display graphics images. The display 140 may be any type of display, such as a cathode ray tube (CRT), a field emission display (FED), a liquid crystal display (LCD) and touchscreen variants of these, or the like, which are commonly used for desktop computers, portable computers, and workstation or server applications.
Although described in terms of a key or keys being pressed, magnification might also commence when the user presses one of certain configurable buttons on a modem mouse. In the case of a touchscreen, magnification could likewise be initiated through a pre-defined set of screen taps or other input mechanisms. For the purposes of
After the magnification key is pressed at 204, an embodiment of the invention then determines a display context. A display context is a rectangular portion of the display the user wishes to magnify and includes information about the graphical content of the region beneath the pointer as well as the location of the pointer within the display region. However, a portion of the display having a different shape, such as a circle, may also be used for the display context. The region beneath the pointer could contain, for example, purely graphical content such as graphic images, or it might contain a dialog box or other window that the user needs for interacting with an application. The determination of the display context will be explained in greater detail in the description of
The display context is determined by first testing whether the pointer is over a dialog box at 208. A dialog box is a special type of window that is not allowed to be resized by the user. In some cases, it is important to disallow such resizing because controls or important information within the dialog box might become hidden if the dialog box is resized inappropriately. When the pointer is over a dialog box, the display context is determined to be the dialog box beneath the pointer and its location. Program flow then continues onto 220 to prepare to magnify the dialog box window. If the pointer is not over a dialog box, one further check is made at 212 to determine if the pointer is over a graphic item. This ordering of tests at 208 and 212 ensures that the magnification routine never magnifies a graphic item within a dialog box. A graphic item may be any type of graphical image, such as JPEG, GIF, TIFF, BMP, PCX, PCD, PICT, PNG, TGA, ICO, or the like, which are commonly used digital image types and as may be displayed by computers or computing devices. A graphic item can also be a dynamic item, such as a chart in a spreadsheet. The zoom utility uses the Microsoft Accessibility APIs to determine the role an item plays in the user interface. If the pointer is determined at 212 to be over a graphic item, the display context is determined to be the graphic item itself and its location as selected by the pointer, and program execution continues to 216. If it is determined at 212 to not be over a graphic item, then the display context is determined to be the application window beneath the pointer, and its location as selected by the pointer. In that event, program execution continues to 220.
Preparations to magnify either a graphic item at 216 or a dialog box at 220 involve many of the same tasks. In both cases, the pixels of the relevant sub-rectangle of the screen are determined and copied. At 216, this rectangular portion of the screen is determined according to the properties of the graphic item and generally corresponds to the bounding box of that item. In the case of a dialog box, preparations at 220 set the sub-rectangle to be the bounding area of the window itself. Once the sub-rectangle to be magnified is determined, a hardware video overlay is created in order to display the magnified image. As will be understood by one of skill in the art, the use of a hardware video overlay is preferable because it utilizes features of the graphic processing system 132, as shown in
A magnified graphic item is just an enlarged version of the base graphic item and such an item is displayed for its visual content only. There is no need to manipulate or interact with the graphic item beyond simply magnifying the item for improved viewing. In the event the display context is a dialog box or other window, then an embodiment of the invention would magnify the entire dialog box or window while at the same time permitting manipulation and interaction with the magnified dialog box or window. Preparations to magnify a window at 220 further include such operations as are required to magnify that window while keeping the magnified rendering of that window “live.” Preparing to magnify either a window or graphic item also requires an initial determination of the size and position that the magnified image should have. The position of the magnified image is determined by a number of factors. Most typically, the location of the magnified image is centered over the rectangular portion of the display being magnified. Sometimes however, such a position would not be possible. For example, where a graphic item is located very close to the edge of the display screen, displaying the magnified image centered in that position would place a portion of the magnified image off one or more edges of the screen. In that event, the magnified image is determined to have a location as close as possible to the pointer location to avoid any such loss of the image due to edge effects. The determination of the position of a dialog box or window is done in a similar fashion.
The size of the magnified image is also determined when preparing to magnify either a graphic item or a window. In the case of a graphic item, the size of the magnified version of that item is typically magnified by some relatively small factor to maintain some viewability of the background. For example, magnifying a very small graphic item such that it takes up the whole screen would not allow viewing of the graphic item in its context and could grossly distort the overall rendering of the image. It is generally preferable to render the graphic item with a relatively small magnification factor initially. Although this embodiment is described in terms of the initial magnification factor being determined programmatically, another embodiment might allow the user to configure the default magnification factor. Where the display context is instead a window, the routine generally will attempt to maximize the area of the magnified rendering of the window. Whether the display context is a graphic item or a window, the magnification factor of the image may be changed at any time by the user as will be discussed more fully below. When the display context is a dialog box or other window, it is important to understand that the magnified display of such a dialog box remains completely functional in its magnified state. That is, although the dialog box is now being displayed in a magnified form, all buttons, menus, options, text fields, and the like, remain fully functional. The user may directly interact with the magnified dialog box as if it had not been magnified.
Preparations to magnify continue with a determination of whether the pointer is currently inside the window that will be magnified at 330. Where this is not true, the pointer is moved to the center of the window at 334. Lastly, after these preparations are complete, the hardware overlay is created and positioned and the initial magnified image is thereby displayed with the precomputed position and magnification factor. Program control then passes to the magnification routine 224 for management of the magnified image.
Although not shown, preparations to magnify a graphic item are virtually identical to preparing to magnify a window 220. In the case of a graphic item, however, there is no need to determine whether the window is a dialog box at 316. Likewise, the logic associated with the routines of 320 and 324 is not necessary.
The magnification loop continues at 432 with a test of whether the user has pressed the magnification key a second time. In such an event, display of the magnified image ceases at 456. If the magnification key has not been pressed, the routine continues by testing for changes in the desired magnification factor at 436.
As was mentioned above, during display of the magnified image, the user may increase or decrease the magnification factor of the magnified image. Typically, two hot-keys are configured to control the increase or decrease of the magnification factor. For example, a hot-key might be configured where holding down the Ctrl key on the keyboard and pressing the Up Arrow key would increase the magnification factor and likewise, holding down Ctrl and pressing the Down Arrow would decrease the magnification factor. As will be understood by one of skill in the art, other means for signaling these magnification factors are possible. For example a mouse wheel, scroll wheel, jog-wheel, jog-dial, or the like, could be used to change the magnification factor while the magnified image is being displayed. This embodiment of the invention detects a user-initiated change to the magnification factor at 436. When such a change is detected, information about the amount of change (e.g. how many clicks of the scroll wheel and/or number of key presses) is passed back to 424 for re-determining the size and position of the magnified image and flow then continues as before. After the size and position have been re-determined at 424, program flow continues onto 428 for an update of the magnified image. The magnified image is re-displayed at 428 using the new size and position and according to the change in the magnification factor. In some instances other updates to the magnified image may be required and these are accomplished at 428 as well.
One embodiment of the invention provides automatic panning through the content underlying the magnified image. As was discussed in the description of
After the magnified image updates at 428, due either to changes in the magnification factor or because of panning, flow typically continues through 432 and 436 and back to step 404 where a series the tests 404 through 420 are performed to determine if the display has changed state. Such a change may have occurred in any of several ways. Since the last check of the display state, the window associated with the magnified image may have been closed, hidden, minimized, have lost focus, or been moved and/or resized. As was discussed briefly above, during the first traversal of the loop, none of these events will typically have occurred. For the forthcoming discussion of the tests shown at 404, 408, 412, 416 and 420, it will be understood that although discussed in terms of testing for a change in the state of a window, the tests are performed both when the display context is a graphic item as well as when it is a dialog box or other window. Where the display context is a graphic item, the tests are performed on the window where the graphic item is located. When the display context is a dialog box or other window, the tests are performed on the dialog box or window itself.
The first test is performed at 404 to determine whether the window has been closed. In the event the window has closed, control passes to 440 as will be discussed more fully below. If the window has not been closed, program execution continues at 408 with a test of whether the window has become hidden. The window might become hidden for any number of reasons. Most typically, a new window has opened on top of the magnified window thereby obscuring the magnified window from view. If the window is hidden, control passes to 440, otherwise control passes down to 412. Program flow continues at 412 where a test is performed to determine whether the window has been minimized. In almost all cases, a window becomes minimized because the user has manually done so. If the window has become minimized, the magnification routine continues at 440. Otherwise, flow continues on to 416 to test whether the window has lost focus. A window loses focus when a new window has opened and user input in being directed to that window. This could happen for a number of reasons. For example, a user may select one or more menu options in a software application that causes a dialog box to be displayed. When the window has not lost focus, the last remaining test of whether the window has been moved or resized is performed at 420.
If it is determined at 416 that the window has lost focus, flow branches to 448 where a test performed is performed to determine whether a new window is owned by the same application. This test can best be understood by way of an example. Suppose the user is running a software application and has magnified a dialog box of the application. As noted above, the dialog box is fully functional in its magnified form and the user may interact with the dialog box as if it had not been magnified. Further, suppose that the user initiates some action in the dialog box which causes a new dialog box or window to open. When the new dialog box opens such that the previous dialog box is still visible, this new window now has focus while the old window has lost focus. Since the old window was not closed, hidden or minimized, the magnification loop will detect that the window lost focus at 416 and pass control to the test at 448. The test at 448 determines whether the window currently in focus is owned by or is running in the same application as that of the window that was in focus. In our example thus far, the new dialog box is, in fact, running as part of the same application. Because of this, the previous magnification state of the display is saved at 452 and the new window now in focus is magnified instead. When saving the previous magnification state of the display, magnification information about the dialog box that was previously in focus is stored. This information typically contains information about the location of the magnified image and its size and/or magnification factor. As will be understood by one of skill in the art, the most natural abstract data type for storing and retrieving such information is a stack. Although this embodiment is described in terms of a stack, it will be understood that other embodiments of the invention may use other abstract data types. The saved magnification state is used later at 440 and 444 as is discussed more fully below. After saving the previous magnification state of the display, the newly opened dialog box is magnified by determining its position and size at 452 and then updating the displayed image at 428. Program flow then continues at 432 as has been described above. In the event the new window is not owned by the same application as the previous window, the magnification routine exits at 456 and the magnified image is removed from the display.
The saved magnification state will be used later when the user has finished interacting with the currently magnified window and, for example, closes that window. Assuming such a magnification state has been saved, if the current window associated with the currently displayed magnified image is closed, hidden or minimized, the magnification routine will detect such at 404, 408 or 412 respectively, and pass control to 440. At 440, the magnification routine determines if there is a saved magnification state on the stack. Where such a state exists, it is popped off the stack and the magnified image associated with the state is re-displayed with the saved size and position at 444. At that point, program control returns back to the main loop of the magnification routine at 404. If it is determined at 440 that no magnification state is stored on the stack, then the magnification routine exits at 456 and the magnified image is removed from the display.
a illustrates a screenshot 500 of a web browser application displaying a typical web page that contains a graphical image 504. As discussed above in greater detail, the graphical image 504 may be of virtually any type of graphical image.
b illustrates a screenshot 508 of a web browser application displaying a typical web page and showing a magnified version 512 of the graphical image 504 shown in
a is a screenshot 600 of a word processing application displaying a typical dialog box window 604.
b is a screenshot 602 of a word processing application displaying a magnified version 608 of the dialog box 604. As noted above, the magnified image is fully “live” and the user may directly interact with the magnified dialog box. For example, the Field shading dropdown box 612 may be selected and its options changed. Likewise, the Tab characters checkbox 616 may be set or cleared. Also as discussed above, the dialog box has been magnified with a relatively large factor so that the dialog box uses nearly the entire display area. This initial magnification factor is generally preferable since dialog boxes are usually complex and may contain a large number of input options. In such situations, viewability and usability of the magnified dialog box is of paramount importance. Also, the operating context of the dialog box is generally less important than that of a graphic item.
Although the invention has been described with reference to the disclosed embodiments, persons skilled in the art will recognize that changes may be made in form and detail without departing from the spirit and scope of the invention. Such modifications are well within the skill of those ordinarily skilled in the art. Accordingly, the invention is not limited except as by the appended claims.