microsoft / Win2D

Win2D is an easy-to-use Windows Runtime API for immediate mode 2D graphics rendering with GPU acceleration. It is available to C#, C++ and VB developers writing apps for the Windows Universal Platform (UWP). It utilizes the power of Direct2D, and integrates seamlessly with XAML and CoreWindow.
http://microsoft.github.io/Win2D
Other
1.8k stars 284 forks source link

Draw a UIElement #812

Open ismaelestalayo opened 3 years ago

ismaelestalayo commented 3 years ago

I've seen that Win2D is capable of drawing of screen shapes, but I need to draw a custom UserControl I made so I can then get the pixels and dump it to an image (to then update the Live Tile of my app), but I haven't seen anything similar. Is this possible?

ChewWorker commented 3 years ago

To clarify...you want to:

  1. Use Win2D to draw a custom control?
  2. Capture the results of that draw operation?
ismaelestalayo commented 3 years ago

Yes, that was my intention at the time.

I no longer have that problem as I ended up drawing my chart's points on a Polyline, and then dump it to a PNG. However, I'm curious if my original issue would have been possible with Win2D.