Displaying an Image

The LEADTOOLS functions for painting an image use four rectangles. Two of them, the source rectangle and the destination rectangle, determine how much an image is scaled (zoomed) when it is displayed. The other two, the source clipping rectangle and the destination clipping rectangle, determine which part of an image is painted. For a complete description of the rectangles, with illustrations, refer to the L_PaintDC function.

Other painting functions, which implement features such as transitional effects and region processing, use the same rectangles. For a list of functions, refer to Displaying Images.

The following topics describe how the painting rectangles can be used to meet particular needs:

Fitting an Image to a Window

Implementing Scrollbars

When painting an image with a display mode of 256 colors or less, you must specify the palette to use. For more information, refer to Handling Palette Changes.

You can zoom in on an image either by making the display rectangle larger or by making source rectangle smaller (so that it gets only a portion of the bitmap). If you zoom in by making the source rectangle smaller, you must consider the view perspective of the bitmap. For general information about the view perspective, refer to Accounting for View Perspective. For an example of how this can be implemented, refer to Zooming In on a Selection.

LEADTOOLS offers the user draws an overlay bitmaps on top of you main bitmap. For more information, refer to Overlay Overview.

The LEADTOOLS special effects functions give you precise control over a large variety of effects when you paint bitmaps, text, patterns, and shapes to a device context. For details, refer to Implementing Special Effects.

LEADTOOLS offers additional options while displaying an image including transparency, dithering options, scale to gray, favor black, halftone, contrast, gamma, intensity, window leveling and paint and transition effects. For a list of functions, refer to Displaying Images.

Help Version 22.0.2023.7.11
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.