[vtkusers] vtkProperty2D problem: SetLineColor has no effect when used on the border widget's property

Yumin Yuan yumin.yuan at kitware.com
Fri Mar 14 12:19:28 EDT 2014


Hi Dave,

I tried the example with 6.1 and master on OSX 10.8, and both seem to work
for me. Haven't tried 6.0 though.

HTH,
Yumin


On Thu, Mar 13, 2014 at 8:40 AM, David Cole <dlrdave at aol.com> wrote:

> In this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/
> ImageClip
>
> This line of code apparently works:
>
> static_cast<vtkBorderRepresentation*>
>     (borderWidget->GetRepresentation())->GetBorderProperty()->SetColor(
> 0,1,0)
> ;
>
> and makes the border widget green.
>
> If I add the exact same line of code to this example:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BorderWidget
>
> it has no apparent effect, and the border widget stubbornly remains
> exactly white.
>
> Why???
>
> I stepped through the code in the debugger, and see that
> vtkProperty2D::Render gets called, and it is a no-op... expecting to have a
> vtkOpenGLProperty2D override, I presume. But there isn't one.
>
> So I understand why it *doesn't* work in the border widget example. So why
> does it work in the image clip example??? I don't get it...
>
> This is all with VTK somewhere between 6.0 and 6.1 (I can be more exact if
> necessary, or try 6.1 if somebody claims it's fixed in there), using ninja
> and the VS 2012 compiler on Windows.
>
>
> Thanks,
> David C.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140314/1533431f/attachment.html>


More information about the vtkusers mailing list