本文整理汇总了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);
}
示例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++;
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}
示例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
}
示例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);
}
}
示例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();
}
示例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);
}
示例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);
}
}