/// <summary> /// Creates an instance of <see cref="ColorDataV4" /> to modify the color data /// </summary> /// <param name="command">The command to be executed.</param> /// <param name="colorFormat">The color data color format.</param> /// <param name="colorimetry">The color data color space.</param> /// <param name="dynamicRange">The color data dynamic range.</param> /// <param name="colorDepth">The color data color depth.</param> /// <param name="colorSelectionPolicy">The color data selection policy.</param> /// <param name="desktopColorDepth">The color data desktop color depth.</param> public ColorDataV5( ColorDataCommand command, ColorDataFormat colorFormat, ColorDataColorimetry colorimetry, ColorDataDynamicRange dynamicRange, ColorDataDepth colorDepth, ColorDataSelectionPolicy colorSelectionPolicy, ColorDataDesktopDepth desktopColorDepth ) { this = typeof(ColorDataV5).Instantiate <ColorDataV5>(); _Size = (ushort)_Version.StructureSize; if (command != ColorDataCommand.Set && command != ColorDataCommand.IsSupportedColor) { throw new ArgumentOutOfRangeException(nameof(command)); } _Command = (byte)command; _Data = new ColorDataBag( colorFormat, colorimetry, dynamicRange, colorDepth, colorSelectionPolicy, desktopColorDepth ); }
internal ColorDataV1 AsColorDataV1(ColorDataCommand command) { return(new ColorDataV1( command, ColorFormat, Colorimetry )); }
internal ColorDataV2 AsColorDataV2(ColorDataCommand command) { return(new ColorDataV2( command, ColorFormat, Colorimetry, DynamicRange ?? ColorDataDynamicRange.Auto )); }
internal ColorDataV3 AsColorDataV3(ColorDataCommand command) { return(new ColorDataV3( command, ColorFormat, Colorimetry, DynamicRange ?? ColorDataDynamicRange.Auto, ColorDepth ?? ColorDataDepth.Default )); }
internal ColorDataV4 AsColorDataV4(ColorDataCommand command) { return(new ColorDataV4( command, ColorFormat, Colorimetry, DynamicRange ?? ColorDataDynamicRange.Auto, ColorDepth ?? ColorDataDepth.Default, SelectionPolicy ?? ColorDataSelectionPolicy.Default )); }
/// <summary> /// Creates an instance of <see cref="ColorDataV5" /> to retrieve color data information /// </summary> /// <param name="command">The command to be executed.</param> public ColorDataV5(ColorDataCommand command) { this = typeof(ColorDataV5).Instantiate <ColorDataV5>(); _Size = (ushort)_Version.StructureSize; if (command != ColorDataCommand.Get && command != ColorDataCommand.GetDefault) { throw new ArgumentOutOfRangeException(nameof(command)); } _Command = (byte)command; }
/// <summary> /// Creates an instance of <see cref="ColorDataV1" /> to modify the color data /// </summary> /// <param name="command">The command to be executed.</param> /// <param name="colorFormat">The color data color format.</param> /// <param name="colorimetry">The color data color space.</param> public ColorDataV1( ColorDataCommand command, ColorDataFormat colorFormat, ColorDataColorimetry colorimetry ) { this = typeof(ColorDataV1).Instantiate <ColorDataV1>(); _Size = (ushort)_Version.StructureSize; if (command != ColorDataCommand.Set && command != ColorDataCommand.IsSupportedColor) { throw new ArgumentOutOfRangeException(nameof(command)); } _Command = (byte)command; _Data = new ColorDataBag(colorFormat, colorimetry); }