public Style() { Name = "Default"; FontName = "Arial"; FontSize = 20; FontColors = new Colors(new SColor(255, 255, 255), new SColor(0, 0, 255), new SColor(0, 0, 0, 0), new SColor(0, 0, 0, 0)); FontTypography = new Typography(); Scale = new Vector2(100, 100); Spacing = 0; Angle = 0; FontBorder = new Border(); Alignment = Align.LowerCenter; FontMargin = new Margin(); Encoding = 1; }
public Style(String name, String fontName, Int32 fontSize, Colors fontColors, Border fontBorder, Vector2 scale, Typography fontTypography, Align alignment, Double spacing, Double angle, Margin fontMargin, Int32 encoding = 1) { Name = name; FontName = fontName; FontSize = fontSize; FontColors = fontColors; FontBorder = fontBorder; Scale = scale; FontTypography = fontTypography; Alignment = alignment; Spacing = spacing; Angle = angle; FontMargin = fontMargin; Encoding = encoding; }
public static Boolean TryParse(String[] parts, out Colors colorOutput) { SColor pColor, sColor, bColor, oColor; colorOutput = new Colors(); if (!SColor.TryParse(parts[0], out pColor) || !SColor.TryParse(parts[1], out sColor) || !SColor.TryParse(parts[2], out oColor) || !SColor.TryParse(parts[3], out bColor)) return false; colorOutput = new Colors(pColor, sColor, oColor, bColor); return true; }