[vtkusers] Issue Rendering Patterned Lines in vtkChartXY

Joseph Melnyk JMelnyk at pile.com
Tue Sep 10 13:43:44 EDT 2013


I'm having an issue rendering lines with a pattern in vtkChartXY.  The issue is that if I add multiple patterned lines to a chart, the first one appears blank but the rest appear just fine.  That is, the label for the first line appears in the chart's legend but the line within the legend as well as the line within the chart are both missing.  This is when I use any sort of pattern (vtkPen::DOT_LINE, vtkPen::DASH _LINE, etc.) for the line.  Additionally, the machines I am seeing this occur on all have the Intel HD Graphics 3000 integrated graphics processor.  All drivers have been updated, etc.  Machines with a dedicated graphics card are not exhibiting the issue (nor are Windows 7 or XP virtual machines).  This is occurring for vtk5.10.0 but also was occurring for 5.8.0 and 5.6.x.  I have not tested with vtk6.0.x yet.

I suspected it was a weird graphics quirk at first but, as I said, all other patterned lines after the first one are rendering just fine.  Now I'm suspecting a vtk bug with certain graphics cards, perhaps...

For example code, just use the code in the wiki located at: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot
Then add: "line->GetPen()->SetLineType(vtkPen::DASH_LINE);" for each line, after it's added to the vtkChartXY and before setting its width.  Then the Cosine plot will be missing (on appropriate machines, evidently) and the Sine plot will appear just fine.

Any help is appreciated!
Joseph Melnyk

__Scanned by MessageLabs



More information about the vtkusers mailing list