Visual Basic (Declaration) | |
---|---|
Public Property TransparentColor As RasterColor |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public RasterColor TransparentColor {get; set;} |
C++/CLI | |
---|---|
public: property RasterColor TransparentColor { RasterColor get(); void set (RasterColor value); } |
Return Value
The transparent color used when painting this image.The TransparentColor of a RasterImage is used when the Transparent property value is set to true.
Note, transparent paint does not work with RasterPaintEngine.Gdi. For more information, refer to RasterPaintProperties.
If this RasterImage has a BitsPerPixel value of 8 or less, then the image has a palette. For palettized images, the value of the TransparentColor can be an RGB value or a palette index.
To set a palette index as the transparent color, use the RasterColor.FromPaletteIndex method.
If the color passed is a true RGB value(The value of see RasterColor.IsPaletteIndex is false and the image has a palette, then this RasterImage object will call GetTrueColorValue on the TransparentColor to translate it into the nearest palette index entry before using it to determine the actual transparent color in the image when painting.
For more information, refer to PNG Files and Transparency.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family