Hittest of transparent areas in images
-
Last edited by Luro on 21 Aug 2026, 06:44, edited 1 time in total.
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Hittest of transparent areas in images
There is no API in NoesisGUI to access pixel information from an ImageSource. In WPF it can be done if your ImageSource is a BitmapImage, and you need to copy the entire image to a memory buffer to be able to read the pixel value (sample here). We will study to incorporate this approach in the future, but not sure.
My advice is to use a path that covers the solid areas of your image (an image can be traced into vectors easily with many tools) to catch the hit testing, and make the image non visible for hit testing:
My advice is to use a path that covers the solid areas of your image (an image can be traced into vectors easily with many tools) to catch the hit testing, and make the image non visible for hit testing:
Code: Select all
<Grid x:Name="Arrow">
<Image Source="arrow.png" IsHitTestVisible="False"/>
<Path Data="M0,0L10,0..."/>
</Grid>Who is online
Users browsing this forum: Bing [Bot] and 2 guests