I need to be able to transform one of my own objects along with some GraphicsPath objects in .Net. I need any scaling, translation, rotation operations that are performed on the GraphicsPath objects to also occur on my own object.
For example, here is some scaling code:
using (Matrix ScaleTransform = new Matrix(1, 0, 0, 1, 0, 0)) // scale matrix
{
ScaleTransform.Scale(ScaleX, ScaleY);
moPath.Transform(ScaleTransform);
moBoundingBox.Transform(ScaleTransform);
MyObject.Transform(ScaleTranform);
}
//In "MyObject":
public void Transform(Matrix m)
{
//How is this implemented? Is there a built-in .Net method?
}
The question is: What is the best way to implement the "Transform" method in MyObject. I did quite a bit of searching, but couldn't find any references for the best way to do this.
Thanks!