silverlight - What is the best way to copy / clone brushes? -
Before drawing a shape on a canvas, I have a preview that shows how the shape looks. I can adjust the opacity and then draw the shape. Then I would like to draw another shape with a different ambiguity. My problem is that by changing the opacity of the preview it also changes the opacity of the shape which I have already prepared.
It has made me believe that I need to copy the used brushes to preview every time before attracting the size.
There are many different brushes and, for example, shield brushes not only need to store shield prevention, but there is a new shield for each shield - the copied collection.
Am I doing the right track down or should I do something else? Should I be copying or cloning? What is the best way to go an extension method? please pay attention.
What you need is cloning, unfortunately, with Xmllriter / Reader, WpF will be easier in you to make it Silverlight In an extension method on the brush that makes a deep copy, it will work fine in your case. You have to handle different brush types separately, but this should not be an issue because there are not many.
Comments
Post a Comment