예제 #1
0
 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;
 }
예제 #2
0
        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);
        }
예제 #3
0
 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();
 }
예제 #4
0
 public ObjectRender(SharpRender r)
 {
 }