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 LPaint::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:
When painting an image with a display mode of 256 colors or less, you must specify the palette to use. For instructions for doing that, 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.
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, please refer to Displaying Images.
You can also use the high-level classes LBitmapWindow, LAnimationWindow, and LAnnotationWindow to display images. These classes create a window and do all of the processing required to implement displaying an image for you, including zooming, scrolling palette changes, and special effects.
To control bitmap display settings, refer to Using Global / Local Settings for Bitmap Objects.
Medical Web Viewer .NET