GetPaletteIndex() публичный Метод

Gets the index of the palette.
public GetPaletteIndex ( Color color, Int32 level ) : Int32
color Color The color.
level System.Int32 The level.
Результат System.Int32
        /// <summary>
        /// Gets the index of the palette for specific color.
        /// </summary>
        /// <param name="color">The color.</param>
        /// <returns></returns>
        public Int32 GetPaletteIndex(Color color)
        {
            color = QuantizationHelper.ConvertAlpha(color);

            // retrieves a palette index
            return(root.GetPaletteIndex(color, 0));
        }
Пример #2
0
 /// <summary>
 /// See <see cref="BaseColorQuantizer.OnGetPaletteIndex"/> for more details.
 /// </summary>
 protected override void OnGetPaletteIndex(TextureBitmap.Color color, Int32 key, Int32 x, Int32 y, out Int32 paletteIndex)
 {
     // retrieves a palette index
     paletteIndex = root.GetPaletteIndex(color, 0);
 }