microsoft / DirectX-Graphics-Samples

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
MIT License
6k stars 2.02k forks source link

Can you provide an example of using DirectX2D rendering to demonstrate Richedit (ITexthost) and APNG file #720

Closed williamlzw closed 3 years ago

williamlzw commented 3 years ago

Can you provide an example of using DirectX2D rendering to demonstrate Richedit (ITexthost) and APNG file?

walbourn commented 3 years ago

Your best option is to look at this sample. It demonstrates how to use Windows Imaging Component (WIC) to load a animated GIF and display it with Direct2D.

APNG is not supported by WIC, and isn't an official format per this article which has so far been rejected by the PNG group.

williamlzw commented 3 years ago

https://github.com/laizewei/ExduiR/blob/master/src/Class_Edit_ex.cpp function:_edit_paint line 715 to line 725 How do I go from ((ITextServices ) pits)-> TXDRAW to ((ITextServices ) pits)-> TXD2D

line 722 BitBlt((HDC) hDc, rcTmp.left, rcTmp.top, rcTmp.right - rcTmp.left, rcTmp.bottom - rcTmp.top, (HDC) mDc, 0, 0, SRCPAINT); How does this sentence work with TXDrawD2D

walbourn commented 3 years ago

Ah, the readme must have been incorrectly generated for that sample... The focus of that sample is how to do Animated GIF image reconstruction from metadata. There's another sample which shows WIC with D2D: here.