public override void Paint(Graphics g, DiagramView view) { RectangleF ef1 = this.Bounds; switch (this.Style) { case ShapeStyle.None: { return; } case ShapeStyle.Ellipse: { DiagramGraph.DrawEllipse(g, view, this.Pen, this.Brush, ef1.X, ef1.Y, ef1.Width, ef1.Height); return; } case ShapeStyle.Diamond: { PointF[] tfArray1 = view.AllocTempPointArray(4); tfArray1[0].X = ef1.X + (ef1.Width / 2f); tfArray1[0].Y = ef1.Y; tfArray1[1].X = ef1.X + ef1.Width; tfArray1[1].Y = ef1.Y + (ef1.Height / 2f); tfArray1[2].X = tfArray1[0].X; tfArray1[2].Y = ef1.Y + ef1.Height; tfArray1[3].X = ef1.X; tfArray1[3].Y = tfArray1[1].Y; DiagramGraph.DrawPolygon(g, view, this.Pen, this.Brush, tfArray1); view.FreeTempPointArray(tfArray1); return; } case ShapeStyle.TriangleTopLeft: case ShapeStyle.TriangleTopRight: case ShapeStyle.TriangleBottomRight: case ShapeStyle.TriangleBottomLeft: case ShapeStyle.TriangleMiddleTop: case ShapeStyle.TriangleMiddleRight: case ShapeStyle.TriangleMiddleBottom: case ShapeStyle.TriangleMiddleLeft: { PointF[] tfArray2 = view.AllocTempPointArray(3); this.ComputeTrianglePoints(tfArray2); DiagramGraph.DrawPolygon(g, view, this.Pen, this.Brush, tfArray2); view.FreeTempPointArray(tfArray2); return; } } DiagramGraph.DrawRectangle(g, view, this.Pen, this.Brush, ef1.X, ef1.Y, ef1.Width, ef1.Height); }
public override void Paint(Graphics g, DiagramView view) { RectangleF ef1 = this.Bounds; if (this.Shadowed) { SizeF ef2 = this.GetShadowOffset(view); if (this.Brush != null) { Brush brush1 = this.GetShadowBrush(view); DiagramGraph.DrawEllipse(g, view, null, brush1, ef1.X + ef2.Width, ef1.Y + ef2.Height, ef1.Width, ef1.Height); } else if (this.Pen != null) { Pen pen1 = this.GetShadowPen(view, base.InternalPenWidth); DiagramGraph.DrawEllipse(g, view, pen1, null, ef1.X + ef2.Width, ef1.Y + ef2.Height, ef1.Width, ef1.Height); } } DiagramGraph.DrawEllipse(g, view, this.Pen, this.Brush, ef1.X, ef1.Y, ef1.Width, ef1.Height); }
protected virtual void PaintHandle(Graphics g, DiagramView view) { SubGraphNode graph1 = base.Parent as SubGraphNode; if (graph1 != null) { RectangleF ef1 = this.Bounds; if (graph1.Collapsible) { float single1 = ef1.Y + (ef1.Height / 2f); DiagramGraph.DrawLine(g, view, this.Pen, ef1.X + (ef1.Width / 4f), single1, ef1.X + ((ef1.Width * 3f) / 4f), single1); if (graph1.IsExpanded) { return; } float single2 = ef1.X + (ef1.Width / 2f); DiagramGraph.DrawLine(g, view, this.Pen, single2, ef1.Y + (ef1.Height / 4f), single2, ef1.Y + ((ef1.Height * 3f) / 4f)); } else { DiagramGraph.DrawEllipse(g, view, this.Pen, null, ef1.X + (ef1.Width / 4f), ef1.Y + (ef1.Height / 4f), ef1.Width / 2f, ef1.Height / 2f); } } }