Leadtools Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.3.5
UpdateOverlayBits Method
See Also 
Leadtools Namespace > RasterImage Class : UpdateOverlayBits Method




index
The index of the overlay used in the process.
flags
Flags that determine whether the main image or the overlay image should be updated.
Updates the overlay image pixels with the bits from the corresponding bitplane of the main image.

Syntax

Visual Basic (Declaration) 
Public Sub UpdateOverlayBits( _
   ByVal index As Integer, _
   ByVal flags As RasterUpdateOverlayBitsFlags _
) 
Visual Basic (Usage)Copy Code
Dim instance As RasterImage
Dim index As Integer
Dim flags As RasterUpdateOverlayBitsFlags
 
instance.UpdateOverlayBits(index, flags)
C# 
public void UpdateOverlayBits( 
   int index,
   RasterUpdateOverlayBitsFlags flags
)
Managed Extensions for C++ 
public: void UpdateOverlayBits( 
   int index,
   RasterUpdateOverlayBitsFlags flags
) 
C++/CLI 
public:
void UpdateOverlayBits( 
   int index,
   RasterUpdateOverlayBitsFlags flags
) 

Parameters

index
The index of the overlay used in the process.
flags
Flags that determine whether the main image or the overlay image should be updated.

Example

For an example, refer to GetOverlayImage.

Remarks

This method can also update the main image's bitplane with the data from the overlay image.

This method is available in the (Document/Medical only) Toolkits.

The overlay at index must have the corresponding bitplane set, otherwise this method will throw a RasterException with RasterExceptionCode.OverlayIndex. This index is zero-based and should be less than or equal to MaxOverlays.

If RasterUpdateOverlayBitsFlags.FromOverlay is set in flags, the bitplane in the main image will be updated to match the overlay image data. The left and top coordinates for the overlay image are used. If RasterUpdateOverlayBitsFlags.Clear is set, the bits from the bitplane associated with the overlay are set to 0 if they are not covered by the overlay. If RasterUpdateOverlayBitsFlags.Clear is not set, the bits from the bitplane associated with the overlay that are not covered by the overlay image are left unchanged.

If RasterUpdateOverlayBitsFlags.FromImage is set in flags, the overlay image will be updated with the bits from the corresponding bitplane. The size of the overlay image is unchanged if it has ever been set. If the overlay image has never been set, the overlay image will be from left, top coordinate to the bottom-right corner of the image:

OverlayWidth = Image.ImageWidth - OverlayImage.Origin.X OverlayHeight = Image.ImageHeight - OverlayImage.Origin.Y

For more information, refer to Overlay Overview.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also