SetPalette Method

NI Vision for Visual Basic

SetPalette Method

Syntax

CWIMAQPalette.SetPalette [RedPlane] [, GreenPlane] [, BluePlane]

Purpose

Sets the red, green, and blue color arrays of the Palette object. You can set the color planes individually or all at once.

Remarks

After setting the palette with this method, PaletteType will be cwimaqPaletteUserDefined.

Parameters

RedPlane As Variant

[Optional] Red color plane.

GreenPlane As Variant

[Optional] Green color plane.

BluePlane As Variant

[Optional] Blue color plane.

Example

' Get the color plane arrays
Dim r,g,b
CWIMAQViewer1.Palette.GetPalette r,g,b

'Replace the green plane with the red plane.
CWIMAQViewer1.Palette.SetPalette r,r,b