Problem printing polygon

  • Thread starter Thread starter Jaime
  • Start date Start date
J

Jaime

When I send a graph (polygon) to printer, I receive the next message:

Object referente not set to an instante of an object.--- at
System.Drawing.SafeNativeMethods.GdipFillPolygonI(HandleRef graphics,
HandleRef brush, HandleRef points, Int32 count, Int32 brushMode)
at System.Drawing.Graphics.FillPolygon(Brush brush, Point[] points,
FillMode fillMode)
at WinAppSeguimiento.frmImpresion.PaintRadar(Graphics& graphToRender,
Double paramRadio, Int32 height, Int32 width, Int32 left, Int32 top,
Int16, paramDataPoints, Int16 paramSegments, Color paramLineColor, Color
paramAreaColor, Double[,] paramValues)


I use without problem the same function when the polygon is shown in the
monitor.
I´m using VS 2003, framework 1.1

Does anybody have any idea what could be?


Thank a lot.

Jaime
 
Set a breakpoint at the line the FillPolygon line and inspect the
brushes, graphics, and other objects and find out which one is null.
That should give you some clues as to why it is occurring.
 
Back
Top