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


C# Node.IsUnderlined方法代码示例

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


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

示例1: DrawString


//.........这里部分代码省略.........
                        ef1 = this.graphics_.MeasureString(text, font1, tf1, this.typographicsFormat);
                        float single41 = ef1.Width;
                        float single42 = 0f;
                        tf2 = tf1;
                        while (single42 < (single1 - single41))
                        {
                            this.graphics_.DrawString("$", font1, brush1, tf2, this.typographicsFormat);
                            tf2.X += single40;
                            single42 += single40;
                        }
                        tf1.X = (tf1.X + single1) - single41;
                        this.graphics_.DrawString(text, font1, brush1, tf1, this.typographicsFormat);
                    }
                    else if ((node.glyph.Code == "021C0") || (node.glyph.Code == "021C1"))
                    {
                        ef1 = this.graphics_.MeasureString("$", font1, tf1, this.typographicsFormat);
                        float single43 = ef1.Width;
                        ef1 = this.graphics_.MeasureString(text, font1, tf1, this.typographicsFormat);
                        float single44 = ef1.Width;
                        float single45 = 0f;
                        tf2 = tf1;
                        while (single45 < (single1 - single44))
                        {
                            this.graphics_.DrawString("$", font1, brush1, tf2, this.typographicsFormat);
                            tf2.X += single43;
                            single45 += single43;
                        }
                        tf1.X = (tf1.X + single1) - single44;
                        this.graphics_.DrawString(text, font1, brush1, tf1, this.typographicsFormat);
                    }
                    else if ((node.glyph.Code == "021BC") || (node.glyph.Code == "021BD"))
                    {
                        ef1 = this.graphics_.MeasureString(text, font1, tf1, this.typographicsFormat);
                        float single46 = ef1.Width;
                        ef1 = this.graphics_.MeasureString("$", font1, tf1, this.typographicsFormat);
                        float single47 = ef1.Width;
                        float single48 = 0f;
                        this.graphics_.DrawString(text, font1, brush1, tf1, this.typographicsFormat);
                        tf2 = tf1;
                        tf2.X = (tf2.X + single1) - single47;
                        for (single48 = single1; single48 > single46; single48 -= single47)
                        {
                            this.graphics_.DrawString("$", font1, brush1, tf2, this.typographicsFormat);
                            tf2.X -= single47;
                        }
                    }
                    else if ((node.glyph.Code == "02190") || (node.glyph.Code == "0F576"))
                    {
                        ef1 = this.graphics_.MeasureString(text, font1, tf1, this.typographicsFormat);
                        float single49 = ef1.Width;
                        ef1 = this.graphics_.MeasureString("$", font1, tf1, this.typographicsFormat);
                        float single50 = ef1.Width;
                        float single51 = 0f;
                        this.graphics_.DrawString(text, font1, brush1, tf1, this.typographicsFormat);
                        single50 -= 1f;
                        tf2 = tf1;
                        tf2.X = (tf2.X + single1) - single50;
                        for (single51 = single1; single51 > single49; single51 -= single50)
                        {
                            this.graphics_.DrawString("$", font1, brush1, tf2, this.typographicsFormat);
                            tf2.X -= single50;
                        }
                    }
                    else if ((node.glyph.Code == "0F578") || (node.glyph.Code == "02194"))
                    {
                        ef1 = this.graphics_.MeasureString("!", font1, tf1, this.typographicsFormat);
                        float single52 = ef1.Width;
                        ef1 = this.graphics_.MeasureString("$", font1, tf1, this.typographicsFormat);
                        float single53 = ef1.Width;
                        ef1 = this.graphics_.MeasureString(text, font1, tf1, this.typographicsFormat);
                        float single54 = ef1.Width;
                        float single55 = 0f;
                        this.graphics_.DrawString("!", font1, brush1, tf1, this.typographicsFormat);
                        single53 -= 1f;
                        single52 -= 1f;
                        tf2 = tf1;
                        tf2.X += single52;
                        for (single55 = single52; single55 < (single1 - single54); single55 += single53)
                        {
                            this.graphics_.DrawString("$", font1, brush1, tf2, this.typographicsFormat);
                            tf2.X += single53;
                        }
                        tf1.X = (tf1.X + single1) - single54;
                        this.graphics_.DrawString(text, font1, brush1, tf1, this.typographicsFormat);
                    }
                }
            }
            catch
            {
            }
        Label_1B71:
            this.graphics_.ResetClip();
        Label_1B94:
            if (!node.IsUnderlined())
            {
                return;
            }
            int num8 = (int) this.Leading((float) node.box.Height, font1);
            this.graphics_.DrawLine(new Pen(brush1), this.oX + node.box.X, ((this.oY + node.box.Y) + node.box.Height) - (num8 / 2), (this.oX + node.box.X) + node.box.Width, ((this.oY + node.box.Y) + node.box.Height) - (num8 / 2));
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:101,代码来源:Painter_string.cs


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