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


C# TabPage.CreateGraphics方法代码示例

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


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

示例1: dibujateRP

        public void dibujateRP(Graphics g, Bitmap bmp, TabPage tp,int tipo_arco,int tipo_grafo)
        {
            Graphics dbm = tp.CreateGraphics();
            dbm.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
            Pen p = new Pen(Color.CornflowerBlue, 4);

            if(tipo_grafo == DIRIGIDA)
                p.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;

            p.Brush = Brushes.White;
            g.DrawLine(p, po, pd);
            p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;

            switch (tipo_arco)
            {
                case 1://retroceso
                    p.Brush = Brushes.Red;
                break;
                case 2://avance
                    p.Brush = Brushes.DodgerBlue;
                break;
                case 3://cruzado
                    p.Brush = Brushes.GreenYellow;
                break;
            }

            g.DrawLine(p, po, pd);
            dbm.DrawImage(bmp, 0, 0);
        }
开发者ID:jluisacosta,项目名称:Graph-Editor,代码行数:29,代码来源:CArista.cs

示例2: borrate

        public void borrate(Graphics g, Bitmap bmp, TabPage tp)
        {
            Graphics dbm = tp.CreateGraphics();
            dbm.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
            Pen borrador = new Pen(Color.White, ANCHO_LINEA+2);

            g.FillEllipse(borrador.Brush, centro.X - radio, centro.Y - radio, radio * 2, radio * 2);
            g.DrawEllipse(borrador, centro.X - radio, centro.Y - radio, radio * 2, radio * 2);
            dbm.DrawImage(bmp, 0, 0);
        }
开发者ID:jluisacosta,项目名称:Graph-Editor,代码行数:10,代码来源:CVertice.cs

示例3: dibujateAACM

        public void dibujateAACM(Graphics g, Bitmap bmp, TabPage tp)
        {
            Graphics dbm = tp.CreateGraphics();
            dbm.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
            Pen p = new Pen(Color.CornflowerBlue, 4);

            p.Brush = Brushes.White;
            g.DrawLine(p, po, pd);
            p.Brush = Brushes.Orange;
            g.DrawLine(p, po, pd);
            dbm.DrawImage(bmp, 0, 0);
        }
开发者ID:jluisacosta,项目名称:Graph-Editor,代码行数:12,代码来源:CArista.cs

示例4: dibujate

        //Dibujado
        public void dibujate(Graphics g, Bitmap bmp, TabPage tp)
        {
            Graphics dbm = tp.CreateGraphics();
            dbm.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
            Pen p = new Pen(Color.CornflowerBlue,4);

            if (this.tipo == DIRIGIDA)
                p.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;

            g.DrawLine(p, po, pd);
            dbm.DrawImage(bmp, 0, 0);
        }
开发者ID:jluisacosta,项目名称:Graph-Editor,代码行数:13,代码来源:CArista.cs

示例5: Setup

 public void Setup()
 {
     _tabPage = new TabPage();
     _graphics = _tabPage.CreateGraphics();
     _drawingUtil = new DrawingUtil(1050, 1050, _graphics);
 }
开发者ID:tarakreddy,项目名称:ADAPT,代码行数:6,代码来源:DrawingUtilTest.cs

示例6: dibujate

        public void dibujate(Graphics g, Bitmap bmp, TabPage tp)
        {
            Graphics dbm = tp.CreateGraphics();
            g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
            dbm.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
            Pen pc = new Pen(Color.FromArgb(contorno),ANCHO_LINEA);
            Pen pr = new Pen(Color.FromArgb(relleno), ANCHO_LINEA);

            int dis = 4;

            if (id / 10 > 0)
                dis = 8;

            g.FillEllipse(pr.Brush, centro.X - radio, centro.Y - radio, radio * 2, radio * 2);
            g.DrawEllipse(pc, centro.X - radio, centro.Y - radio, radio*2, radio*2);
            g.DrawString(id.ToString(), new Font(FontFamily.GenericSansSerif, 10), pc.Brush, centro.X - dis, centro.Y - 7);
            dbm.Clear(Color.White);
            dbm.DrawImage(bmp, 0, 0);
        }
开发者ID:jluisacosta,项目名称:Graph-Editor,代码行数:19,代码来源:CVertice.cs


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