The Document

A picture is a document object. When you open a new picture in iFIX, you create a document. The document is the ActiveX container for your iFIX picture. Look at the document as the entire landscape of your picture. The document is created using either the Logical or Enhanced Coordinate Systems. Only pictures created in releases earlier than iFIX 5.8 use the Logical Coordinate system. Pictures created in iFIX 5.8 or later, or pictures from earlier releases that have been upgraded will use Enhanced Coordinates.

Logical Coordinate System

To understand what this means, let's go back to the discussion of object-oriented graphics in the Getting Started section. This section discussed how iFIX uses object-oriented, rather than pixel-based, graphics. The iFIX picture sizing methodology works in a similar way. A Logical Coordinate System picture size means that your document size is based on logical units, not pixels. The number of this unit of measurement is arbitrary; that is, you can use any number of logical units you want. iFIX makes this possible by calculating a one-to-one relationship between the pixel size of your monitor and the logical units of your document, while maintaining the dpi (dots per inch) ratio of your monitor.

For example, a standard VGA monitor consists of 640x480 pixels. In iFIX, the default size of your picture, viewed with this monitor, is not 640x480. Rather, it is 100x75 (logical units), as illustrated in the following calculation.

 
 
 

Autoscaling

An iFIX document that uses the Logical Coordinate System establishes the logical-units-to-pixels ratio when you create a new picture, and automatically adjusts the ratio when you change the resolution of your screen. This way, your picture appears to scale no matter what monitor you view it on. When you make any changes to the document, viewport, or window size, iFIX maintains the 4:3 ratio so that your objects maintain a consistent size on your screen.

Enhanced Coordinate System

With the Enhanced Coordinate System, your document size is based on postscript points, not logical units. The number of this unit of measurement is arbitrary; that is, you can use any number of postscript points you want.

Since the document size is based on the resolution of the screen on which the picture is created, you are recommended to develop a document using the screen resolution of the monitor on which the picture is to be viewed when implemented. (For example, to create a document for a screen with 1920x1080 resolution, you must create your pictures using a computer with a screen resolution of 1920x1080.)  

Once created, the document size and shape remains constant when used on a screen with a different resolution.

In addition, iFIX allows you to upgrade documents created with the Logical Coordinate System to the Enhanced Coordinate System while maintaining a backup copy of the original document.

Zoom to Fit

Zoom to Fit is an Enhanced Coordinate System viewing option. The Zoom to Fit feature automatically scales the document view to fit the current window while suppressing scroll bars.

 

How Do I...