次の方法で共有


PixelBitmapContent.ReplaceColor Method

Searches for all pixels matching the specified color and replaces them with a new value.

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

Syntax

public void ReplaceColor (
         T originalColor,
         T newColor
)

Parameters

  • originalColor
    Color being searched for.
  • newColor
    Color used to replace originalColor.

Remarks

Use this method to implement color keying. For instance, replace Magenta with TransparentBlack.

See Also

Reference

PixelBitmapContent Generic Class
PixelBitmapContent Members
Microsoft.Xna.Framework.Content.Pipeline.Graphics Namespace

Platforms

Windows XP SP2, Windows Vista