[vtkusers] vtkChart - difficulty changing title colour and font size
John Platt
jcplatt at dsl.pipex.com
Tue Dec 18 18:00:55 EST 2012
Hi Arnaud,
Unfortunately this has no effect either. I looked into the code and
vtkOpenGLContextDevice2D::DrawString()
searches a cache for previously rendered strings (I think). The key for the search is composed of an Id created by
vtkFreeTypeTools::MapTextPropertyToId()
plus the string. The Id does not use the text colour (just family, bold, italic & angle). So it keeps finding the old string.
Thanks for your help.
John.
----- Original Message -----
From: Arnaud BARRE
To: John Platt
Cc: vtkusers
Sent: Tuesday, December 18, 2012 9:46 PM
Subject: Re: [vtkusers] vtkChart - difficulty changing title colour and font size
Hi John,
You may need to set the chart as modified: myChart->Modified();
It this doesn't work, could you write a minimal example to able to replicate your problem?
Arnaud
On Tue, Dec 18, 2012 at 10:12 PM, John Platt <jcplatt at dsl.pipex.com> wrote:
Hi Arnaud,
Thanks for your suggestion but it does not change the behaviour.
Here is my code for changing the chart title colour ...
vtkTextProperty* txtProp = myChart->GetTitleProperties();
txtProp->SetColor( r, g, b );
myChart->GetScene()->SetDirty( true );
Thanks for your help.
John.
----- Original Message -----
From: Arnaud BARRE
To: John Platt
Sent: Tuesday, December 18, 2012 6:19 PM
Subject: Re: [vtkusers] vtkChart - difficulty changing title colour and font size
How do you modify these properties? You can use the method vtkScene::SetDirty. For example chart->GetScene()->SetDirty(true); This should update your modifications in the next rendering.
Arnaud
On Tue, Dec 18, 2012 at 7:07 PM, John Platt <jcplatt at dsl.pipex.com> wrote:
Hi,
I'm having trouble changing the text colour and font size of the chart & axes titles. They will change when bold or italic is toggled and also after a lot of zooming in the chart. Maybe there is some issue with caching. Has anybody else had problems?
VTK 5.8.0, Qt 4.6.2, Win XP, VS 2008
Thanks,
John.
_______________________________________________
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
_______________________________________________
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/20121218/f5bbe148/attachment.htm>
More information about the vtkusers
mailing list