<div dir="ltr">It's ok for me as i now also ensure to set the color only to the text property, but the red+green=black situation seems to be a bug somewhere in the vtk code.<div><br></div><div>A usecase can be:</div><div>first take a global preference for color text that you apply to the text property, then if the actor is "packaged" with other ones as a group and you change the color of the group, the color is set to all the actors properties without knowing if there are text related or not.</div><div><br></div><div>In this scenario we can think that the actor property should have the priority, but i am sure we can think of another one that states the opposite.</div><div><br></div><div>So in my opinion, if anything is to be modified, i would choose what makes more sense according to the implementation of the final coloring...</div><div><br></div><div>Xabi</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-17 15:28 GMT+01:00 David Lonie <span dir="ltr"><<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Nov 17, 2015 at 7:37 AM, Xabi Riobe <span dir="ltr"><<a href="mailto:xabivtk@gmail.com" target="_blank">xabivtk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>There is an issue when combining vtkTextMapper->GetTextProperty()->SetColor and vtkActor2D->GetProperty()->SetColor</div><div><br></div><div>Before digging into what causes the issue, i would like to know what is the expected result?</div><div><br></div><div>here are different behaviours when setting a vtkTextMapper to a vtkActor2D:</div><div><br></div><div>with VTK 5.10 :</div><div><br></div><div>TextProperty RED + ActorProperty WHITE => Text RED<br></div><div>TextProperty WHITE + ActorProperty GREEN => Text WHITE <br></div><div>TextProperty RED + ActorProperty GREEN => Text RED</div><div><br></div><div>with VTK 6.3 and master, OpenGL 1&2:<br></div><div><br></div><div>TextProperty RED + ActorProperty WHITE => Text RED<br></div><div>TextProperty WHITE + ActorProperty GREEN => Text GREEN <br></div><div>TextProperty RED + ActorProperty GREEN => Text BLACK</div><div><br></div><div>with vtk 5.10, the vtkTextProperty has always priority, whereas with newer versions if only one color is set it is taken into acount, with an obvious issue when both of them are set.</div></div></blockquote><div><br></div></span><div>I'm not sure this was ever well defined behavior, but someone can correct me if I'm wrong. I've typically followed the rule of always setting the color on the text property and leaving the actor color untouched. This should always yield the intended result of rendering the text property's color.</div><div><br></div><div>I can't think of a usecase off the top of my head where setting both would have any meaningful utility. If there are any such usages, we should use those to determine what the "correct" behavior would be.</div><div><br></div><div>Dave</div></div></div></div>
</blockquote></div><br></div>