當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。