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


C# Cairo.SelectFontFace方法代码示例

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


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

示例1: DrawContents

        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(24);

            TextExtents te;

            Text.ShadowedText(g, "Time", X + x1, Y + y1);
            Text.ShadowedText(g, "Gil", X + x1, Y + y2);

            g.SelectFontFace("Courier New", FontSlant.Normal, FontWeight.Bold);

            long s, m, h;
            s = GameClock.Seconds;
            m = GameClock.Minutes;
            h = GameClock.Hours;

            string time = String.Format("{0:D2}:{1:D2}:{2:D2}", h, m, s);

            te = g.TextExtents(time);
            Text.ShadowedText(g, time, X + x2 - te.Width, Y + y1);

            te = g.TextExtents(Gil);
            Text.ShadowedText(g, Gil, X + x2 - te.Width, Y + y2);
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:25,代码来源:Time.cs

示例2: DrawContents

        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(24);

            TextExtents te;

            Ability s = BattleState.Commanding.EnemySkillMenu.Selected;

            int row = 0;

            if (s != null)
            {
                string cost = s.MPCost.ToString();
                Text.ShadowedText(g, "MP Req", X + x1, Y + y0);

                row++;

                cost = cost + "/";
                te = g.TextExtents(cost);
                Text.ShadowedText(g, cost, X + x2 - te.Width, Y + y0 + (row * ys));

                string tot = BattleState.Commanding.MP.ToString();
                te = g.TextExtents(tot);
                Text.ShadowedText(g, tot, X + x3 - te.Width, Y + y0 + (row * ys));

                row++;
            }
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:29,代码来源:Info.cs

示例3: DrawContents

        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(Text.FONT_SIZE_LABEL);

            Text.ShadowedText(g, "Equip", X + 20, Y + 25);
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:7,代码来源:Label.cs

示例4: DrawContents

        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(24);

            Text.ShadowedText(g, "Level Up!", X + xs, Y + ys);
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:7,代码来源:LevelUp.cs

示例5: DrawContents

        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(24);

            Text.ShadowedText(g, MenuState.ConfigScreen.Control.Info, X + 20, Y + 27);
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:7,代码来源:Info.cs

示例6: DrawContents

        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(24);

            Text.ShadowedText(g, "Please Make a Party of Three", X + 50, Y + 25);
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:7,代码来源:Top.cs

示例7: Draw

        public void Draw(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(20);

            TextExtents te = g.TextExtents(Message);

            Text.ShadowedText(g, Color, Message, X - (te.Width / 2), Y - (te.Height / 2) + GetCurrentDisplacement());
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:9,代码来源:BattleIcon.cs

示例8: DrawVersionNumber

		void DrawVersionNumber (Cairo.Context c, ref Cairo.PointD bottomRight, string text)
		{
			c.SelectFontFace (SplashFontFamily, Cairo.FontSlant.Normal, Cairo.FontWeight.Normal);
			c.SetFontSize (SplashFontSize);
			
			var extents = c.TextExtents (text);
			c.MoveTo (bottomRight.X - extents.Width - 1, bottomRight.Y - extents.Height);
			
			c.Color = new Cairo.Color (1, 1, 1);
			c.ShowText (text);
		}
开发者ID:wickedshimmy,项目名称:monodevelop,代码行数:11,代码来源:SplashScreen.cs

示例9: DrawContents

        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(24);

            TextExtents te;

            te = g.TextExtents(AP);
            Text.ShadowedText(g, "AP", X + x1, Y + ys);
            Text.ShadowedText(g, AP, X + x2 - te.Width, Y + ys);
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:11,代码来源:Ap.cs

示例10: DrawContents

        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(24);

            TextExtents te;

            string gil = PostBattleState.Gil.ToString() + "g";
            te = g.TextExtents(gil);
            Text.ShadowedText(g, "Gained Gil", X + x1, Y + ys);
            Text.ShadowedText(g, gil, X + x2 - te.Width, Y + ys);
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:12,代码来源:GilLeft.cs

示例11: DrawContents

        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(24);

            TextExtents te;

            #region Character Status

            DrawCharacterStatus(d, g);

            #endregion Status
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:13,代码来源:Three.cs

示例12: DrawContents

        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            BattleEvent e = BattleState.ActiveAbility;

            if (e != null)
            {
                g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
                g.SetFontSize(24);

                string msg = e.GetStatus();

                TextExtents te = g.TextExtents(msg);

                Text.ShadowedText(g, msg, X + (W / 2) - (te.Width / 2), Y + 32);
            }
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:16,代码来源:EventBar.cs

示例13: ShadowedText

        public static void ShadowedText(Cairo.Context g, Cairo.Color c, string text, double x, double y, string font, int point)
        {
            g.Save();

            g.SelectFontFace(font, FontSlant.Normal, FontWeight.Normal);
            g.SetFontSize(point);

            g.MoveTo(x + SHADOW_SPACING, y + SHADOW_SPACING);
            g.Color = Colors.BLACK;
            g.ShowText(text);

            g.MoveTo(x, y);
            g.Color = c;
            g.ShowText(text);

            g.Restore();
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:17,代码来源:Text.cs

示例14: DrawContents

        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(24);

            TextExtents te;

            string msg = "";

            if (BattleState.Screen.Control != null)
            {
                msg = BattleState.Screen.Control.Info;
            }

            te = g.TextExtents(msg);

            Text.ShadowedText(g, msg, X + (W / 2) - (te.Width / 2), Y + 32);
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:18,代码来源:InfoBar.cs

示例15: DrawContents

        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(28);

            if (BattleState.Allies[0] != null)
            {
                DrawAllyStatus(g, BattleState.Allies[0], y0);
            }

            if (BattleState.Allies[1] != null)
            {
                DrawAllyStatus(g, BattleState.Allies[1], y1);
            }

            if (BattleState.Allies[2] != null)
            {
                DrawAllyStatus(g, BattleState.Allies[2], y2);
            }
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:20,代码来源:StatusBarLeft.cs


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