当前位置: 首页>>代码示例>>C#>>正文


C# MethodData.getColumnRightX方法代码示例

本文整理汇总了C#中MethodData.getColumnRightX方法的典型用法代码示例。如果您正苦于以下问题:C# MethodData.getColumnRightX方法的具体用法?C# MethodData.getColumnRightX怎么用?C# MethodData.getColumnRightX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MethodData的用法示例。


在下文中一共展示了MethodData.getColumnRightX方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: drawStartArrow

        void drawStartArrow(Graphics g, MethodData d1, MethodData d2, float y, String title)
        {
            Pen p = new Pen(getThreadColor(d1.methodEvent.ThreadID), 2 * zoomScale);

            if (d1.classData == d2.classData)
            {
                float arrowWidth = 5 * zoomScale;

                g.DrawLine(p, d1.getColumnRightX(), y + 8 * zoomScale, d1.getColumnRightX() + 20 * zoomScale, y + 8 * zoomScale);
                g.DrawLine(p, d1.getColumnRightX() + 20 * zoomScale, y + 8 * zoomScale, d1.getColumnRightX() + 20 * zoomScale, y - 8 * zoomScale);
                g.DrawLine(p, d1.getColumnRightX() + 20 * zoomScale, y - 8 * zoomScale, d2.getColumnRightX(), y - 8 * zoomScale);

                g.DrawLine(p, d1.getColumnRightX() + arrowWidth, y + 3 * zoomScale, d1.getColumnRightX(), y + 8 * zoomScale);
                g.DrawLine(p, d1.getColumnRightX() + arrowWidth, y + 13 * zoomScale, d1.getColumnRightX(), y + 8 * zoomScale);

                if (zoomScale >= 0.6)
                    g.DrawString(title, new Font("Tahoma", 7 * zoomScale), Brushes.Black, d2.getColumnRightX() + 5 * zoomScale, y - 23 * zoomScale);

                return;
            }
            else
            {
                y += 5 * zoomScale;

                float x2 = d1.getColumnLeftX();
                float x1 = d2.getColumnRightX();

                g.DrawLine(p, x1, y, x2, y);

                float arrowWidth = 5 * zoomScale;

                if (x1 < x2)
                {
                    g.DrawLine(p, x2 - arrowWidth, y - arrowWidth, x2, y);
                    g.DrawLine(p, x2 - arrowWidth, y + arrowWidth, x2, y);
                    if (zoomScale >= 0.6)
                    g.DrawString(title, new Font("Tahoma", 7 * zoomScale), Brushes.Black, x1 + arrowWidth, y - 15 * zoomScale);
                }
                else
                {
                    g.DrawLine(p, x2 + arrowWidth, y - arrowWidth, x2, y);
                    g.DrawLine(p, x2 + arrowWidth, y + arrowWidth, x2, y);
                    if (zoomScale >= 0.6)
                    g.DrawString(title, new Font("Tahoma", 7 * zoomScale), Brushes.Black, x1 - arrowWidth, y - 15 * zoomScale);
                }
            }
        }
开发者ID:matjack1,项目名称:yashp,代码行数:47,代码来源:UMLGraph.cs

示例2: drawReturnArrow

        void drawReturnArrow(Graphics g, MethodData d1, MethodData d2, float y)
        {
            if (d1.classData == d2.classData) {
                return;
            }

            y -= 5 * zoomScale;
            Pen p = new Pen(getThreadColor(d1.methodEvent.ThreadID), 2 * zoomScale);

            float x1 = d1.getColumnLeftX();
            float x2 = d2.getColumnRightX();

            float[] dashValues = { 4, 1 };
            p.DashPattern = dashValues;

            g.DrawLine(p, x1, y, x2, y);

            float arrowWidth = 5 * zoomScale;

            if (x1 < x2)
            {
                g.DrawLine(p, x2 - arrowWidth, y - arrowWidth, x2, y);
                g.DrawLine(p, x2 - arrowWidth, y + arrowWidth, x2, y);
            }
            else
            {
                g.DrawLine(p, x2 + arrowWidth, y - arrowWidth, x2, y);
                g.DrawLine(p, x2 + arrowWidth, y + arrowWidth, x2, y);
            }
        }
开发者ID:matjack1,项目名称:yashp,代码行数:30,代码来源:UMLGraph.cs

示例3: drawMethodLeave

        void drawMethodLeave(Graphics g, MethodData d, float startY)
        {
            Pen pen = new Pen(getThreadColor(d.methodEvent.ThreadID));

            float leftX = d.getColumnLeftX();
            float rightX = d.getColumnRightX();

            g.DrawLine(pen, leftX, startY, rightX, startY);

            if (d.callerMethodData != null)
            {
                drawReturnArrow(g, d, d.callerMethodData, startY);
            }
        }
开发者ID:matjack1,项目名称:yashp,代码行数:14,代码来源:UMLGraph.cs

示例4: drawMethodEnter

        void drawMethodEnter(Graphics g, MethodData d, float startY)
        {
            Pen pen = new Pen(getThreadColor(d.methodEvent.ThreadID));

            float leftX = d.getColumnLeftX();
            float rightX = d.getColumnRightX();

            g.DrawLine(pen, leftX, startY, rightX, startY);

            if (d.callerMethodData != null) {
                drawStartArrow(g, d, d.callerMethodData, startY, d.methodEvent.MethodInfo.MethodName + "()");
            }
        }
开发者ID:matjack1,项目名称:yashp,代码行数:13,代码来源:UMLGraph.cs

示例5: drawMethodData

        void drawMethodData(Graphics g, MethodData d, float startY, float endY)
        {
            Pen pen = new Pen(getThreadColor(d.methodEvent.ThreadID));

            float leftX = d.getColumnLeftX();
            float rightX = d.getColumnRightX();

            //g.DrawRectangle(pen, leftX, startY, rightX - leftX, endY - startY);
            g.DrawLine(pen, leftX, startY, leftX, endY);
            g.DrawLine(pen, rightX, startY, rightX, endY);
        }
开发者ID:matjack1,项目名称:yashp,代码行数:11,代码来源:UMLGraph.cs

示例6: drawException

        void drawException(Graphics g, MethodData d, float y)
        {
            Brush pen = new SolidBrush(getThreadColor(d.methodEvent.ThreadID));

            float x = d.getColumnRightX() + 5;

            GraphicsState s = g.Save();

            g.TranslateTransform(x, y);

            g.ScaleTransform(zoomScale, zoomScale);

            GraphicsPath gfxPath = new GraphicsPath();
            gfxPath.AddLine( 7, 0, 15, 0);
            gfxPath.AddLine(15, 0,  8, 7);
            gfxPath.AddLine( 7, 8, 12, 8);
            gfxPath.AddLine(12, 8,  0, 16);
            gfxPath.AddLine( 0, 16,  4, 9);
            gfxPath.AddLine( 4, 9,  0, 9);

            gfxPath.CloseFigure();
            g.FillPath(pen, gfxPath);
            gfxPath.Dispose();

            g.Restore(s);
        }
开发者ID:matjack1,项目名称:yashp,代码行数:26,代码来源:UMLGraph.cs


注:本文中的MethodData.getColumnRightX方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。