PixelBitmapContent.ReplaceColor Method
Note
This method is available only when developing for Windows.
Searches for all pixels matching the specified color and replaces them with a new value.
Syntax
'Declaration
Public Sub ReplaceColor ( _
originalColor As T, _
newColor As T _
)
public void ReplaceColor (
T originalColor,
T newColor
)
public:
void ReplaceColor(
T originalColor,
T newColor
)
Parameters
- originalColor
Type: T
Color being searched for. - newColor
Type: T
Color used to replace originalColor.
Remarks
Use this method to implement color keying. For instance, to replace Color.Magenta with Color.Transparent.
Requirements
Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)
See Also
Reference
PixelBitmapContent Generic Class
PixelBitmapContent Members
Microsoft.Xna.Framework.Content.Pipeline.Graphics Namespace
Platforms
Windows 7, Windows Vista, Windows XP