public void Render(D2D.RenderTarget renderTarget, FrameworkElement rootElement, FrameworkElement fe) { var textBlock = fe as TextBlock; if (textBlock != null) { TextBlockRenderer.Render(this, renderTarget, rootElement, textBlock); return; } var rectangle = fe as Rectangle; if (rectangle != null) { RectangleRenderer.Render(this, renderTarget, rootElement, rectangle); return; } var border = fe as Border; if (border != null) { BorderRenderer.Render(this, renderTarget, rootElement, border); return; } var ellipse = fe as Ellipse; if (ellipse != null) { EllipseRenderer.Render(this, renderTarget, rootElement, ellipse); return; } var line = fe as Line; if (line != null) { LineRenderer.Render(this, renderTarget, rootElement, line); return; } var path = fe as Path; if (path != null) { PathRenderer.Render(this, renderTarget, rootElement, path); return; } FrameworkElementRenderer.Render(this, renderTarget, rootElement, fe); }
public async Task Render(D2D.RenderTarget renderTarget, FrameworkElement rootElement, FrameworkElement fe) { var textBlock = fe as TextBlock; if (textBlock != null) { await TextBlockRenderer.Render(this, renderTarget, rootElement, textBlock); return; } var rectangle = fe as Jupiter.Shapes.Rectangle; if (rectangle != null) { await RectangleRenderer.Render(this, renderTarget, rootElement, rectangle); return; } var border = fe as Border; if (border != null) { await BorderRenderer.Render(this, renderTarget, rootElement, border); return; } var image = fe as Image; if (image != null) { await ImageRenderer.Render(this, renderTarget, rootElement, image); return; } var ellipse = fe as Ellipse; if (ellipse != null) { #pragma warning disable 4014 EllipseRenderer.Render(this, renderTarget, rootElement, ellipse); #pragma warning restore 4014 return; } var line = fe as Line; if (line != null) { await LineRenderer.Render(this, renderTarget, rootElement, line); return; } var path = fe as Jupiter.Shapes.Path; if (path != null) { await PathRenderer.Render(this, renderTarget, rootElement, path); return; } await FrameworkElementRenderer.Render(this, renderTarget, rootElement, fe); }