J
Jason
I have a graphicsPath object filled up with apporximately 2000 points, I am
coping them out into my own point class so I can do some extra operations on
them, its super slow. In C++ this would be pretty fast, not instant, but
would take in the milliseconds, in c# is taking up to 10 seconds. The
operations I am doing are really complicated but blazing fast compared to
just getting the points out of the graphics path. I read that structs ( and
all by value entities ) are thread safe, which if its locking some mutex or
semiphore could account for the bog. Is this what the problem is or could it
be something else?
How can I speed up the process of getting the points out of the
graphicsPath?
heres a litte sample of my point class...just the construction
internal class Point2D
{
#region Member Variables
float m_X;
float m_Y;
#endregion
#region Constructor
public Point2D()
{
m_X = 0;
m_Y = 0;
}
public Point2D( float x, float y )
{
m_X = x;
m_Y = y;
}
public Point2D( Point2D pointToCopy )
{
m_X = pointToCopy.X;
m_Y = pointToCopy.Y;
}
public Point2D( PointF pointToCopy )
{
m_X = pointToCopy.X;
m_Y = pointToCopy.Y;
}
......
coping them out into my own point class so I can do some extra operations on
them, its super slow. In C++ this would be pretty fast, not instant, but
would take in the milliseconds, in c# is taking up to 10 seconds. The
operations I am doing are really complicated but blazing fast compared to
just getting the points out of the graphics path. I read that structs ( and
all by value entities ) are thread safe, which if its locking some mutex or
semiphore could account for the bog. Is this what the problem is or could it
be something else?
How can I speed up the process of getting the points out of the
graphicsPath?
heres a litte sample of my point class...just the construction
internal class Point2D
{
#region Member Variables
float m_X;
float m_Y;
#endregion
#region Constructor
public Point2D()
{
m_X = 0;
m_Y = 0;
}
public Point2D( float x, float y )
{
m_X = x;
m_Y = y;
}
public Point2D( Point2D pointToCopy )
{
m_X = pointToCopy.X;
m_Y = pointToCopy.Y;
}
public Point2D( PointF pointToCopy )
{
m_X = pointToCopy.X;
m_Y = pointToCopy.Y;
}
......