Meet us at PRINT 19. Chicago, IL. Oct. 3 - 5.
This documentation is for the old version. Go to the latest Graphics Mill docs

ColorPalette.SetColorKey Method (Int32)

Makes palette entry with given index transparent.

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

Visual Basic
Public Sub SetColorKey ( _
	entryIndex As Integer _
)
C#
public void SetColorKey(
	int entryIndex
)

Parameters

entryIndex

Type: System.Int32

Index of the palette entry to make transparent.

Remarks

Alpha channel of given entry will be dropped to 0, alpha channels of all other entries will be set to 255. This way palette will contain only the single transparent index. If you need more than one transparent entry, put transparent RgbColor into appropriate Item[Int32].

Note

Setting transparent index works noticeable faster than setting transparent color (which actually calls slow FindNearestIndex(RgbColor) method). That's why it is highly recommended to pass index instead of color where possible.

Examples

Visual Basic
Dim index As Integer = 203

palette.SetColorKey(index)
C#
int index = 203;

palette.SetColorKey(index);

See Also

Reference