public virtual void Initialize(SharpRender sr) { sceneColorBrush = new SolidColorBrush(sr.d2dContext, Color.White); textFormat = new TextFormat(sr.wrFactory, "Calibri", 20) { TextAlignment = TextAlignment.Leading, ParagraphAlignment = ParagraphAlignment.Center }; clock = Stopwatch.StartNew(); sr.d2dContext.TextAntialiasMode = TextAntialiasMode.Grayscale; }
public SolidColorBrush GetBrush(System.Drawing.Color color) { if (Brushes.ContainsKey(color)) { return(Brushes[color]); } var b = new SolidColorBrush(target, SharpRender.c(color)); Brushes.Add(color, b); return(b); }
public WaitingRenderer(SharpRender r) { foregroundBrush = new SolidColorBrush(r.d2dContext, Color.White); barBrush = new SolidColorBrush(r.d2dContext, Color.Green); textFormat = new TextFormat(r.wrFactory, "Calibri", 18) { TextAlignment = TextAlignment.Center, ParagraphAlignment = ParagraphAlignment.Center }; watch = new System.Diagnostics.Stopwatch(); watch.Start(); }
public ObjectRender(SharpRender r) { }