Hello I need some help :) I have my custom class Filters and inside of it I defined explicit conversion operator to convert from AForge.Point to System.Drawing.PointF both AForge.Point and System.Drawing.PointF are structs from libraries. blob.CenterOfGravity is type of AForge.Point. The problem is that intelisense is telling me that "Cannot convert 'AForge.Point' to 'System.Drawing.PointF'. I don't know why this conversion can't be done :/. Thanks for all replies.
class Filters
{
public static explicit operator System.Drawing.PointF(AForge.Point apoint)
{
return new PointF(apoint.X,apoint.Y);
}
public void DrawData(Blob blob, Bitmap bmp)
{
int width = blob.Rectangle.Width;
int height = blob.Rectangle.Height;
int area = blob.Area;
PointF cog = (PointF)blob.CenterOfGravity;
}
...
}