Click here to Skip to main content
15,615,787 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All

I need to draw symmetric drawing on canvas control of xaml. please give me some tip and if possible example.

for reference:[^]

Thank You

1 solution

Well, if you want to make something similar to that link... that's way to wide to be explained in the quick answers section.

I recommend you to start on your own, when you got stuck then read What have you tried?[^] and come back here, edit your post using the widget "improve question" and then re-ask something more concrete. It will be easier for us to help you with that.

As an approach:
- You know how big your "drawing canvas" is, so you can mathematically divide it in sections depending on the simetry you choose.
The easiest ones are the inversion of axis and direction.
The difficult ones are the number of sections, you have to create them using the ecuation of a line knowing a point (your coordinates origin) and an angle (360 / number_of_axis). You can start with:[^] and[^]

- To draw the symetry you have to use the OnMoveMouse, getting your current coordinate in pixels and doing the needed conversion, depending which symetry is activated. Save the "reflected" coordinates anywhere else and using them to draw the same you are doing with the mouse programatically. Logically, you will need so much temp_savers for your coordinates as refrexion axis are active.

I hope it gives you a bit orientation.

As I said, feel free to come back with more concrete questions about your code, when you have problems and the answers will be better (and easier for us to give)
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900