We need to store one additional piece of information with a PointF (the t parameter of the location along a Bezier curve).
Since this data can not be easily recalculated, I want to store it with the PointF at the time that the point is calculated, for use in other routines.
We have hundreds of references to PointF, so I was hoping not to have to create a new replacement class, but “extend” the PointF struct with one additional property.
The client code would be something like:
PointF intersection = new PointF();
intersection.X = 3457.23;
intersection.Y = -277.738;
intersection.t = 0.744;
Is this (or anything like this) possible?
You can’t add a property or field onto an existing class or struct you don’t have the source for. You will need to make your own new struct to carry additional data.