// Example Gallery reuses the existing drawing code in BurningTextExample to create its icon. static void DrawExampleGalleryIcon(CanvasDrawingSession ds, IconInfo iconInfo) { string text = (iconInfo.Width < 42) ? "W" : "Win2D"; var burningText = new BurningTextExample(); burningText.DrawIcon(ds, text); }
// Example Gallery reuses the existing drawing code in BurningTextExample to create its icon. static void DrawExampleGalleryIcon(CanvasDrawingSession ds, IconInfo iconInfo) { string text = (iconInfo.Width < 42) ? "W" : "Win2D"; var burningText = new BurningTextExample(); burningText.DrawIcon(ds, text); }
private void StartRendering(Size sizeSwapchain) { float ticks = 0; BurningTextExample fire = new BurningTextExample(); fire.CreateResources(); Task.Factory.StartNew(() => { while (true) { using (var ds = _swapchain.CreateDrawingSession(Colors.Transparent)) { // HACK - this should be time in seconds since animation start ticks += .016f; fire.Draw(ds, sizeSwapchain, ticks); } _swapchain.Present(); } }, TaskCreationOptions.LongRunning); }