Home > Enterprise >  GetClipBounds in Direct2D
GetClipBounds in Direct2D

Time:12-04

Is there a way to get the clip bounds in Direct2D similar to GDI ?

https://learn.microsoft.com/en-us/windows/win32/api/gdiplusgraphics/nf-gdiplusgraphics-graphics-getclipbounds(rectf)

I have a D2D render target that has been transformed (translate, rotate and scale). How do I now calculate the clipped bounds? Any sample code or a function to calculate this?

Thanks

CodePudding user response:

I 'd create a rectangle geometry on the target rectangle, then and calculate the bounds passing the transform. You don't even need a target, geometries are target-indepentent.

  • Related