/// <summary> /// Initializes a new instance of the <see cref="PICAColorSpaceSuite"/> class. /// </summary> /// <param name="zstringSuite">The ASZString suite.</param> /// <param name="colorPicker">The color picker.</param> /// <exception cref="ArgumentNullException"><paramref name="zstringSuite"/> is null.</exception> public PICAColorSpaceSuite(IASZStringSuite zstringSuite, IColorPicker colorPicker) { if (zstringSuite == null) { throw new ArgumentNullException(nameof(zstringSuite)); } if (colorPicker == null) { throw new ArgumentNullException(nameof(colorPicker)); } csMake = new CSMake(Make); csDelete = new CSDelete(Delete); csStuffComponent = new CSStuffComponents(StuffComponents); csExtractComponent = new CSExtractComponents(ExtractComponents); csStuffXYZ = new CSStuffXYZ(StuffXYZ); csExtractXYZ = new CSExtractXYZ(ExtractXYZ); csConvert8 = new CSConvert8(Convert8); csConvert16 = new CSConvert16(Convert16); csGetNativeSpace = new CSGetNativeSpace(GetNativeSpace); csIsBookColor = new CSIsBookColor(IsBookColor); csExtractColorName = new CSExtractColorName(ExtractColorName); csPickColor = new CSPickColor(PickColor); csConvert8to16 = new CSConvert(Convert8to16); csConvert16to8 = new CSConvert(Convert16to8); csConvertToMonitorRGB = new CSConvertToMonitorRGB(ConvertToMonitorRGB); colors = new Dictionary <IntPtr, Color>(IntPtrEqualityComparer.Instance); colorsIndex = 0; lookup16To8 = null; lookup8To16 = null; this.zstringSuite = zstringSuite; this.colorPicker = colorPicker; }
/// <summary> /// Initializes a new instance of the <see cref="PICAColorSpaceSuite"/> class. /// </summary> /// <param name="zstringSuite">The ASZString suite.</param> public unsafe PICAColorSpaceSuite(IASZStringSuite zstringSuite) { if (zstringSuite == null) { throw new ArgumentNullException(nameof(zstringSuite)); } csMake = new CSMake(Make); csDelete = new CSDelete(Delete); csStuffComponent = new CSStuffComponents(StuffComponents); csExtractComponent = new CSExtractComponents(ExtractComponents); csStuffXYZ = new CSStuffXYZ(StuffXYZ); csExtractXYZ = new CSExtractXYZ(ExtractXYZ); csConvert8 = new CSConvert8(Convert8); csConvert16 = new CSConvert16(Convert16); csGetNativeSpace = new CSGetNativeSpace(GetNativeSpace); csIsBookColor = new CSIsBookColor(IsBookColor); csExtractColorName = new CSExtractColorName(ExtractColorName); csPickColor = new CSPickColor(PickColor); csConvert8to16 = new CSConvert(Convert8to16); csConvert16to8 = new CSConvert(Convert16to8); csConvertToMonitorRGB = new CSConvertToMonitorRGB(ConvertToMonitorRGB); this.zstringSuite = zstringSuite; colors = new Dictionary <ColorID, Color>(); colorsIndex = 0; lookup16To8 = null; lookup8To16 = null; }