Pergunta

I want to move my C# application from GDI+ to Direct2D (C++/CLI wrapper) for performance reasons. However I don't know how to solve the picking part. I have some shapes and images that I can move around. Currently I do it with GraphicsPath.IsVisible most of the time. Do you know what would be the equivalent in Direct2D?

Foi útil?

Solução

The FillContainsPoint or StrokeContainsPoint methods of shapes implementing ID2D1Geometry might work for you:

  • FillContainsPoint - Indicates whether the area filled by the geometry would contain the specified point.
  • StrokeContainsPoint - Determines whether the geometry's stroke contains the specified point.

I found these from the Geometries Overview on MSDN.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top