/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Family != null) { hashCode = hashCode * 59 + Family.GetHashCode(); } if (FamilyArray != null) { hashCode = hashCode * 59 + FamilyArray.GetHashCode(); } if (Size != null) { hashCode = hashCode * 59 + Size.GetHashCode(); } if (SizeArray != null) { hashCode = hashCode * 59 + SizeArray.GetHashCode(); } if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (ColorArray != null) { hashCode = hashCode * 59 + ColorArray.GetHashCode(); } if (FamilySrc != null) { hashCode = hashCode * 59 + FamilySrc.GetHashCode(); } if (SizeSrc != null) { hashCode = hashCode * 59 + SizeSrc.GetHashCode(); } if (ColorSrc != null) { hashCode = hashCode * 59 + ColorSrc.GetHashCode(); } return(hashCode); } }
/// <inheritdoc /> public bool Equals([AllowNull] Line other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Color == other.Color || Color != null && Color.Equals(other.Color) ) && ( Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray) ) && ( Width == other.Width || Width != null && Width.Equals(other.Width) ) && ( Equals(WidthArray, other.WidthArray) || WidthArray != null && other.WidthArray != null && WidthArray.SequenceEqual(other.WidthArray) ) && ( ColorSrc == other.ColorSrc || ColorSrc != null && ColorSrc.Equals(other.ColorSrc) ) && ( WidthSrc == other.WidthSrc || WidthSrc != null && WidthSrc.Equals(other.WidthSrc) )); }
/// <inheritdoc /> public bool Equals([AllowNull] Gradient other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( Equals(TypeArray, other.TypeArray) || TypeArray != null && other.TypeArray != null && TypeArray.SequenceEqual(other.TypeArray) ) && ( Color == other.Color || Color != null && Color.Equals(other.Color) ) && ( Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray) ) && ( TypeSrc == other.TypeSrc || TypeSrc != null && TypeSrc.Equals(other.TypeSrc) ) && ( ColorSrc == other.ColorSrc || ColorSrc != null && ColorSrc.Equals(other.ColorSrc) )); }
/// <summary> /// Set frames to the default state /// </summary> public void ClearFrames() { int maxRow = ChromaUtils.GetMaxRow(Device); int maxColumn = ChromaUtils.GetMaxColumn(Device); _mFrames = new ColorFrame2D[1]; var frame = new ColorFrame2D(); var rows = new ColorArray[maxRow]; for (int i = 0; i < maxRow; ++i) { rows[i] = new ColorArray(); var row = new int[maxColumn]; for (int j = 0; j < maxColumn; ++j) { row[j] = 0; } rows[i].Colors = row; } frame.Colors = rows; _mFrames[0] = frame; }
public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (TypeArray != null) { hashCode = hashCode * 59 + TypeArray.GetHashCode(); } if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (ColorArray != null) { hashCode = hashCode * 59 + ColorArray.GetHashCode(); } if (TypeSrc != null) { hashCode = hashCode * 59 + TypeSrc.GetHashCode(); } if (ColorSrc != null) { hashCode = hashCode * 59 + ColorSrc.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (ColorArray != null) { hashCode = hashCode * 59 + ColorArray.GetHashCode(); } if (Size != null) { hashCode = hashCode * 59 + Size.GetHashCode(); } if (SizeArray != null) { hashCode = hashCode * 59 + SizeArray.GetHashCode(); } if (Symbol != null) { hashCode = hashCode * 59 + Symbol.GetHashCode(); } if (SymbolArray != null) { hashCode = hashCode * 59 + SymbolArray.GetHashCode(); } if (Opacity != null) { hashCode = hashCode * 59 + Opacity.GetHashCode(); } if (OpacityArray != null) { hashCode = hashCode * 59 + OpacityArray.GetHashCode(); } if (ColorSrc != null) { hashCode = hashCode * 59 + ColorSrc.GetHashCode(); } if (SizeSrc != null) { hashCode = hashCode * 59 + SizeSrc.GetHashCode(); } if (SymbolSrc != null) { hashCode = hashCode * 59 + SymbolSrc.GetHashCode(); } if (OpacitySrc != null) { hashCode = hashCode * 59 + OpacitySrc.GetHashCode(); } return(hashCode); } }
/// <inheritdoc /> public bool Equals([AllowNull] Line other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Color == other.Color || Color != null && Color.Equals(other.Color) ) && ( Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray) ) && ( CAuto == other.CAuto || CAuto != null && CAuto.Equals(other.CAuto) ) && ( CMin == other.CMin || CMin != null && CMin.Equals(other.CMin) ) && ( CMax == other.CMax || CMax != null && CMax.Equals(other.CMax) ) && ( CMid == other.CMid || CMid != null && CMid.Equals(other.CMid) ) && ( ColorScale == other.ColorScale || ColorScale != null && ColorScale.Equals(other.ColorScale) ) && ( AutoColorScale == other.AutoColorScale || AutoColorScale != null && AutoColorScale.Equals(other.AutoColorScale) ) && ( ReverseScale == other.ReverseScale || ReverseScale != null && ReverseScale.Equals(other.ReverseScale) ) && ( ShowScale == other.ShowScale || ShowScale != null && ShowScale.Equals(other.ShowScale) ) && ( ColorBar == other.ColorBar || ColorBar != null && ColorBar.Equals(other.ColorBar) ) && ( ColorAxis == other.ColorAxis || ColorAxis != null && ColorAxis.Equals(other.ColorAxis) ) && ( Shape == other.Shape || Shape != null && Shape.Equals(other.Shape) ) && ( HoverTemplate == other.HoverTemplate || HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate) ) && ( ColorSrc == other.ColorSrc || ColorSrc != null && ColorSrc.Equals(other.ColorSrc) )); }
public void AddPoint(ColorMul color, IList<Point>Points) { if (Color_array.FindAll(z => z.color == color).Count() == 0 || Color_array.Find(z => z.color == color) == null) { ColorArray ca = new ColorArray() { color = color, points = Points.ToList()}; Color_array.Add(ca); } else { Color_array.Find(z => z.color == color).points.AddRange(Points); } }
public bool Equals([AllowNull] Line other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Color == other.Color && Color != null && other.Color != null && Color.Equals(other.Color)) && (Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray)) && (CAuto == other.CAuto && CAuto != null && other.CAuto != null && CAuto.Equals(other.CAuto)) && (CMin == other.CMin && CMin != null && other.CMin != null && CMin.Equals(other.CMin)) && (CMax == other.CMax && CMax != null && other.CMax != null && CMax.Equals(other.CMax)) && (CMid == other.CMid && CMid != null && other.CMid != null && CMid.Equals(other.CMid)) && (ColorScale == other.ColorScale && ColorScale != null && other.ColorScale != null && ColorScale.Equals(other.ColorScale)) && (AutoColorScale == other.AutoColorScale && AutoColorScale != null && other.AutoColorScale != null && AutoColorScale.Equals(other.AutoColorScale)) && (ReverseScale == other.ReverseScale && ReverseScale != null && other.ReverseScale != null && ReverseScale.Equals(other.ReverseScale)) && (ColorAxis == other.ColorAxis && ColorAxis != null && other.ColorAxis != null && ColorAxis.Equals(other.ColorAxis)) && (Width == other.Width && Width != null && other.Width != null && Width.Equals(other.Width)) && (Equals(WidthArray, other.WidthArray) || WidthArray != null && other.WidthArray != null && WidthArray.SequenceEqual(other.WidthArray)) && (ColorSrc == other.ColorSrc && ColorSrc != null && other.ColorSrc != null && ColorSrc.Equals(other.ColorSrc)) && (WidthSrc == other.WidthSrc && WidthSrc != null && other.WidthSrc != null && WidthSrc.Equals(other.WidthSrc))); }
/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Symbol != null) { hashCode = hashCode * 59 + Symbol.GetHashCode(); } if (SymbolArray != null) { hashCode = hashCode * 59 + SymbolArray.GetHashCode(); } if (Opacity != null) { hashCode = hashCode * 59 + Opacity.GetHashCode(); } if (OpacityArray != null) { hashCode = hashCode * 59 + OpacityArray.GetHashCode(); } if (Size != null) { hashCode = hashCode * 59 + Size.GetHashCode(); } if (SizeArray != null) { hashCode = hashCode * 59 + SizeArray.GetHashCode(); } if (MaxDisplayed != null) { hashCode = hashCode * 59 + MaxDisplayed.GetHashCode(); } if (SizeRef != null) { hashCode = hashCode * 59 + SizeRef.GetHashCode(); } if (SizeMin != null) { hashCode = hashCode * 59 + SizeMin.GetHashCode(); } if (SizeMode != null) { hashCode = hashCode * 59 + SizeMode.GetHashCode(); } if (Line != null) { hashCode = hashCode * 59 + Line.GetHashCode(); } if (Gradient != null) { hashCode = hashCode * 59 + Gradient.GetHashCode(); } if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (ColorArray != null) { hashCode = hashCode * 59 + ColorArray.GetHashCode(); } if (CAuto != null) { hashCode = hashCode * 59 + CAuto.GetHashCode(); } if (CMin != null) { hashCode = hashCode * 59 + CMin.GetHashCode(); } if (CMax != null) { hashCode = hashCode * 59 + CMax.GetHashCode(); } if (CMid != null) { hashCode = hashCode * 59 + CMid.GetHashCode(); } if (ColorScale != null) { hashCode = hashCode * 59 + ColorScale.GetHashCode(); } if (AutoColorScale != null) { hashCode = hashCode * 59 + AutoColorScale.GetHashCode(); } if (ReverseScale != null) { hashCode = hashCode * 59 + ReverseScale.GetHashCode(); } if (ShowScale != null) { hashCode = hashCode * 59 + ShowScale.GetHashCode(); } if (ColorBar != null) { hashCode = hashCode * 59 + ColorBar.GetHashCode(); } if (ColorAxis != null) { hashCode = hashCode * 59 + ColorAxis.GetHashCode(); } if (SymbolSrc != null) { hashCode = hashCode * 59 + SymbolSrc.GetHashCode(); } if (OpacitySrc != null) { hashCode = hashCode * 59 + OpacitySrc.GetHashCode(); } if (SizeSrc != null) { hashCode = hashCode * 59 + SizeSrc.GetHashCode(); } if (ColorSrc != null) { hashCode = hashCode * 59 + ColorSrc.GetHashCode(); } return(hashCode); } }
public bool Equals([AllowNull] Marker other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Line == other.Line && Line != null && other.Line != null && Line.Equals(other.Line)) && (Color == other.Color && Color != null && other.Color != null && Color.Equals(other.Color)) && (Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray)) && (CAuto == other.CAuto && CAuto != null && other.CAuto != null && CAuto.Equals(other.CAuto)) && (CMin == other.CMin && CMin != null && other.CMin != null && CMin.Equals(other.CMin)) && (CMax == other.CMax && CMax != null && other.CMax != null && CMax.Equals(other.CMax)) && (CMid == other.CMid && CMid != null && other.CMid != null && CMid.Equals(other.CMid)) && (ColorScale == other.ColorScale && ColorScale != null && other.ColorScale != null && ColorScale.Equals(other.ColorScale)) && (AutoColorScale == other.AutoColorScale && AutoColorScale != null && other.AutoColorScale != null && AutoColorScale.Equals(other.AutoColorScale)) && (ReverseScale == other.ReverseScale && ReverseScale != null && other.ReverseScale != null && ReverseScale.Equals(other.ReverseScale)) && (ShowScale == other.ShowScale && ShowScale != null && other.ShowScale != null && ShowScale.Equals(other.ShowScale)) && (ColorBar == other.ColorBar && ColorBar != null && other.ColorBar != null && ColorBar.Equals(other.ColorBar)) && (ColorAxis == other.ColorAxis && ColorAxis != null && other.ColorAxis != null && ColorAxis.Equals(other.ColorAxis)) && (Opacity == other.Opacity && Opacity != null && other.Opacity != null && Opacity.Equals(other.Opacity)) && (Equals(OpacityArray, other.OpacityArray) || OpacityArray != null && other.OpacityArray != null && OpacityArray.SequenceEqual(other.OpacityArray)) && (ColorSrc == other.ColorSrc && ColorSrc != null && other.ColorSrc != null && ColorSrc.Equals(other.ColorSrc)) && (OpacitySrc == other.OpacitySrc && OpacitySrc != null && other.OpacitySrc != null && OpacitySrc.Equals(other.OpacitySrc))); }
/// <inheritdoc /> public bool Equals([AllowNull] Link other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Equals(Label, other.Label) || Label != null && other.Label != null && Label.SequenceEqual(other.Label) ) && ( Color == other.Color || Color != null && Color.Equals(other.Color) ) && ( Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray) ) && ( Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData) ) && ( Line == other.Line || Line != null && Line.Equals(other.Line) ) && ( Equals(Source, other.Source) || Source != null && other.Source != null && Source.SequenceEqual(other.Source) ) && ( Equals(Target, other.Target) || Target != null && other.Target != null && Target.SequenceEqual(other.Target) ) && ( Equals(Value, other.Value) || Value != null && other.Value != null && Value.SequenceEqual(other.Value) ) && ( HoverInfo == other.HoverInfo || HoverInfo != null && HoverInfo.Equals(other.HoverInfo) ) && ( HoverLabel == other.HoverLabel || HoverLabel != null && HoverLabel.Equals(other.HoverLabel) ) && ( HoverTemplate == other.HoverTemplate || HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate) ) && ( Equals(HoverTemplateArray, other.HoverTemplateArray) || HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray) ) && ( Equals(ColorScales, other.ColorScales) || ColorScales != null && other.ColorScales != null && ColorScales.SequenceEqual(other.ColorScales) ) && ( LabelSrc == other.LabelSrc || LabelSrc != null && LabelSrc.Equals(other.LabelSrc) ) && ( ColorSrc == other.ColorSrc || ColorSrc != null && ColorSrc.Equals(other.ColorSrc) ) && ( CustomDataSrc == other.CustomDataSrc || CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc) ) && ( SourceSrc == other.SourceSrc || SourceSrc != null && SourceSrc.Equals(other.SourceSrc) ) && ( TargetSrc == other.TargetSrc || TargetSrc != null && TargetSrc.Equals(other.TargetSrc) ) && ( ValueSrc == other.ValueSrc || ValueSrc != null && ValueSrc.Equals(other.ValueSrc) ) && ( HoverTemplateSrc == other.HoverTemplateSrc || HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc) )); }
public Panel(string id, Vector2 location, Size size, Shape shape, BorderStyle style, Shapes.ShadingMode shadeMode, ColorArray colorArray) : base(id, location, size, shape, style, shadeMode, colorArray) { }
public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Color is not null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (ColorArray is not null) { hashCode = hashCode * 59 + ColorArray.GetHashCode(); } if (CAuto is not null) { hashCode = hashCode * 59 + CAuto.GetHashCode(); } if (CMin is not null) { hashCode = hashCode * 59 + CMin.GetHashCode(); } if (CMax is not null) { hashCode = hashCode * 59 + CMax.GetHashCode(); } if (CMid is not null) { hashCode = hashCode * 59 + CMid.GetHashCode(); } if (ColorScale is not null) { hashCode = hashCode * 59 + ColorScale.GetHashCode(); } if (AutoColorScale is not null) { hashCode = hashCode * 59 + AutoColorScale.GetHashCode(); } if (ReverseScale is not null) { hashCode = hashCode * 59 + ReverseScale.GetHashCode(); } if (ShowScale is not null) { hashCode = hashCode * 59 + ShowScale.GetHashCode(); } if (ColorBar is not null) { hashCode = hashCode * 59 + ColorBar.GetHashCode(); } if (ColorAxis is not null) { hashCode = hashCode * 59 + ColorAxis.GetHashCode(); } if (Symbol is not null) { hashCode = hashCode * 59 + Symbol.GetHashCode(); } if (SymbolArray is not null) { hashCode = hashCode * 59 + SymbolArray.GetHashCode(); } if (Size is not null) { hashCode = hashCode * 59 + Size.GetHashCode(); } if (SizeArray is not null) { hashCode = hashCode * 59 + SizeArray.GetHashCode(); } if (SizeRef is not null) { hashCode = hashCode * 59 + SizeRef.GetHashCode(); } if (SizeMin is not null) { hashCode = hashCode * 59 + SizeMin.GetHashCode(); } if (SizeMode is not null) { hashCode = hashCode * 59 + SizeMode.GetHashCode(); } if (Opacity is not null) { hashCode = hashCode * 59 + Opacity.GetHashCode(); } if (OpacityArray is not null) { hashCode = hashCode * 59 + OpacityArray.GetHashCode(); } if (Line is not null) { hashCode = hashCode * 59 + Line.GetHashCode(); } if (ColorSrc is not null) { hashCode = hashCode * 59 + ColorSrc.GetHashCode(); } if (SymbolSrc is not null) { hashCode = hashCode * 59 + SymbolSrc.GetHashCode(); } if (SizeSrc is not null) { hashCode = hashCode * 59 + SizeSrc.GetHashCode(); } if (OpacitySrc is not null) { hashCode = hashCode * 59 + OpacitySrc.GetHashCode(); } return(hashCode); } }
public bool Equals([AllowNull] Marker other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Color == other.Color && Color is not null && other.Color is not null && Color.Equals(other.Color)) && (Equals(ColorArray, other.ColorArray) || ColorArray is not null && other.ColorArray is not null && ColorArray.SequenceEqual(other.ColorArray)) && (CAuto == other.CAuto && CAuto is not null && other.CAuto is not null && CAuto.Equals(other.CAuto)) && (CMin == other.CMin && CMin is not null && other.CMin is not null && CMin.Equals(other.CMin)) && (CMax == other.CMax && CMax is not null && other.CMax is not null && CMax.Equals(other.CMax)) && (CMid == other.CMid && CMid is not null && other.CMid is not null && CMid.Equals(other.CMid)) && (ColorScale == other.ColorScale && ColorScale is not null && other.ColorScale is not null && ColorScale.Equals(other.ColorScale)) && (AutoColorScale == other.AutoColorScale && AutoColorScale is not null && other.AutoColorScale is not null && AutoColorScale.Equals(other.AutoColorScale)) && (ReverseScale == other.ReverseScale && ReverseScale is not null && other.ReverseScale is not null && ReverseScale.Equals(other.ReverseScale)) && (ShowScale == other.ShowScale && ShowScale is not null && other.ShowScale is not null && ShowScale.Equals(other.ShowScale)) && (ColorBar == other.ColorBar && ColorBar is not null && other.ColorBar is not null && ColorBar.Equals(other.ColorBar)) && (ColorAxis == other.ColorAxis && ColorAxis is not null && other.ColorAxis is not null && ColorAxis.Equals(other.ColorAxis)) && (Symbol == other.Symbol && Symbol is not null && other.Symbol is not null && Symbol.Equals(other.Symbol)) && (Equals(SymbolArray, other.SymbolArray) || SymbolArray is not null && other.SymbolArray is not null && SymbolArray.SequenceEqual(other.SymbolArray)) && (Size == other.Size && Size is not null && other.Size is not null && Size.Equals(other.Size)) && (Equals(SizeArray, other.SizeArray) || SizeArray is not null && other.SizeArray is not null && SizeArray.SequenceEqual(other.SizeArray)) && (SizeRef == other.SizeRef && SizeRef is not null && other.SizeRef is not null && SizeRef.Equals(other.SizeRef)) && (SizeMin == other.SizeMin && SizeMin is not null && other.SizeMin is not null && SizeMin.Equals(other.SizeMin)) && (SizeMode == other.SizeMode && SizeMode is not null && other.SizeMode is not null && SizeMode.Equals(other.SizeMode)) && (Opacity == other.Opacity && Opacity is not null && other.Opacity is not null && Opacity.Equals(other.Opacity)) && (Equals(OpacityArray, other.OpacityArray) || OpacityArray is not null && other.OpacityArray is not null && OpacityArray.SequenceEqual(other.OpacityArray)) && (Line == other.Line && Line is not null && other.Line is not null && Line.Equals(other.Line)) && (ColorSrc == other.ColorSrc && ColorSrc is not null && other.ColorSrc is not null && ColorSrc.Equals(other.ColorSrc)) && (SymbolSrc == other.SymbolSrc && SymbolSrc is not null && other.SymbolSrc is not null && SymbolSrc.Equals(other.SymbolSrc)) && (SizeSrc == other.SizeSrc && SizeSrc is not null && other.SizeSrc is not null && SizeSrc.Equals(other.SizeSrc)) && (OpacitySrc == other.OpacitySrc && OpacitySrc is not null && other.OpacitySrc is not null && OpacitySrc.Equals(other.OpacitySrc))); }
public void AddPoint(ColorMul color, int x, int y) { if (x < 0 || x >= weigth || y < 0 || y >= height) { return; } Point p = new Point() { x = x, y = y }; ColorMul oldColor = null; /*if color is new*/ if (Color_array.Select(z => z.color == color).Count() == 0 || Color_array.Find(z => z.color == color) == null) { ColorArray ca = new ColorArray() { color = color, points = new List<Point>() }; ca.points.Add(p); Color_array.Add(ca); } else { /*Check unique of point by coordinates*/ foreach (ColorArray ar in Color_array) { if (ar.points.Contains(p)) { oldColor = ar.color; break; } } if (oldColor == color) { /*it means that point already exists with the same color*/ /*do nothing*/ } else if (oldColor == null) { /*it means that point is new and we need add it*/ Color_array.Find(z => z.color == color).points.Add(p); } else { /*point exist with another color. It means we need to change color of the point*/ Color_array.Find(z => z.color == oldColor).points.Remove(p); Color_array.Find(z => z.color == color).points.Add(p); } } }
public XmlColorArray(ColorArray colorArray) { xmlColorArray = new XmlColor[ColorArray.ColorCount]; for (int i = 0; i < ColorArray.ColorCount; i++) { xmlColorArray[i] = new XmlColor { StateIndex = (StateIndex) i, ColorValue = colorArray[(StateIndex) i].ToArgb().ToString("{0:X8}") }; } }
/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Label != null) { hashCode = hashCode * 59 + Label.GetHashCode(); } if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (ColorArray != null) { hashCode = hashCode * 59 + ColorArray.GetHashCode(); } if (CustomData != null) { hashCode = hashCode * 59 + CustomData.GetHashCode(); } if (Line != null) { hashCode = hashCode * 59 + Line.GetHashCode(); } if (Source != null) { hashCode = hashCode * 59 + Source.GetHashCode(); } if (Target != null) { hashCode = hashCode * 59 + Target.GetHashCode(); } if (Value != null) { hashCode = hashCode * 59 + Value.GetHashCode(); } if (HoverInfo != null) { hashCode = hashCode * 59 + HoverInfo.GetHashCode(); } if (HoverLabel != null) { hashCode = hashCode * 59 + HoverLabel.GetHashCode(); } if (HoverTemplate != null) { hashCode = hashCode * 59 + HoverTemplate.GetHashCode(); } if (HoverTemplateArray != null) { hashCode = hashCode * 59 + HoverTemplateArray.GetHashCode(); } if (ColorScales != null) { hashCode = hashCode * 59 + ColorScales.GetHashCode(); } if (LabelSrc != null) { hashCode = hashCode * 59 + LabelSrc.GetHashCode(); } if (ColorSrc != null) { hashCode = hashCode * 59 + ColorSrc.GetHashCode(); } if (CustomDataSrc != null) { hashCode = hashCode * 59 + CustomDataSrc.GetHashCode(); } if (SourceSrc != null) { hashCode = hashCode * 59 + SourceSrc.GetHashCode(); } if (TargetSrc != null) { hashCode = hashCode * 59 + TargetSrc.GetHashCode(); } if (ValueSrc != null) { hashCode = hashCode * 59 + ValueSrc.GetHashCode(); } if (HoverTemplateSrc != null) { hashCode = hashCode * 59 + HoverTemplateSrc.GetHashCode(); } return(hashCode); } }
/// <inheritdoc /> public bool Equals([AllowNull] Node other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Equals(Label, other.Label) || Label != null && other.Label != null && Label.SequenceEqual(other.Label) ) && ( Equals(Groups, other.Groups) || Groups != null && other.Groups != null && Groups.SequenceEqual(other.Groups) ) && ( Equals(X, other.X) || X != null && other.X != null && X.SequenceEqual(other.X) ) && ( Equals(Y, other.Y) || Y != null && other.Y != null && Y.SequenceEqual(other.Y) ) && ( Color == other.Color || Color != null && Color.Equals(other.Color) ) && ( Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray) ) && ( Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData) ) && ( Line == other.Line || Line != null && Line.Equals(other.Line) ) && ( Pad == other.Pad || Pad != null && Pad.Equals(other.Pad) ) && ( Thickness == other.Thickness || Thickness != null && Thickness.Equals(other.Thickness) ) && ( HoverInfo == other.HoverInfo || HoverInfo != null && HoverInfo.Equals(other.HoverInfo) ) && ( HoverLabel == other.HoverLabel || HoverLabel != null && HoverLabel.Equals(other.HoverLabel) ) && ( HoverTemplate == other.HoverTemplate || HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate) ) && ( Equals(HoverTemplateArray, other.HoverTemplateArray) || HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray) ) && ( LabelSrc == other.LabelSrc || LabelSrc != null && LabelSrc.Equals(other.LabelSrc) ) && ( XSrc == other.XSrc || XSrc != null && XSrc.Equals(other.XSrc) ) && ( YSrc == other.YSrc || YSrc != null && YSrc.Equals(other.YSrc) ) && ( ColorSrc == other.ColorSrc || ColorSrc != null && ColorSrc.Equals(other.ColorSrc) ) && ( CustomDataSrc == other.CustomDataSrc || CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc) ) && ( HoverTemplateSrc == other.HoverTemplateSrc || HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc) )); }
public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Line != null) { hashCode = hashCode * 59 + Line.GetHashCode(); } if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (ColorArray != null) { hashCode = hashCode * 59 + ColorArray.GetHashCode(); } if (CAuto != null) { hashCode = hashCode * 59 + CAuto.GetHashCode(); } if (CMin != null) { hashCode = hashCode * 59 + CMin.GetHashCode(); } if (CMax != null) { hashCode = hashCode * 59 + CMax.GetHashCode(); } if (CMid != null) { hashCode = hashCode * 59 + CMid.GetHashCode(); } if (ColorScale != null) { hashCode = hashCode * 59 + ColorScale.GetHashCode(); } if (AutoColorScale != null) { hashCode = hashCode * 59 + AutoColorScale.GetHashCode(); } if (ReverseScale != null) { hashCode = hashCode * 59 + ReverseScale.GetHashCode(); } if (ShowScale != null) { hashCode = hashCode * 59 + ShowScale.GetHashCode(); } if (ColorBar != null) { hashCode = hashCode * 59 + ColorBar.GetHashCode(); } if (ColorAxis != null) { hashCode = hashCode * 59 + ColorAxis.GetHashCode(); } if (Opacity != null) { hashCode = hashCode * 59 + Opacity.GetHashCode(); } if (OpacityArray != null) { hashCode = hashCode * 59 + OpacityArray.GetHashCode(); } if (ColorSrc != null) { hashCode = hashCode * 59 + ColorSrc.GetHashCode(); } if (OpacitySrc != null) { hashCode = hashCode * 59 + OpacitySrc.GetHashCode(); } return(hashCode); } }
/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Label != null) { hashCode = hashCode * 59 + Label.GetHashCode(); } if (Groups != null) { hashCode = hashCode * 59 + Groups.GetHashCode(); } if (X != null) { hashCode = hashCode * 59 + X.GetHashCode(); } if (Y != null) { hashCode = hashCode * 59 + Y.GetHashCode(); } if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (ColorArray != null) { hashCode = hashCode * 59 + ColorArray.GetHashCode(); } if (CustomData != null) { hashCode = hashCode * 59 + CustomData.GetHashCode(); } if (Line != null) { hashCode = hashCode * 59 + Line.GetHashCode(); } if (Pad != null) { hashCode = hashCode * 59 + Pad.GetHashCode(); } if (Thickness != null) { hashCode = hashCode * 59 + Thickness.GetHashCode(); } if (HoverInfo != null) { hashCode = hashCode * 59 + HoverInfo.GetHashCode(); } if (HoverLabel != null) { hashCode = hashCode * 59 + HoverLabel.GetHashCode(); } if (HoverTemplate != null) { hashCode = hashCode * 59 + HoverTemplate.GetHashCode(); } if (HoverTemplateArray != null) { hashCode = hashCode * 59 + HoverTemplateArray.GetHashCode(); } if (LabelSrc != null) { hashCode = hashCode * 59 + LabelSrc.GetHashCode(); } if (XSrc != null) { hashCode = hashCode * 59 + XSrc.GetHashCode(); } if (YSrc != null) { hashCode = hashCode * 59 + YSrc.GetHashCode(); } if (ColorSrc != null) { hashCode = hashCode * 59 + ColorSrc.GetHashCode(); } if (CustomDataSrc != null) { hashCode = hashCode * 59 + CustomDataSrc.GetHashCode(); } if (HoverTemplateSrc != null) { hashCode = hashCode * 59 + HoverTemplateSrc.GetHashCode(); } return(hashCode); } }
/// <inheritdoc /> public bool Equals([AllowNull] Marker other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Symbol == other.Symbol || Symbol != null && Symbol.Equals(other.Symbol) ) && ( Equals(SymbolArray, other.SymbolArray) || SymbolArray != null && other.SymbolArray != null && SymbolArray.SequenceEqual(other.SymbolArray) ) && ( Opacity == other.Opacity || Opacity != null && Opacity.Equals(other.Opacity) ) && ( Equals(OpacityArray, other.OpacityArray) || OpacityArray != null && other.OpacityArray != null && OpacityArray.SequenceEqual(other.OpacityArray) ) && ( Size == other.Size || Size != null && Size.Equals(other.Size) ) && ( Equals(SizeArray, other.SizeArray) || SizeArray != null && other.SizeArray != null && SizeArray.SequenceEqual(other.SizeArray) ) && ( MaxDisplayed == other.MaxDisplayed || MaxDisplayed != null && MaxDisplayed.Equals(other.MaxDisplayed) ) && ( SizeRef == other.SizeRef || SizeRef != null && SizeRef.Equals(other.SizeRef) ) && ( SizeMin == other.SizeMin || SizeMin != null && SizeMin.Equals(other.SizeMin) ) && ( SizeMode == other.SizeMode || SizeMode != null && SizeMode.Equals(other.SizeMode) ) && ( Line == other.Line || Line != null && Line.Equals(other.Line) ) && ( Gradient == other.Gradient || Gradient != null && Gradient.Equals(other.Gradient) ) && ( Color == other.Color || Color != null && Color.Equals(other.Color) ) && ( Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray) ) && ( CAuto == other.CAuto || CAuto != null && CAuto.Equals(other.CAuto) ) && ( CMin == other.CMin || CMin != null && CMin.Equals(other.CMin) ) && ( CMax == other.CMax || CMax != null && CMax.Equals(other.CMax) ) && ( CMid == other.CMid || CMid != null && CMid.Equals(other.CMid) ) && ( ColorScale == other.ColorScale || ColorScale != null && ColorScale.Equals(other.ColorScale) ) && ( AutoColorScale == other.AutoColorScale || AutoColorScale != null && AutoColorScale.Equals(other.AutoColorScale) ) && ( ReverseScale == other.ReverseScale || ReverseScale != null && ReverseScale.Equals(other.ReverseScale) ) && ( ShowScale == other.ShowScale || ShowScale != null && ShowScale.Equals(other.ShowScale) ) && ( ColorBar == other.ColorBar || ColorBar != null && ColorBar.Equals(other.ColorBar) ) && ( ColorAxis == other.ColorAxis || ColorAxis != null && ColorAxis.Equals(other.ColorAxis) ) && ( SymbolSrc == other.SymbolSrc || SymbolSrc != null && SymbolSrc.Equals(other.SymbolSrc) ) && ( OpacitySrc == other.OpacitySrc || OpacitySrc != null && OpacitySrc.Equals(other.OpacitySrc) ) && ( SizeSrc == other.SizeSrc || SizeSrc != null && SizeSrc.Equals(other.SizeSrc) ) && ( ColorSrc == other.ColorSrc || ColorSrc != null && ColorSrc.Equals(other.ColorSrc) )); }
public bool Equals([AllowNull] Marker other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Symbol == other.Symbol && Symbol != null && other.Symbol != null && Symbol.Equals(other.Symbol)) && (Equals(SymbolArray, other.SymbolArray) || SymbolArray != null && other.SymbolArray != null && SymbolArray.SequenceEqual(other.SymbolArray)) && (Angle == other.Angle && Angle != null && other.Angle != null && Angle.Equals(other.Angle)) && (Equals(AngleArray, other.AngleArray) || AngleArray != null && other.AngleArray != null && AngleArray.SequenceEqual(other.AngleArray)) && (AllowOverlap == other.AllowOverlap && AllowOverlap != null && other.AllowOverlap != null && AllowOverlap.Equals(other.AllowOverlap)) && (Opacity == other.Opacity && Opacity != null && other.Opacity != null && Opacity.Equals(other.Opacity)) && (Equals(OpacityArray, other.OpacityArray) || OpacityArray != null && other.OpacityArray != null && OpacityArray.SequenceEqual(other.OpacityArray)) && (Size == other.Size && Size != null && other.Size != null && Size.Equals(other.Size)) && (Equals(SizeArray, other.SizeArray) || SizeArray != null && other.SizeArray != null && SizeArray.SequenceEqual(other.SizeArray)) && (SizeRef == other.SizeRef && SizeRef != null && other.SizeRef != null && SizeRef.Equals(other.SizeRef)) && (SizeMin == other.SizeMin && SizeMin != null && other.SizeMin != null && SizeMin.Equals(other.SizeMin)) && (SizeMode == other.SizeMode && SizeMode != null && other.SizeMode != null && SizeMode.Equals(other.SizeMode)) && (Color == other.Color && Color != null && other.Color != null && Color.Equals(other.Color)) && (Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray)) && (CAuto == other.CAuto && CAuto != null && other.CAuto != null && CAuto.Equals(other.CAuto)) && (CMin == other.CMin && CMin != null && other.CMin != null && CMin.Equals(other.CMin)) && (CMax == other.CMax && CMax != null && other.CMax != null && CMax.Equals(other.CMax)) && (CMid == other.CMid && CMid != null && other.CMid != null && CMid.Equals(other.CMid)) && (ColorScale == other.ColorScale && ColorScale != null && other.ColorScale != null && ColorScale.Equals(other.ColorScale)) && (AutoColorScale == other.AutoColorScale && AutoColorScale != null && other.AutoColorScale != null && AutoColorScale.Equals(other.AutoColorScale)) && (ReverseScale == other.ReverseScale && ReverseScale != null && other.ReverseScale != null && ReverseScale.Equals(other.ReverseScale)) && (ShowScale == other.ShowScale && ShowScale != null && other.ShowScale != null && ShowScale.Equals(other.ShowScale)) && (ColorBar == other.ColorBar && ColorBar != null && other.ColorBar != null && ColorBar.Equals(other.ColorBar)) && (ColorAxis == other.ColorAxis && ColorAxis != null && other.ColorAxis != null && ColorAxis.Equals(other.ColorAxis)) && (SymbolSrc == other.SymbolSrc && SymbolSrc != null && other.SymbolSrc != null && SymbolSrc.Equals(other.SymbolSrc)) && (AngleSrc == other.AngleSrc && AngleSrc != null && other.AngleSrc != null && AngleSrc.Equals(other.AngleSrc)) && (OpacitySrc == other.OpacitySrc && OpacitySrc != null && other.OpacitySrc != null && OpacitySrc.Equals(other.OpacitySrc)) && (SizeSrc == other.SizeSrc && SizeSrc != null && other.SizeSrc != null && SizeSrc.Equals(other.SizeSrc)) && (ColorSrc == other.ColorSrc && ColorSrc != null && other.ColorSrc != null && ColorSrc.Equals(other.ColorSrc))); }
/// <summary>Creates a new instance of <see cref="ColorValue" />.</summary> /// <param name="value">The value.</param> public ColorValue(ColorArray value) : base(value, typeof(ColorArray)) { valueColorArray = value; }
public bool Equals([AllowNull] Font other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Family == other.Family && Family != null && other.Family != null && Family.Equals(other.Family)) && (Equals(FamilyArray, other.FamilyArray) || FamilyArray != null && other.FamilyArray != null && FamilyArray.SequenceEqual(other.FamilyArray)) && (Size == other.Size && Size != null && other.Size != null && Size.Equals(other.Size)) && (Equals(SizeArray, other.SizeArray) || SizeArray != null && other.SizeArray != null && SizeArray.SequenceEqual(other.SizeArray)) && (Color == other.Color && Color != null && other.Color != null && Color.Equals(other.Color)) && (Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray)) && (FamilySrc == other.FamilySrc && FamilySrc != null && other.FamilySrc != null && FamilySrc.Equals(other.FamilySrc)) && (SizeSrc == other.SizeSrc && SizeSrc != null && other.SizeSrc != null && SizeSrc.Equals(other.SizeSrc)) && (ColorSrc == other.ColorSrc && ColorSrc != null && other.ColorSrc != null && ColorSrc.Equals(other.ColorSrc))); }
public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (ColorArray != null) { hashCode = hashCode * 59 + ColorArray.GetHashCode(); } if (CAuto != null) { hashCode = hashCode * 59 + CAuto.GetHashCode(); } if (CMin != null) { hashCode = hashCode * 59 + CMin.GetHashCode(); } if (CMax != null) { hashCode = hashCode * 59 + CMax.GetHashCode(); } if (CMid != null) { hashCode = hashCode * 59 + CMid.GetHashCode(); } if (ColorScale != null) { hashCode = hashCode * 59 + ColorScale.GetHashCode(); } if (AutoColorScale != null) { hashCode = hashCode * 59 + AutoColorScale.GetHashCode(); } if (ReverseScale != null) { hashCode = hashCode * 59 + ReverseScale.GetHashCode(); } if (ColorAxis != null) { hashCode = hashCode * 59 + ColorAxis.GetHashCode(); } if (Width != null) { hashCode = hashCode * 59 + Width.GetHashCode(); } if (WidthArray != null) { hashCode = hashCode * 59 + WidthArray.GetHashCode(); } if (ColorSrc != null) { hashCode = hashCode * 59 + ColorSrc.GetHashCode(); } if (WidthSrc != null) { hashCode = hashCode * 59 + WidthSrc.GetHashCode(); } return(hashCode); } }
/// <inheritdoc /> public bool Equals([AllowNull] Marker other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Color == other.Color || Color != null && Color.Equals(other.Color) ) && ( Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray) ) && ( Size == other.Size || Size != null && Size.Equals(other.Size) ) && ( Equals(SizeArray, other.SizeArray) || SizeArray != null && other.SizeArray != null && SizeArray.SequenceEqual(other.SizeArray) ) && ( Symbol == other.Symbol || Symbol != null && Symbol.Equals(other.Symbol) ) && ( Equals(SymbolArray, other.SymbolArray) || SymbolArray != null && other.SymbolArray != null && SymbolArray.SequenceEqual(other.SymbolArray) ) && ( Opacity == other.Opacity || Opacity != null && Opacity.Equals(other.Opacity) ) && ( Equals(OpacityArray, other.OpacityArray) || OpacityArray != null && other.OpacityArray != null && OpacityArray.SequenceEqual(other.OpacityArray) ) && ( ColorSrc == other.ColorSrc || ColorSrc != null && ColorSrc.Equals(other.ColorSrc) ) && ( SizeSrc == other.SizeSrc || SizeSrc != null && SizeSrc.Equals(other.SizeSrc) ) && ( SymbolSrc == other.SymbolSrc || SymbolSrc != null && SymbolSrc.Equals(other.SymbolSrc) ) && ( OpacitySrc == other.OpacitySrc || OpacitySrc != null && OpacitySrc.Equals(other.OpacitySrc) )); }
public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Symbol != null) { hashCode = hashCode * 59 + Symbol.GetHashCode(); } if (SymbolArray != null) { hashCode = hashCode * 59 + SymbolArray.GetHashCode(); } if (Angle != null) { hashCode = hashCode * 59 + Angle.GetHashCode(); } if (AngleArray != null) { hashCode = hashCode * 59 + AngleArray.GetHashCode(); } if (AllowOverlap != null) { hashCode = hashCode * 59 + AllowOverlap.GetHashCode(); } if (Opacity != null) { hashCode = hashCode * 59 + Opacity.GetHashCode(); } if (OpacityArray != null) { hashCode = hashCode * 59 + OpacityArray.GetHashCode(); } if (Size != null) { hashCode = hashCode * 59 + Size.GetHashCode(); } if (SizeArray != null) { hashCode = hashCode * 59 + SizeArray.GetHashCode(); } if (SizeRef != null) { hashCode = hashCode * 59 + SizeRef.GetHashCode(); } if (SizeMin != null) { hashCode = hashCode * 59 + SizeMin.GetHashCode(); } if (SizeMode != null) { hashCode = hashCode * 59 + SizeMode.GetHashCode(); } if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (ColorArray != null) { hashCode = hashCode * 59 + ColorArray.GetHashCode(); } if (CAuto != null) { hashCode = hashCode * 59 + CAuto.GetHashCode(); } if (CMin != null) { hashCode = hashCode * 59 + CMin.GetHashCode(); } if (CMax != null) { hashCode = hashCode * 59 + CMax.GetHashCode(); } if (CMid != null) { hashCode = hashCode * 59 + CMid.GetHashCode(); } if (ColorScale != null) { hashCode = hashCode * 59 + ColorScale.GetHashCode(); } if (AutoColorScale != null) { hashCode = hashCode * 59 + AutoColorScale.GetHashCode(); } if (ReverseScale != null) { hashCode = hashCode * 59 + ReverseScale.GetHashCode(); } if (ShowScale != null) { hashCode = hashCode * 59 + ShowScale.GetHashCode(); } if (ColorBar != null) { hashCode = hashCode * 59 + ColorBar.GetHashCode(); } if (ColorAxis != null) { hashCode = hashCode * 59 + ColorAxis.GetHashCode(); } if (SymbolSrc != null) { hashCode = hashCode * 59 + SymbolSrc.GetHashCode(); } if (AngleSrc != null) { hashCode = hashCode * 59 + AngleSrc.GetHashCode(); } if (OpacitySrc != null) { hashCode = hashCode * 59 + OpacitySrc.GetHashCode(); } if (SizeSrc != null) { hashCode = hashCode * 59 + SizeSrc.GetHashCode(); } if (ColorSrc != null) { hashCode = hashCode * 59 + ColorSrc.GetHashCode(); } return(hashCode); } }
public bool Equals([AllowNull] Fill other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Color == other.Color && Color != null && other.Color != null && Color.Equals(other.Color)) && (Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray)) && (ColorSrc == other.ColorSrc && ColorSrc != null && other.ColorSrc != null && ColorSrc.Equals(other.ColorSrc))); }
public void UpdateGeometry() { if (VertexArray == null) { return; } int updateThreadID = GlobalEnvironment.UpdateThreadID; int curThreadID = System.Threading.Thread.CurrentThread.ManagedThreadId; if (updateThreadID != curThreadID) { return; } VdsVec3d[] vArray = VertexArray.ToArray(); VdsVec3d[] nArray = null; if (NormalArray != null) { nArray = NormalArray.ToArray(); } else { nArray = new VdsVec3d[0]; } VdsVec4d[] cArray = null; if (ColorArray != null) { cArray = ColorArray.ToArray(); } else { cArray = new VdsVec4d[0]; } VdsVec2d[] tArray = null; if (TexCoordArray != null) { tArray = TexCoordArray.ToArray(); } else { tArray = new VdsVec2d[0]; } VdsVec4d[] maturalArray = null; if (AmbientMatural == null && DiffuseMatural == null && SpecularMatural == null && EmissionMatural == null) { maturalArray = new VdsVec4d[0]; } else { maturalArray = new VdsVec4d[4]; if (AmbientMatural == null) { maturalArray[0] = new VdsVec4d(0.8, 0.8, 0.8, 1.0); } else { maturalArray[0] = AmbientMatural; } if (DiffuseMatural == null) { maturalArray[1] = new VdsVec4d(0.9, 0.9, 0.9, 1.0); } else { maturalArray[1] = DiffuseMatural; } if (SpecularMatural == null) { maturalArray[2] = new VdsVec4d(0.95, 0.95, 0.95, 1.0); } else { maturalArray[2] = SpecularMatural; } if (EmissionMatural == null) { maturalArray[3] = new VdsVec4d(0.1, 0.1, 0.1, 1.0); } else { maturalArray[3] = EmissionMatural; } } string tFileName = ""; if (TextureFileName != null) { tFileName = TextureFileName; } int drawMode = 0; switch (DrawMode) { case GeometryDrawModel.POINTS: drawMode = 0; break; case GeometryDrawModel.LINES: drawMode = 1; break; case GeometryDrawModel.LINE_STRIP: drawMode = 3; break; case GeometryDrawModel.LINE_LOOP: drawMode = 2; break; case GeometryDrawModel.TRIANGLES: drawMode = 4; break; case GeometryDrawModel.TRIANGLE_STRIP: drawMode = 5; break; case GeometryDrawModel.TRIANGLE_FAN: drawMode = 6; break; case GeometryDrawModel.QUADS: drawMode = 7; break; case GeometryDrawModel.QUAD_STRIP: drawMode = 8; break; } IUpdateGeometry(this.NativeHandle, vArray, nArray, cArray, tArray, drawMode, (int)CullFaceMode, tFileName, maturalArray); }
/// <summary> /// Creates a new color with the same values as this color /// </summary> /// <returns>A copy of this color</returns> public Color Copy() { switch (this.Model) { case ColorModel.CIELab: return(new ColorLab(wp.Copy(), ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.CIELuv: return(new ColorLuv(wp.Copy(), ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.CIEXYZ: return(new ColorXYZ(wp.Copy(), ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.CIEYxy: return(new ColorYxy(wp.Copy(), ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.CIELCHab: return(new ColorLCHab(wp.Copy(), ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.CIELCHuv: return(new ColorLCHuv(wp.Copy(), ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.LCH99: return(new ColorLCH99(ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.LCH99b: return(new ColorLCH99b(ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.LCH99c: return(new ColorLCH99c(ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.LCH99d: return(new ColorLCH99d(ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.DEF: return(new ColorDEF(ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.Bef: return(new ColorBef(ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.BCH: return(new ColorBCH(ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.Gray: if (ICC_Profile == null) { return(new ColorGray(ICC_Profile, ColorValues[0])); } else { return(new ColorGray(wp.Copy(), ColorValues[0])); } case ColorModel.RGB: if (ICC_Profile == null) { return(new ColorRGB(((ColorRGB)this).Space.Name, ColorValues[0], ColorValues[1], ColorValues[2])); } else { return(new ColorRGB(ICC_Profile, ColorValues[0], ColorValues[1], ColorValues[2])); } case ColorModel.HSL: if (ICC_Profile == null) { return(new ColorHSL(((ColorHSL)this).Space.Name, ColorValues[0], ColorValues[1], ColorValues[2])); } else { return(new ColorHSL(ICC_Profile, ColorValues[0], ColorValues[1], ColorValues[2])); } case ColorModel.HSV: if (ICC_Profile == null) { return(new ColorHSV(((ColorHSV)this).Space.Name, ColorValues[0], ColorValues[1], ColorValues[2])); } else { return(new ColorHSV(ICC_Profile, ColorValues[0], ColorValues[1], ColorValues[2])); } case ColorModel.YCbCr: if (ICC_Profile == null) { return(new ColorYCbCr(((ColorYCbCr)this).Space.Name, ((ColorYCbCr)this).BaseSpace.Name, ColorValues[0], ColorValues[1], ColorValues[2])); } else { return(new ColorYCbCr(ICC_Profile, ColorValues[0], ColorValues[1], ColorValues[2])); } case ColorModel.CMY: return(new ColorCMY(ICC_Profile, ColorValues[0], ColorValues[1], ColorValues[2])); case ColorModel.CMYK: return(new ColorCMYK(ICC_Profile, ColorValues[0], ColorValues[1], ColorValues[2], ColorValues[3])); case ColorModel.Color2: case ColorModel.Color3: case ColorModel.Color4: case ColorModel.Color5: case ColorModel.Color6: case ColorModel.Color7: case ColorModel.Color8: case ColorModel.Color9: case ColorModel.Color10: case ColorModel.Color11: case ColorModel.Color12: case ColorModel.Color13: case ColorModel.Color14: case ColorModel.Color15: return(new ColorX(ICC_Profile, (double[])ColorArray.Clone())); default: throw new NotImplementedException(); } }
/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (ColorArray != null) { hashCode = hashCode * 59 + ColorArray.GetHashCode(); } if (CAuto != null) { hashCode = hashCode * 59 + CAuto.GetHashCode(); } if (CMin != null) { hashCode = hashCode * 59 + CMin.GetHashCode(); } if (CMax != null) { hashCode = hashCode * 59 + CMax.GetHashCode(); } if (CMid != null) { hashCode = hashCode * 59 + CMid.GetHashCode(); } if (ColorScale != null) { hashCode = hashCode * 59 + ColorScale.GetHashCode(); } if (AutoColorScale != null) { hashCode = hashCode * 59 + AutoColorScale.GetHashCode(); } if (ReverseScale != null) { hashCode = hashCode * 59 + ReverseScale.GetHashCode(); } if (ShowScale != null) { hashCode = hashCode * 59 + ShowScale.GetHashCode(); } if (ColorBar != null) { hashCode = hashCode * 59 + ColorBar.GetHashCode(); } if (ColorAxis != null) { hashCode = hashCode * 59 + ColorAxis.GetHashCode(); } if (Shape != null) { hashCode = hashCode * 59 + Shape.GetHashCode(); } if (HoverTemplate != null) { hashCode = hashCode * 59 + HoverTemplate.GetHashCode(); } if (ColorSrc != null) { hashCode = hashCode * 59 + ColorSrc.GetHashCode(); } return(hashCode); } }
public DefaultShapeControl(string id, Vector2 position, Size size, Shape shape, BorderStyle style, Shapes.ShadingMode shadeMode, ColorArray colorArray) : base(id, position, size, shape, style, shadeMode, colorArray) { shapeDescriptors = new ShapeDescriptor[1]; }