"Picture" object

The next object to be examined is the "Picture" object. It is also often used in reports. With the help of this object, you can insert a trademark of your firm, a photo of your employee or any other graphical information. The object is able to display graphics in "BMP," "JPEG," "ICO," "WMF," and "EMF" formats.

Let us examine the capabilities of the object. Create a blank report and place the "Picture" object to the report list. You can load a picture from the file or clear an existing picture in the object editor (if it does not open automatically, then doubleclick on the object). Load any desired picture and click "OK."

There are the following options in the object contextual menu (in brackets are the corresponding names of the properties in the object inspector):

- AutoSize
- Stretch – enabled by default
- Center
- KeepAspectRatio – enabled by default

If the "AutoSize" option is enabled, we can see that the object is being resized, according to the size of the picture it contains. Sometimes such feature can be useful, if pictures of different sizes are to be displayed. This option is disabled by default, due to the fact that it is rather convenient in most cases.

The "Stretch" option is enabled by default. This option stretches the picture inside an object. Modify object size with the help of the mouse and you will see, that the picture size always corresponds to the object’s size. If this option is disabled, the picture will be displayed in its original size. This behaviour differs from the "AutoSize" option because the object dimensions are not adjusted according to the picture size, which means that the object can be larger or smaller than a picture is.

The "Center" option allows aligning a picture inside the object.

The "KeepAspectRatio" option is enabled by default and performs a very useful task: it does not allow the picture ratioes to distort when object sizes are modified. This option works only together with the "Stretch" option. When applying any object dimensions, a drawn circle will remain a circle, without turning into an oval. At that, the stretched picture occupies not the whole internal space of an object but only a part of it, necessary for displaying of the picture in correct ratioes. If the option is disabled, a picture will be stretched by whole object size, and if object’s size does not correspond to the initial dimensions of the picture, it will be distorted.