Closed d2phap closed 1 year ago
Hi,
If _d2dFactory
is a IComObject<ID2D1Factory1>
then, it's not a structure, but a wrapper on a COM object, so you can get an IntPtr
(a COM reference pointer) from it with a code like this:
var ptr = Marshal.GetIUnknownForObject(rectGeo.Object);
Thank you! I forgot this 😅
Hi @smourier,
I'm following this tutorial: https://learn.microsoft.com/en-us/windows/win32/direct2d/how-to-clip-with-layers to create an inverted rectangle for selection. But it does not work due to the
D2D1_LAYER_PARAMETERS
is not valid.My code is as below:
And this is what I want to draw:
Thank you!