public override void Draw_Bitmap(object sender, PaintEventArgs e) { e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; Graphics dc = e.Graphics; Pen pen = new Pen(color_line, 4); Point start_point; Point end_point; start_point = core.Bitmap.GetCommonPoint(state_begin, this, true); end_point = core.Bitmap.GetCommonPoint(state_end, this, false); if (DrawStyle == DrawningStyle.DrawningBezier) { dc.DrawBezier(pen, start_point, Angle1, Angle2, end_point); } else { Point[] points = { start_point, Angle1, Angle2, end_point }; dc.DrawCurve(pen, points); } dc.FillRectangle(new SolidBrush(color_mark[0]), Angle1.X - 6, Angle1.Y - 6, 12, 12); dc.FillRectangle(new SolidBrush(color_mark[1]), Angle2.X - 6, Angle2.Y - 6, 12, 12); if (string.IsNullOrEmpty(label_condition.Text) == false) { label_condition.Draw_Bitmap(sender, e); } }
public override void Draw_Bitmap(object sender, PaintEventArgs e) { e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; Graphics dc = e.Graphics; Brush brush = new SolidBrush(color_signal); dc.FillRectangle(brush, rect); label_name.Draw_Bitmap(sender, e); }
public override void Draw_Bitmap(object sender, PaintEventArgs e) { e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; Graphics dc = e.Graphics; Brush brush = new SolidBrush(color_state); dc.FillEllipse(brush, rect); dc.FillRectangle(new SolidBrush(color_marks[0]), rect.Left, rect.Top, 5, 5); dc.FillRectangle(new SolidBrush(color_marks[1]), (rect.Left + (rect.Right - rect.Left) / 2), rect.Top, 5, 5); dc.FillRectangle(new SolidBrush(color_marks[2]), rect.Right - 5, rect.Top, 5, 5); dc.FillRectangle(new SolidBrush(color_marks[5]), rect.Left, rect.Bottom - 5, 5, 5); dc.FillRectangle(new SolidBrush(color_marks[6]), (rect.Left + (rect.Right - rect.Left) / 2), rect.Bottom - 5, 5, 5); dc.FillRectangle(new SolidBrush(color_marks[7]), rect.Right - 5, rect.Bottom - 5, 5, 5); dc.FillRectangle(new SolidBrush(color_marks[3]), rect.Left, (rect.Top + (rect.Bottom - rect.Top) / 2), 5, 5); dc.FillRectangle(new SolidBrush(color_marks[4]), rect.Right - 5, (rect.Top + (rect.Bottom - rect.Top) / 2), 5, 5); label_name.Draw_Bitmap(sender, e); }