Adjusting Images for Different Sizes

In some circumstances, a graphic image might need to fit in a different amount of space than originally intended. For example, a user may adjust the global scaling constant using the Custom Font Size feature, or an application might allow the user to choose a differently sized font. In these cases, an application might draw an image that appears unexpectedly out of scale with the surrounding text or other window elements. Different methods of adjusting images are described in the following sections.

Alternatives to bitmaps

Adjusting images is especially a problem for bitmaps, which are not automatically scaled and do not usually look good when stretched. The best solution is to avoid using bitmaps altogether and use instead another kind of image that is designed to scale well. The following alternatives can be used in place of bitmaps:

Accommodating bitmaps when changing size

Several methods can be used to accommodate a bitmap to differently sized regions: