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


C# FontSize类代码示例

本文整理汇总了C#中FontSize的典型用法代码示例。如果您正苦于以下问题:C# FontSize类的具体用法?C# FontSize怎么用?C# FontSize使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: GenerateHeadingOneCharStyle

        private Style GenerateHeadingOneCharStyle()
        {
            Style style1 = new Style() { Type = StyleValues.Character, StyleId = HeadingOneCharStyle, CustomStyle = true };
            StyleName styleName1 = new StyleName() { Val = "Heading 1 Char" };
            BasedOn basedOn1 = new BasedOn() { Val = "DefaultParagraphFont" };
            LinkedStyle linkedStyle1 = new LinkedStyle() { Val = "Heading1" };
            UIPriority uIPriority1 = new UIPriority() { Val = 9 };
            //Rsid rsid1 = new Rsid() { Val = "0013195F" };

            StyleRunProperties styleRunProperties1 = new StyleRunProperties();
            RunFonts runFonts1 = new RunFonts() { AsciiTheme = ThemeFontValues.MajorHighAnsi, HighAnsiTheme = ThemeFontValues.MajorHighAnsi, EastAsiaTheme = ThemeFontValues.MajorEastAsia, ComplexScriptTheme = ThemeFontValues.MajorBidi };
            Color color1 = new Color() { Val = "2E74B5", ThemeColor = ThemeColorValues.Accent1, ThemeShade = "BF" };
            FontSize fontSize1 = new FontSize() { Val = "32" };
            FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "32" };

            styleRunProperties1.Append(runFonts1);
            styleRunProperties1.Append(color1);
            styleRunProperties1.Append(fontSize1);
            styleRunProperties1.Append(fontSizeComplexScript1);

            style1.Append(styleName1);
            style1.Append(basedOn1);
            style1.Append(linkedStyle1);
            style1.Append(uIPriority1);
            //style1.Append(rsid1);
            style1.Append(styleRunProperties1);

            return style1;
        }
开发者ID:FerHenrique,项目名称:Owl,代码行数:29,代码来源:StyleCreator.cs

示例2: AddNewTextbox

 public TextBox AddNewTextbox(FloatRectangle relativeRectangle, FontSize fontSize = FontSize.Normal)
 {
     TextBox textBox = new TextBox(Graphics, fontSize);
     _drawables.Add(textBox);
     textBox.BoundingBox = Graphics.Window.ToAbsoluteRectangle(relativeRectangle);
     return textBox;
 }
开发者ID:nicojans,项目名称:FinalQuest,代码行数:7,代码来源:GUI.cs

示例3: Text

 public Text(FontSize size, string text, Vector3 color, BMFont.Justification justification = BMFont.Justification.Left)
 {
     this.Justification = justification;
     this.font = FontFromSize(size);
     this.String = text;
     this.Color = color;
 }
开发者ID:giawa,项目名称:ee2015presentation,代码行数:7,代码来源:Text.cs

示例4: AddNewListMenu

 public ListMenu AddNewListMenu(string title, FloatRectangle relativeRectangle, FontSize fontSize = FontSize.Normal)
 {
     ListMenu menu = new ListMenu(title, Graphics, fontSize);
     menu.BoundingBox = Graphics.Window.ToAbsoluteRectangle(relativeRectangle);
     AddMenu(menu);
     return menu;
 }
开发者ID:nicojans,项目名称:FinalQuest,代码行数:7,代码来源:GUI.cs

示例5: CSSFontSizeProperty

 internal CSSFontSizeProperty()
     : base(PropertyNames.FontSize)
 {
     _mode = FontSize.Medium;
     _size = null;
     _inherited = true;
 }
开发者ID:jogibear9988,项目名称:AngleSharp,代码行数:7,代码来源:CSSFontSizeProperty.cs

示例6: VisitFontSize

 public override object VisitFontSize(FontSize fontSize)
 {
     if (fontSize.Size <= 0)
     {
         Report.AddError(fontSize.Position, "Style attribute 'fontsize' must have a value greater than 0.");
     }
     return null;
 }
开发者ID:javachengwc,项目名称:many-ql,代码行数:8,代码来源:StyleAttributeChecker.cs

示例7: Add

        public static bool Add(string key, FontSize size, SpriteFont font)
        {
            if (_fonts.Keys.Contains(key + size)) return false;

            _fonts.Add(key + size, font);

            return true;
        }
