Problem printing polygon

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
 
C

Chris Dunaway

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top