public PixColor this[int index] { get { int color; if (LeptonicaApi.Native.pixcmapGetColor32(this.Handle, index, out color) == 0) { return(PixColor.FromRgb(( uint )color)); } throw new InvalidOperationException("Failed to retrieve color."); } set { if (LeptonicaApi.Native.pixcmapResetColor(this.Handle, index, value.Red, value.Green, value.Blue) != 0) { throw new InvalidOperationException("Failed to reset color."); } } }
public PixColor this[int index] { get { int color; if (Interop.LeptonicaApiSignatures.pixcmapGetColor32(handle, index, out color) == 0) { return(PixColor.FromRgb((uint)color)); } else { throw new InvalidOperationException("Failed to retrieve color."); } } set { if (Interop.LeptonicaApiSignatures.pixcmapResetColor(handle, index, value.Red, value.Green, value.Blue) != 0) { throw new InvalidOperationException("Failed to reset color."); } } }