/// <summary> /// Writes a <see cref="IccParametricCurve"/> /// </summary> /// <param name="value">The curve to write</param> /// <returns>The number of bytes written</returns> public int WriteParametricCurve(IccParametricCurve value) { ushort typeValue = (ushort)value.Type; int count = this.WriteUInt16(typeValue); count += this.WriteEmpty(2); if (typeValue <= 4) { count += this.WriteFix16(value.G); } if (typeValue > 0 && typeValue <= 4) { count += this.WriteFix16(value.A); count += this.WriteFix16(value.B); } if (typeValue > 1 && typeValue <= 4) { count += this.WriteFix16(value.C); } if (typeValue > 2 && typeValue <= 4) { count += this.WriteFix16(value.D); } if (typeValue == 4) { count += this.WriteFix16(value.E); count += this.WriteFix16(value.F); } return(count); }
/// <summary> /// Initializes a new instance of the <see cref="IccParametricCurveTagDataEntry"/> class. /// </summary> /// <param name="curve">The Curve</param> /// <param name="tagSignature">Tag Signature</param> public IccParametricCurveTagDataEntry(IccParametricCurve curve, IccProfileTag tagSignature) : base(IccTypeSignature.ParametricCurve, tagSignature) { this.Curve = curve; }
/// <summary> /// Initializes a new instance of the <see cref="IccParametricCurveTagDataEntry"/> class. /// </summary> /// <param name="curve">The Curve</param> public IccParametricCurveTagDataEntry(IccParametricCurve curve) : this(curve, IccProfileTag.Unknown) { }