Makes palette entry with given index transparent.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public Sub SetColorKey ( _ entryIndex As Integer _ )
public void SetColorKey( int entryIndex )
Type: System.Int32
Index of the palette entry to make transparent.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].
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.
Dim index As Integer = 203 palette.SetColorKey(index)
int index = 203; palette.SetColorKey(index);