public override void Paint(Graphics g, DiagramView view) { if (((this.Style != DiagramPortStyle.None) && (base.Parent != null)) && base.Parent.Shadowed) { RectangleF ef1 = this.Bounds; SizeF ef2 = base.Parent.GetShadowOffset(view); if (this.Brush != null) { Brush brush1 = base.Parent.GetShadowBrush(view); DiagramGraph.DrawRectangle(g, view, null, brush1, ef1.X + ef2.Width, ef1.Y + ef2.Height, ef1.Width, ef1.Height); } else if (this.Pen != null) { Pen pen1 = base.Parent.GetShadowPen(view, DiagramGraph.GetPenWidth(this.Pen)); DiagramGraph.DrawRectangle(g, view, pen1, null, ef1.X + ef2.Width, ef1.Y + ef2.Height, ef1.Width, ef1.Height); } } base.Paint(g, view); }
public virtual void PaintDecoration(Graphics g, DiagramView view) { if (this.Shadowed) { SizeF ef1 = this.GetShadowOffset(view); GraphicsPath path1 = this.GetPath(ef1.Width, ef1.Height); if (this.Brush != null) { System.Drawing.Brush brush1 = this.GetShadowBrush(view); DiagramGraph.DrawPath(g, view, null, brush1, path1); } else if (this.BorderPen != null) { Pen pen1 = this.GetShadowPen(view, DiagramGraph.GetPenWidth(this.BorderPen)); DiagramGraph.DrawPath(g, view, pen1, null, path1); } this.DisposePath(path1); } GraphicsPath path2 = this.GetPath(0f, 0f); DiagramGraph.DrawPath(g, view, this.BorderPen, this.Brush, path2); Pen pen2 = this.LinePen; if (pen2 != null) { float single1 = base.Left; float single2 = base.Top; float single3 = base.Width; float single4 = base.Height; float single5 = System.Math.Max(DiagramGraph.GetPenWidth(pen2), this.Spacing); SizeF ef2 = this.TopLeftMargin; SizeF ef3 = this.BottomRightMargin; if (this.Orientation == System.Windows.Forms.Orientation.Vertical) { float single6 = single2 + ef2.Height; float single7 = 0f; for (int num1 = 0; num1 < this.Count; num1++) { DiagramShape obj1 = this[num1]; if ((obj1 != null) && obj1.CanView()) { if (single7 > 0f) { DiagramGraph.DrawLine(g, view, pen2, single1, (single6 + single7) + (single5 / 2f), single1 + single3, (single6 + single7) + (single5 / 2f)); single7 += single5; } single7 += obj1.Height; } } } else { float single8 = single1 + ef2.Width; float single9 = 0f; for (int num2 = 0; num2 < this.Count; num2++) { DiagramShape obj2 = this[num2]; if ((obj2 != null) && obj2.CanView()) { if (single9 > 0f) { DiagramGraph.DrawLine(g, view, pen2, (single8 + single9) + (single5 / 2f), single2, (single8 + single9) + (single5 / 2f), single2 + single4); single9 += single5; } single9 += obj2.Width; } } } } this.DisposePath(path2); }