LEADTOOLS GDI/GDI+ (Leadtools.Drawing assembly)

PaintOverlay(RasterImage,IntPtr,Int32,LeadRect,LeadRect,LeadRect,LeadRect,RasterPaintProperties) Method

Show in webframe





The source image.
The destination device context where the image will be displayed.
The index of the overlay used for painting. The overlay should have an image. If the overlay is embedded into an image bitplane, make sure you create an overlay image prior to calling this method. This index is zero-based.
Rectangle which determines the portion of the image to paint.
Rectangle which further clips the source image.
Rectangle which determines where the image is placed, and how it is scaled.
Rectangle which clips the image display.
Options for the display.
Paints the overlay at the specified index. Use this method to paint overlays that are not automatically painted.
Syntax
public static void PaintOverlay( 
   RasterImage image,
   IntPtr hdc,
   int index,
   LeadRect srcRect,
   LeadRect srcClipRect,
   LeadRect destRect,
   LeadRect destClipRect,
   RasterPaintProperties properties
)
'Declaration
 
Public Overloads Shared Sub PaintOverlay( _
   ByVal image As RasterImage, _
   ByVal hdc As IntPtr, _
   ByVal index As Integer, _
   ByVal srcRect As LeadRect, _
   ByVal srcClipRect As LeadRect, _
   ByVal destRect As LeadRect, _
   ByVal destClipRect As LeadRect, _
   ByVal properties As RasterPaintProperties _
) 
'Usage
 
Dim image As RasterImage
Dim hdc As IntPtr
Dim index As Integer
Dim srcRect As LeadRect
Dim srcClipRect As LeadRect
Dim destRect As LeadRect
Dim destClipRect As LeadRect
Dim properties As RasterPaintProperties
 
RasterImagePainter.PaintOverlay(image, hdc, index, srcRect, srcClipRect, destRect, destClipRect, properties)

            

            
public:
static void PaintOverlay( 
   RasterImage^ image,
   IntPtr hdc,
   int index,
   LeadRect srcRect,
   LeadRect srcClipRect,
   LeadRect destRect,
   LeadRect destClipRect,
   RasterPaintProperties properties
) 

Parameters

image
The source image.
hdc
The destination device context where the image will be displayed.
index
The index of the overlay used for painting. The overlay should have an image. If the overlay is embedded into an image bitplane, make sure you create an overlay image prior to calling this method. This index is zero-based.
srcRect
Rectangle which determines the portion of the image to paint.
srcClipRect
Rectangle which further clips the source image.
destRect
Rectangle which determines where the image is placed, and how it is scaled.
destClipRect
Rectangle which clips the image display.
properties
Options for the display.
Remarks

This method will paint an overlay image. For more information on the paint rectangles, see Paint(RasterImage,Graphics,LeadRect,RasterPaintProperties).

Paint(RasterImage,Graphics,LeadRect,RasterPaintProperties) will paint all the overlays that have RasterOverlayAttributes.AutoPaint set to true. The overlays are painted in ascending index order: overlay 0 is painted first, then overlay 1, etc.

Use this method to manually paint an overlay. For example, to change the order in which the overlays are painted, set the RasterOverlayAttributes.AutoPaint property of the overlay to false then call PaintOverlay(RasterImage,Graphics,Int32,LeadRect,LeadRect,LeadRect,LeadRect,RasterPaintProperties) directly.

To temporarily make an overlay top-most, call PaintOverlay(RasterImage,Graphics,Int32,LeadRect,LeadRect,LeadRect,LeadRect,RasterPaintProperties) after Paint(RasterImage,Graphics,LeadRect,RasterPaintProperties). To permanently make an overlay top-most, change its index and give it the highest defined index.

The overlay image's 1 pixels are painted with the color set in the RasterOverlayAttributes.Color property of the overlay. The overlay image's 0 pixels are considered transparent.

For more information on the overlay attributes, including the RasterOverlayAttributes.AutoPaint property and the RasterOverlayAttributes.Color property, refer to Leadtools.RasterOverlayAttributes.

For more information, refer to Overlay Overview.

For more information refer to RasterImage and GDI/GDI+.

Example
For an example, refer to PaintOverlay(RasterImage,Graphics,Int32,LeadRect,LeadRect,LeadRect,LeadRect,RasterPaintProperties).
Requirements

Target Platforms

See Also

Reference

RasterImagePainter Class
RasterImagePainter Members
Overload List

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.