Beispiel #1
0
        public override void Paint(Graphics g, DiagramView view)
        {
            if (this.Shadowed)
            {
                SizeF ef1 = this.GetShadowOffset(view);
                if (this.Brush != null)
                {
                    Brush brush1 = this.GetShadowBrush(view);
                    if (brush1 != null)
                    {
                        GraphicsPath path1 = this.GetPath(ef1.Width, ef1.Height);
                        DiagramGraph.DrawPath(g, view, null, brush1, path1);
                        base.DisposePath(path1);
                    }
                }
                else if (this.Pen != null)
                {
                    Pen pen1 = this.GetShadowPen(view, base.InternalPenWidth);
                    if (pen1 != null)
                    {
                        GraphicsPath path2 = this.GetPath(ef1.Width, ef1.Height);
                        DiagramGraph.DrawPath(g, view, pen1, null, path2);
                        base.DisposePath(path2);
                    }
                }
            }
            GraphicsPath path3 = this.GetPath(0f, 0f);

            DiagramGraph.DrawPath(g, view, this.Pen, this.Brush, path3);
            base.DisposePath(path3);
        }
Beispiel #2
0
        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);
        }