public TextDetail(string templateDir, JObject text, CustomJPrototypeResolver resolver) { _templateDir = templateDir; _resolver = resolver; Content = resolver.GetString(text, "Content"); Font = resolver.GetString(text, "Font"); FontSize = resolver.GetIntOrDefault(text, "FontSize", 0); FontStyle = resolver.GetFlagsEnumOrDefault(text, "FontStyle", FontStyle.Regular); Color = resolver.GetColorOrDefault(text, "Color", Color.Black); BackgroundColor = resolver.GetColorOrDefault(text, "BackgroundColor", Color.Transparent); BackgroundBorderColor = resolver.GetColorOrDefault(text, "BackgroundBorderColor", Color.Transparent); BackgroundBorderThickness = resolver.GetIntOrDefault(text, "BackgroundBorderThickness", 0); OutlineColor = resolver.GetColorOrDefault(text, "OutlineColor", Color.Transparent); OutlineThickness = resolver.GetIntOrDefault(text, "OutlineThickness", 0); X = resolver.GetInt(text, "X"); Y = resolver.GetInt(text, "Y"); Width = resolver.GetInt(text, "Width"); Height = resolver.GetInt(text, "Height"); HorizontalAlignment = resolver.GetEnumOrDefault(text, "HorizontalAlignment", HorizontalAlignment.Center); LineAlignment = resolver.GetEnumOrDefault(text, "LineAlignment", HorizontalAlignment.Center); VerticalAlignment = resolver.GetEnumOrDefault(text, "VerticalAlignment", VerticalAlignment.Center); WordAlignment = resolver.GetEnumOrDefault(text, "WordAlignment", VerticalAlignment.Bottom); FlawedRotation = resolver.GetIntOrDefault(text, "FlawedRotation", 0); FlawedDynamicFontSizeEnabled = resolver.GetBoolOrDefault(text, "FlawedDynamicSizeEnabled", false); }
public TextStyling(Graphics graphics, TextStyling previousStyle, CustomJPrototypeResolver resolver, JObject prototype) : this(graphics, resolver.GetStringOrDefault(prototype, "Font", previousStyle.FontName), resolver.GetIntOrDefault(prototype, "FontSize", previousStyle.FontSize), resolver.GetFlagsEnumOrDefault(prototype, "FontStyle", previousStyle.FontStyle), resolver.GetColorOrDefault(prototype, "Color", previousStyle.Color), resolver.GetColorOrDefault(prototype, "BackgroundColor", previousStyle.BackgroundColor), resolver.GetColorOrDefault(prototype, "BackgroundBorderColor", previousStyle.BackgroundBorderColor), resolver.GetIntOrDefault(prototype, "BackgroundBorderThickness", previousStyle.BackgroundBorderThickness), resolver.GetColorOrDefault(prototype, "OutlineColor", previousStyle.OutlineColor), resolver.GetIntOrDefault(prototype, "OutlineThickness", previousStyle.OutlineThickness)) { }
public RectangleDetail(JObject border, CustomJPrototypeResolver resolver) { Color = resolver.GetColorOrDefault(border, "Color", Color.Black); X = resolver.GetInt(border, "X"); Y = resolver.GetInt(border, "Y"); Width = resolver.GetInt(border, "Width"); Height = resolver.GetInt(border, "Height"); }
public BorderDetail(JObject border, CustomJPrototypeResolver resolver) { Color = resolver.GetColorOrDefault(border, "Color", Color.Black); X = resolver.GetInt(border, "X"); Y = resolver.GetInt(border, "Y"); Width = resolver.GetInt(border, "Width"); Height = resolver.GetInt(border, "Height"); Thickness = resolver.GetInt(border, "Thickness"); Alignment = resolver.GetEnum <BorderAlignment>(border, "Alignment"); }
public Canvas(JObject canvas, CustomJPrototypeResolver resolver) { Height = resolver.GetInt(canvas, "Height"); Width = resolver.GetInt(canvas, "Width"); Background = resolver.GetColorOrDefault(canvas, "Background", Color.White); }