[vtkusers] Color of brush sometimes not used for drawing on vtkContext2D

Tijmen Klein T.R.Klein at student.rug.nl
Tue Oct 18 10:29:54 EDT 2011


I'm having a very strange problem. I have subclassed vtkContextItem and have
implemented the Paint(vtkContext2D *painter) method.
In this Paint() method I do this:

painter->GetPen()->SetColor(0, 127, 255, 255);
painter->DrawRect(0,0,size,size);

Now, sometimes when I remove a prop from my renderer, this color is NOT used
to draw the rect. It seems that some other color that is used in the
application is used for this. I have a streamline, and the color of the
DrawRect() matches the end of the streamline! This is ofcourse very weird
behaviour. Does anybody have an idea where this could come from, and how to
fix it? I've looked at the source of vtkOpenGLContextDevice2D.cxx, but I
didn't find anything strange in the DrawQuad() method.

Cheers,
Tijmen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111018/050bc451/attachment.htm>


More information about the vtkusers mailing list