[vtkusers] Problem with vtkChartXY::SetTitle and vtkAxis::SetTitle

Joseph Melnyk JMelnyk at pile.com
Thu Nov 3 14:51:50 EDT 2011


I actually have a similar, but different problem.  I just upgraded to 5.8.0, after using 5.7 for months.  I'm not having any issues with setting the title of a vtkAxis but I'm having trouble setting the font size for it.  My existing code has no effect:

int fontSize = 15;
for(int i=0; i < chart->GetNumberOfAxes() ;i++)
{
	chart->GetAxis(i)->GetTitleProperties()->SetFontSize(fontSize);
	chart->GetAxis(i)->Update();
}

If I check the font size of each axis before/after setting it, it's correct (12 before, 15 after); but there's certainly no visual difference.  Similarly, using SetBold() or SetColor() has no effect.  But note that before initialization of my associated vtkContextView, SetColor(), SetBold() and SetFontSize() all work just fine.  The above code needs to run after initialization.  And again, it worked with no issues before.

Thanks
Joe






From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Marcus D. Hanwell
Sent: Wednesday, November 02, 2011 2:09 PM
To: Andrew Wiles
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Problem with vtkChartXY::SetTitle and vtkAxis::SetTitle

On Tue, Nov 1, 2011 at 3:46 PM, Andrew Wiles <awiles at ndigital.com> wrote:
Hello everyone,
 
I haven't seen a reply to this yet, so I thought I might just renew this thread.  If I don't see a reply soon, I might log it as a bug as it doesn't make sense to me, everything else works fine when using RelWithDebInfo.  I would really like to use that as running everything in Debug is pretty slow.


--------------------
>>> "Andrew Wiles" <awiles at ndigital.com> 10/25/2011 3:23 PM >>>
Hi Daniel,
 
Thanks for your support :).
 
I took the time today to rebuild my VTK and my application code using both Debug.  I then had to change my title string to use the ".toAscii()" conversion instead of the ".toStdString()" conversion for my QString objects.  Everything now works in Debug only with MSVC 2010 Express.  I still need to test the release modes.  
 
However, things still don't work when both are RelWithDebInfo.  Maybe Marcus can enlighten when he has a chance.

Hi,

I was out of the office on vacation, hence the delay in replying. I would like to spend a little time investigating the issue here, as this should function in all build configurations. I am not sure we have any Windows dashboards building RelWithDebInfo, but I can test this locally and perhaps add a dashboard submission.

Mixing Release and Debug builds will never end well on Windows, and it is probably a good thing to have this fail early as you MS change things in the STL and C++ runtime quite a bit. The reason this happens it because of the changes the MS compilers make to things like STL strings in the two build configurations - I will let the Windows experts comment further on this (but that is my understanding).

Marcus


__Scanned by MessageLabs



More information about the vtkusers mailing list