question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help Wanted: Testing the Hit-Test feature

See original GitHub issue

With the updates (https://github.com/ElinamLLC/SharpVectors/commit/d0e6dc20d02ff386a8a3b8ff917b76755f4458a6), the current hit testing issue with transformed geometry is fixed. However, more tests are needed to verify this feature and your help is needed.

The hit test feature is implemented in the WpfDrawingDocument class and will be the basis of interactivity support in the controls; SvgCanvas and SvgViewbox. A sample application WpfTestSvgControl is available for testing this important feature.

How to help?

  1. Get the current source from the repository and build it.
  2. Run the sample application, WpfTestSvgControl and use it to open SVG files.
  3. Perform the hit tests in the drawing panel and observe the results in the bottom panel.
  4. Report any issue and suggestions for improvements.
  5. Try some of the options in the Settings tab, but keep the Include support for SharpVectors Runtime library option checked.

shots

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ThunderChild-001commented, Nov 5, 2020

@paulushub I found a solution for the transparency issue.

In HitTestDrawing(DrawingGroup group, Point pt, out Drawing hitDrawing) in WpfDrawingDocument.cs, Instead of using “SvgObject.GetId(drawing)” I use “SvgObject.GetId(group)”.

I’m not sure if it’s being put into a group with another node due to the transparency. This solution also works for SvgObject.GetUniqueId()

As far as the other problem goes, I simply won’t use the transformations / groupings. I simply removed them and it works fine.

1reaction
ThunderChild-001commented, Nov 3, 2020

I am currently playing around with this feature. Unfortunately I’m having a little difficulty getting it to work with the SVGs that I have been given.

The paths and rectangles in this document are grouped into a layer which has a transform. This seems to be causing the bounds check to fail in HitTestDrawing() in WpfDrawingDocument.cs. He comes to the line: if (group.Bounds.Contains(pt)) and leaves. I think its something to do with him looking in the wrong location due to the transform?

There maybe also a problem with transparent objects. I need to investigate further as far as this goes but he doesn’t seem to like some of the styles that are used. I will also keep digging but im not sure if I will discover the problem.

I’m attaching one of the SVGs incase it is something of interest.

arme_aussen.zip

``

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top 9 most in-demand tech jobs of 2023
Learn about nine of the most in-demand tech jobs for 2023 and beyond. ... technical feature requirements, documentation and testing.
Read more >
Top 5 Hottest US Pre-Employment Assessment Tests
Top 5 Hottest US Pre-Employment Assessment Tests · 1. CCAT Test (Criteria Cognitive Aptitude Test) · 2. Wonderlic Test · 3. Caliper Personality ......
Read more >
The 10 most in-demand tech jobs for 2023
Here are 10 jobs expected to be in high demand for 2023, the skills and experience you should look for when hiring, and...
Read more >
10 Best Pre-Employment Testing Software For Evaluating ...
Features like resume parsing, pre-screening questions, and customized assessments help evaluate whether applicants fit the profile hiring teams are seeking.
Read more >
Help Wanted: Best Tips for Hiring in the Music Biz
Want to find the best employees for music industry jobs? Here's why those employees can be found using ZipRecruiter.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found