CogMaskGraphic SetTransparencyMap Method Cognex VisionPro 9.8
Controls transparency of mask values when displayed. The transparency value may be any integer between 0 (fully opaque) and 100 (fully transparent) inclusive.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 75.1.0.0
Syntax

public void SetTransparencyMap(
	byte maskVal,
	CogMaskGraphicTransparencyConstants value
)
Events

Event TypeReason
CogMaskGraphic Changed

Fires when the transparency value changes.

The following state flag may be affected:

Exceptions

ExceptionCondition
ArgumentException

value is not in the range 0 to 100.

Remarks

Controls transparency of mask values when displayed.

The transparency value can be any integer in the range 0 to 100. If the transparency is set to 0 (None), then the mask value is drawn opaque in the color returned by calling GetColorMap(Byte)(maskVal). If the transparency value is 100 (Full), the mask value is completely transparent.

Values between 0 and 100 are color-blended between the color returned by calling GetColorMap(Byte)(maskVal). and the color value at that location under the mask as dictated by graphic z-order.

The predefined transparency constants, None, Half, and Full provide best performance.

Default Value: maskVal = 0 (Don't Care): HalfmaskVal = 1-254 (Tool Specific): HalfmaskVal = 255 (Care): Full

See Also