开发者ID:HaKDMoDz,项目名称:armadillo,代码行数:8,代码来源:FontManager.cs

示例8: TimeAnnouncerEntity

        public TimeAnnouncerEntity(AnnouncerEnded endFunction, float height, float time, FontSize size)
            : base(endFunction, height)
        {
            endAlarm = new Alarm(time, TweenType.OneShot, new AlarmFinished(FinishAnnouncer));
            AddTween(endAlarm, true);

            text = new Text("", size);
        }
开发者ID:amidos2006,项目名称:CleanEmUp,代码行数:8,代码来源:TimeAnnouncerEntity.cs

示例9: Text

 public Text(string text, FontSize size)
 {
     this.text = text;
     this.alignType = AlignType.Left;
     ChangeFont(size);
     this.origin = new Vector2();
     this.scale = new Vector2(1, 1);
     this.angle = 0;
     this.flipping = SpriteEffects.None;
     this.tintColor = Color.White;
 }
开发者ID:amidos2006,项目名称:CleanEmUp,代码行数:11,代码来源:Text.cs

示例10: FontUnit

		public FontUnit(FontSize type)
		{
			if(!Enum.IsDefined(typeof(FontSize), type))
				throw new ArgumentException();
			this.type = type;
			if(this.type == FontSize.AsUnit)
			{
				val = Unit.Point(10);
			} else
			{
				val = Unit.Empty;
			}
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:13,代码来源:FontUnit.cs

示例11: CreateFont

 private static Font CreateFont(string fontName = "Calibri", int fontSize = 11, bool bold = false, string color = "00000000")
 {
     var ft = new Font();
     var ftn = new FontName();
     ftn.Val = StringValue.FromString(fontName);
     var ftsz = new FontSize();
     ftsz.Val = DoubleValue.FromDouble(fontSize);
     ft.FontName = ftn;
     ft.FontSize = ftsz;
     ft.Bold = new Bold { Val = bold };
     ft.Color = new Color { Rgb = HexBinaryValue.FromString(color) };
     return ft;
 }
开发者ID:kuritka,项目名称:MarketLoader,代码行数:13,代码来源:StyleSheet.FontCollection.cs

示例12: FontUnit

 public FontUnit(System.Web.UI.WebControls.Unit value)
 {
     this.type = FontSize.NotSet;
     if (!value.IsEmpty)
     {
         this.type = FontSize.AsUnit;
         this.value = value;
     }
     else
     {
         this.value = System.Web.UI.WebControls.Unit.Empty;
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:13,代码来源:FontUnit.cs

示例13: FontUnit

		public FontUnit (FontSize type)
		{
			int t = (int) type;
			
			if (t < 0 || t > (int)FontSize.XXLarge)
				throw new ArgumentOutOfRangeException ("type");
			
			this.type = type;

			if (type == FontSize.AsUnit)
				unit = new Unit (10, UnitType.Point);
			else
				unit = Unit.Empty;
		}
开发者ID:nobled,项目名称:mono,代码行数:14,代码来源:FontUnit.cs

示例14: GetFont

 public static SpriteFont GetFont(string fontName, FontSize fontSize, bool bold, bool italic)
 {
     FontGroup f = null;
     if (fonts.TryGetValue(fontName, out f))
     {
         return f.GetSpriteFont(fontSize, bold, italic);
     }
     else
     {
         // Log an error and return the default font
         DebugLog.Log("Could not find requested font " + fontName + ", using default instead.");
         return Render.GetBasicFont();
     }
 }
开发者ID:oconnerj,项目名称:TyrantsQuest,代码行数:14,代码来源:FontBox.cs

示例15: FontFromSize

 public static BMFont FontFromSize(FontSize font)
 {
     switch (font)
     {
         case FontSize._24pt: return BMFont.LoadFont("media/font24.fnt");
         case FontSize._32pt: return BMFont.LoadFont("media/font32.fnt");
         case FontSize._48pt: return BMFont.LoadFont("media/font48.fnt");
         case FontSize._54pt: return BMFont.LoadFont("media/font54.fnt");
         case FontSize._72pt: return BMFont.LoadFont("media/font72.fnt");
         default:
             Console.WriteLine("Unknown font " + font + " requested.");
             return BMFont.LoadFont("fonts/font12.fnt");
     }
 }
开发者ID:giawa,项目名称:ee2015presentation,代码行数:14,代码来源:Text.cs


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