Jan 21 at 3:59 PM
Edited Jan 21 at 4:03 PM
|
public virtual void OnRender(Graphics g)
{
#if !PocketPC
if(IsVisible)
{
using(GraphicsPath rp = new GraphicsPath())
{
for(int i = 0; i < LocalPoints.Count; i++)
{
GPoint p2 = LocalPoints[i];
if(i == 0)
{
rp.AddLine(p2.X, p2.Y, p2.X, p2.Y);
}
else
{
System.Drawing.PointF p = rp.GetLastPoint();
rp.AddLine(p.X, p.Y, p2.X, p2.Y);
}
}
if(rp.PointCount > 0)
{
rp.CloseFigure();
g.FillPath(Fill, rp);
g.DrawPath(Stroke, rp);
}
}
}
#else
{
if(IsVisible)
{
Point[] pnts = new Point[LocalPoints.Count];
for(int i = 0; i < LocalPoints.Count; i++)
{
Point p2 = new Point((int)LocalPoints[i].X, (int)LocalPoints[i].Y);
pnts[pnts.Length - 1 - i] = p2;
}
if(pnts.Length > 0)
{
g.FillPolygon(Fill, pnts);
g.DrawPolygon(Stroke, pnts);
}
}
}
#endif
Exist a bug in the line:
g.FillPath(Fill, rp);
OverFlow Exception was unhandled
So,
suggestions ???? That happens when I play with scroll mouse ... Class: GMapPolygon
|
|
Coordinator
Jan 21 at 4:16 PM
|
never happened to me ;/
|
|
Jan 21 at 4:28 PM
Edited Jan 21 at 4:32 PM
|
And ????? How fix that ??? Problem of machine ??? I should use Invalidate Method ??? older versions doesn't happen that .... :(
|
|
Coordinator
Jan 21 at 4:39 PM
|
and what points there are in rp?
|
|
Jan 21 at 5:01 PM
Edited Jan 21 at 5:05 PM
|
Points:
x=1.62732621E+9, y=-199307936.0
x=1.62732621E+9, y=-199307936.0
x=1.59429875E+9, y=-216372784.0
x=1.6202889E+9, y=-221093824.0
x=1.63274176E+9, y=-216842432.0
Its problem with negative values ??? Or with biggest values ???
|
|
Coordinator
Jan 21 at 5:06 PM
|
how do you get these big numbers? Are you using latest version?
|
|
|
|
Yes sr, the latest version, those numbers appear when I move the mouse scroll fast .... :( ... And something strange is that in older version this doesn't happen
|
|
Coordinator
Jan 21 at 6:38 PM
|
"move the mouse scroll" ;/ ?
|
|
|
|
Yep, the scroll of the mouse, the wheel of the midle ... :(
|
|
Coordinator
Jan 21 at 9:04 PM
|
maybe you zoomed to level 152?
|
|
|
|
O.o, I don't Know, I supposed that maps doesn't leave more than 24 of zoom, isn't it ??
|
|
|
|
Hi, I have set the zoom until 17 and the bug doesn't reply, perhaps was this because the application that is available for download MaxZoom is until 24, o.o ...
|
|