Ejemplo n.º 1
0
 /// <summary>
 /// Renders a visual to a drawing context.
 /// </summary>
 /// <param name="visual">The visual.</param>
 /// <param name="context">The drawing context.</param>
 public static void Render(IVisual visual, DrawingContext context)
 {
     using (var renderer = new ImmediateRenderer(visual, updateTransformedBounds: false))
     {
         renderer.Render(context, visual, visual.Bounds);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Renders a visual to a drawing context.
 /// </summary>
 /// <param name="visual">The visual.</param>
 /// <param name="context">The drawing context.</param>
 public static void Render(IVisual visual, DrawingContext context)
 {
     using (var renderer = new ImmediateRenderer(visual))
     {
         renderer.Render(context, visual, visual.Bounds);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Renders a visual to a render target.
 /// </summary>
 /// <param name="visual">The visual.</param>
 /// <param name="target">The render target.</param>
 public static void Render(IVisual visual, IRenderTarget target)
 {
     using (var renderer = new ImmediateRenderer(visual))
         using (var context = new DrawingContext(target.CreateDrawingContext(renderer)))
         {
             renderer.Render(context, visual, visual.Bounds);
         }
 }
Ejemplo n.º 4
0
 internal static void Render(IVisual visual, DrawingContext context, bool updateTransformedBounds)
 {
     using var renderer = new ImmediateRenderer(visual, updateTransformedBounds);
     renderer.Render(context, visual, visual.Bounds);
 }