/// <summary> /// Initializes a new instance of the <c>HatchGradientPattern</c> class as a default linear gradient. /// </summary> /// <param name="description">Description of the pattern (optional, this information is not saved in the dxf file). By default it will use the supplied name.</param> public HatchGradientPattern(string description = null) : base("SOLID", description) { this.color1 = AciColor.Blue; this.color2 = AciColor.Yellow; this.singleColor = false; this.gradientType = HatchGradientPatternType.Linear; this.tint = 1.0; this.centered = true; }
/// <summary> /// Initializes a new instance of the <c>HatchGradientPattern</c> class as a single color gradient. /// </summary> /// <param name="color">Gradient <see cref="AciColor">color</see>.</param> /// <param name="tint">Gradient tint.</param> /// <param name="type">Gradient <see cref="HatchGradientPatternType">type</see>.</param> /// <param name="description">Description of the pattern (optional, this information is not saved in the DXF file). By default it will use the supplied name.</param> public HatchGradientPattern(AciColor color, double tint, HatchGradientPatternType type, string description) : base("SOLID", description) { this.color1 = color ?? throw new ArgumentNullException(nameof(color)); this.color2 = this.Color2FromTint(tint); this.singleColor = true; this.gradientType = type; this.tint = tint; this.centered = true; }
/// <summary> /// Initializes a new instance of the <c>HatchGradientPattern</c> class as a two color gradient. /// </summary> /// <param name="color1">Gradient <see cref="AciColor">color</see> 1.</param> /// <param name="color2">Gradient <see cref="AciColor">color</see> 2.</param> /// <param name="type">Gradient <see cref="HatchGradientPatternType">type</see>.</param> /// <param name="description">Description of the pattern (optional, this information is not saved in the DXF file). By default it will use the supplied name.</param> public HatchGradientPattern(AciColor color1, AciColor color2, HatchGradientPatternType type, string description) : base("SOLID", description) { this.color1 = color1 ?? throw new ArgumentNullException(nameof(color1)); this.color2 = color2 ?? throw new ArgumentNullException(nameof(color2)); this.singleColor = false; this.gradientType = type; this.tint = 1.0; this.centered = true; }
/// <summary> /// Initializes a new instance of the <c>HatchGradientPattern</c> class as a default linear gradient. /// </summary> /// <param name="description">Description of the pattern (optional, this information is not saved in the dxf file). By default it will use the supplied name.</param> public HatchGradientPattern(string description) : base("SOLID", description) { color1 = AciColor.Blue; color2 = AciColor.Yellow; singleColor = false; gradientType = HatchGradientPatternType.Linear; tint = 1.0; centered = true; }
/// <summary> /// Initializes a new instance of the <c>HatchGradientPattern</c> class as a single color gradient. /// </summary> /// <param name="color">Gradient <see cref="AciColor">color</see>.</param> /// <param name="tint">Gradient tint.</param> /// <param name="type">Gradient <see cref="HatchGradientPatternType">type</see>.</param> /// <param name="description">Description of the pattern (optional, this information is not saved in the dxf file). By default it will use the supplied name.</param> public HatchGradientPattern(AciColor color, double tint, HatchGradientPatternType type, string description = null) : base("SOLID", description) { if (color == null) throw new ArgumentNullException("color"); this.color1 = color; this.color2 = this.Color2FromTint(tint); this.singleColor = true; this.gradientType = type; this.tint = tint; this.centered = true; }
/// <summary> /// Initializes a new instance of the <c>HatchGradientPattern</c> class as a two color gradient. /// </summary> /// <param name="color1">Gradient <see cref="AciColor">color</see> 1.</param> /// <param name="color2">Gradient <see cref="AciColor">color</see> 2.</param> /// <param name="type">Gradient <see cref="HatchGradientPatternType">type</see>.</param> /// <param name="description">Description of the pattern (optional, this information is not saved in the dxf file). By default it will use the supplied name.</param> public HatchGradientPattern(AciColor color1, AciColor color2, HatchGradientPatternType type, string description = null) : base("SOLID", description) { if (color1 == null) { throw new ArgumentNullException("color1"); } this.color1 = color1; if (color2 == null) { throw new ArgumentNullException("color2"); } this.color2 = color2; this.singleColor = false; this.gradientType = type; this.tint = 1.0; this.centered = true; }
/// <summary> /// Initializes a new instance of the <c>HatchGradientPattern</c> class as a single color gradient. /// </summary> /// <param name="color">Gradient <see cref="AciColor">color</see>.</param> /// <param name="tint">Gradient tint.</param> /// <param name="type">Gradient <see cref="HatchGradientPatternType">type</see>.</param> public HatchGradientPattern(AciColor color, double tint, HatchGradientPatternType type) : this(color, tint, type, string.Empty) { }
/// <summary> /// Initializes a new instance of the <c>HatchGradientPattern</c> class as a two color gradient. /// </summary> /// <param name="color1">Gradient <see cref="AciColor">color</see> 1.</param> /// <param name="color2">Gradient <see cref="AciColor">color</see> 2.</param> /// <param name="type">Gradient <see cref="HatchGradientPatternType">type</see>.</param> public HatchGradientPattern(AciColor color1, AciColor color2, HatchGradientPatternType type) : this(color1, color2, type, string.Empty) { }
/// <summary> /// Initializes a new instance of the <c>HatchGradientPattern</c> class as a two color gradient. /// </summary> /// <param name="color1">Gradient <see cref="AciColor">color</see> 1.</param> /// <param name="color2">Gradient <see cref="AciColor">color</see> 2.</param> /// <param name="type">Gradient <see cref="HatchGradientPatternType">type</see>.</param> /// <param name="description">Description of the pattern (optional, this information is not saved in the dxf file). By default it will use the supplied name.</param> public HatchGradientPattern(AciColor color1, AciColor color2, HatchGradientPatternType type, string description = null) : base("SOLID", description) { if (color1 == null) throw new ArgumentNullException("color1"); this.color1 = color1; if (color2 == null) throw new ArgumentNullException("color2"); this.color2 = color2; this.singleColor = false; this.gradientType = type; this.tint = 1.0; this.centered = true; }