public Layer_PartSet_Connected(IM2MStructure m2mStructure, int levelSequence) { this.m2mStructure = m2mStructure; this.levelSequence = levelSequence; positionSetDrawerPump = new PositionSetDrawerPump(this); pointCoordinateDrawer.Visible = false; connectionDrawer.LineWidth = 1; pointDrawer.IsDrawPointBorder = true; pointDrawer.PointRadius = 1; PartColor = GenerateColor.GetSimilarColor(MainColor); }
public static string getRandHex() { int[] nums = { 0, 0, 0, 0, 0, 0, 0 }; string color = ""; for (int i = 0; i < nums.Length; i++) { if (Mathf.RoundToInt(Random.Range(0, 1)) == 0) { nums[i] = Mathf.RoundToInt(Random.Range(48, 57)); } else { nums[i] = Mathf.RoundToInt(Random.Range(65, 70)); } } foreach (int i in nums) { color += GenerateColor.I2S(i); } return(color); }
public override void Draw(Graphics graphics) { if (Visible) { Color tempColor = GridColor; for (int i = m2mStructure.GetLevelNum() - 1; i > 0; i--) { layer_Grid = new Layer_Grid(m2mStructure.GetLevel(i)); layer_Grid.ScreenScaleX = this.ScreenScaleX; layer_Grid.ScreenScaleY = this.ScreenScaleY; layer_Grid.ScreenTranslationX = this.ScreenTranslationX; layer_Grid.ScreenTranslationY = this.ScreenTranslationY; layer_Grid.Visible = true; tempColor = GenerateColor.GetSimilarColor(tempColor); layer_Grid.GridLine.LineColor = Color.FromArgb(alpha, tempColor); layer_Grid.GridLine.LineWidth = (float)((m2mStructure.GetLevelNum() - i)); layer_Grid.Draw(graphics); } } }
public PointDrawer() { pointColor = GenerateColor.GetNextDifferentColor(); pointBrush = new SolidBrush(pointColor); }