Visual Basic (Declaration) | |
---|---|
Public Sub AddColorToRegion( _ ByVal color As RasterColor, _ ByVal combineMode As RasterRegionCombineMode _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public void AddColorToRegion( RasterColor color, RasterRegionCombineMode combineMode ) |
C++/CLI | |
---|---|
public: void AddColorToRegion( RasterColor color, RasterRegionCombineMode combineMode ) |
Parameters
- color
- Specifies the color to use for the region.
- combineMode
- The action to take regarding the existing image region, if one is defined.
This example will load an image, adds a region all pixels of a specified color. It then fills the region with blue before saving it back to disk.
Visual Basic | Copy Code |
---|---|
Public Sub AddColorToRegionExample() |
C# | Copy Code |
---|---|
public void AddColorToRegionExample() |
You can use this method to simulate the use of a transparent color as follows:
Call AddColorToRegion, with the transparent color in the color parameter and RasterRegionCombineMode.SetNot in the combineMode parameter. Call PaintRegion to paint the resulting region, which includes everything in the image, except the transparent color.
To update an existing region, you specify how the new region is to be combined with the existing one using the combineMode parameter. For more information, refer to RasterRegionCombineMode.
For more information, refer to Creating a Region.
For more information, refer to Saving A Region.
For more information, refer to Working with the Existing Region.
This function does not support signed images.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family