Exemple #1
0
        /// <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
                );
        }
Exemple #2
0
 public ColorDataBag(
     ColorDataFormat colorFormat,
     ColorDataColorimetry colorimetry,
     ColorDataDynamicRange colorDynamicRange,
     ColorDataDepth colorDepth
     )
 {
     ColorFormat       = (byte)colorFormat;
     Colorimetry       = (byte)colorimetry;
     ColorDynamicRange = (byte)colorDynamicRange;
     ColorDepth        = colorDepth;
 }
Exemple #3
0
 public ColorDataBag(
     ColorDataFormat colorFormat,
     ColorDataColorimetry colorimetry,
     ColorDataDynamicRange colorDynamicRange,
     ColorDataDepth colorDepth,
     ColorDataSelectionPolicy colorSelectionPolicy
     )
 {
     ColorFormat          = (byte)colorFormat;
     Colorimetry          = (byte)colorimetry;
     ColorDynamicRange    = (byte)colorDynamicRange;
     ColorDepth           = colorDepth;
     ColorSelectionPolicy = colorSelectionPolicy;
 }
Exemple #4
0
        /// <summary>
        ///     Creates an instance of <see cref="HDRColorDataV2" />.
        /// </summary>
        /// <param name="command">The command to be executed.</param>
        /// <param name="hdrMode">The hdr mode.</param>
        /// <param name="masteringDisplayData">The display color space configurations.</param>
        /// <param name="colorFormat">The color data color format.</param>
        /// <param name="dynamicRange">The color data dynamic range.</param>
        /// <param name="colorDepth">The color data color depth.</param>
        public HDRColorDataV2(
            ColorDataHDRCommand command,
            ColorDataHDRMode hdrMode,
            MasteringDisplayColorData masteringDisplayData = default,
            ColorDataFormat colorFormat        = ColorDataFormat.Default,
            ColorDataDynamicRange dynamicRange = ColorDataDynamicRange.Auto,
            ColorDataDepth colorDepth          = ColorDataDepth.Default
            )
        {
            this = typeof(HDRColorDataV2).Instantiate <HDRColorDataV2>();

            if (command != ColorDataHDRCommand.Set)
            {
                throw new ArgumentOutOfRangeException(nameof(command));
            }

            _Command = command;
            _HDRMode = hdrMode;
            _MasteringDisplayData       = masteringDisplayData;
            _ColorFormat                = colorFormat;
            _DynamicRange               = dynamicRange;
            _ColorDepth                 = colorDepth;
            _StaticMetadataDescriptorId = StaticMetadataDescriptorId.StaticMetadataType1;
        }