In C#!
I would like to create a mechanism that draws or displays shapes on a human body based on the user selection. To illustrate that:
Note: I do not own these pictures. They are just being used for illustrative purposes. Source: www.uebungen.ws
So if the user selects an activity, the programm should draw shapes for the used muscles or show prepared bitmaps or whatever onto the background graphic, which is the human body. In the final version there are going to be way more possibilities to choose from than here, so just preparing a bitmap for each possible choice isn't really an option.
If you don't really understand what I mean, visit: www.uebungen.ws. It's the site from which I got the picture above.
The questions:
How do I set up the data structure? Since the number of muscles won't change in near future I could simply create some sort of enum structure. I saw an interesting example here: Nested Enum. Or I could create a list with all the muscles to a specific entry in it. But both versions have the problem, that when it comes to displaying, I have to decide which muscle is which. And I can see a big switch case query coming up...
Transfering the data to the GUI If I had a good data structure, fine. But how do I get the data to the GUI? Assuming I use WPF with bindings, I can't simply create a class with all possible muscles as property in it, just to bind the visibility of the different red shapes to these properties. So how to do this? A big switch case? A new custom control?
How do I display the red shapes? Bitmaps or drawing shapes or what would you recommend?
Thx for you help
Personally I would produce transparent PNG's of all the options and overlay them over the base image when one is selected using CSS. As an alternative you could have each mussle group as a an .SVG plot and draw them on the image when each is selected but that would be more complicated that overlaying the PNG's and you'd still need to generate the mussle group images so wouldn't be any faster either.