GenericVisualization font size

Forum for software developers to discuss BCI2000 software development
Locked
kereszte
Posts: 4
Joined: 04 Sep 2010, 21:04

GenericVisualization font size

Post by kereszte » 04 Sep 2010, 21:06

Hello,

I am using the GenericVisualizer as a simple logging display. Is it possible to change the font size for this? I would like it to be larger.

Thanks
AJ

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Post by mellinger » 06 Sep 2010, 09:26

Hello,

font shape and size are defined in shared/gui/SignalDisplay, line 360. Adjust them to your liking.

Regards,
Juergen

kereszte
Posts: 4
Joined: 04 Sep 2010, 21:04

Post by kereszte » 06 Sep 2010, 19:47

Thanks for the reply.

The line that you mentioned has this:

mChannelNameCache.resize( i + 1 );

which I do not believe affects the font size.

Are you talking about AxisFont()? I changed this but it doesn't change the size of the text output in my GenericVisualizer screen. (It seems to change the font sizes of various signal displays.)


Thanks
AJ

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Post by mellinger » 08 Sep 2010, 08:49

What are you referring to by "GenericVisualizer"? There is no such class in BCI2000. Are you using BCPy2000?

Juergen

kereszte
Posts: 4
Joined: 04 Sep 2010, 21:04

Post by kereszte » 09 Sep 2010, 07:59

I am sorry, I spelled the class name wrong. The class name is GenericVisualization and it's referred to in the "Implementing a Signal Processing Filter" tutorial under the section labeled "Visualizing filter output". The class can display wave forms as well as text. I am using it for text and would like to control the font size.

Thanks
AJ

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Post by mellinger » 09 Sep 2010, 08:45

In the file src/core/Operator/VisDisplay.cpp, after line 1146, place a line that reads:

mpMemo->Font->Height = 20;

HTH,
Juergen

kereszte
Posts: 4
Joined: 04 Sep 2010, 21:04

it worked

Post by kereszte » 17 Oct 2010, 17:50

Thanks a lot for your help. it worked.

I have another issue with placing the visualization window.

I am working on a filter that uses the GenericVisualization screen. I have a few configuration options to allow the user to set the window location as well as height/width. In the initialize function, I configure the window like this:

if (taskLogVis != NULL)
{
delete taskLogVis;
}
taskLogVis = new GenericVisualization("mylog");
(*taskLogVis) << GetTimeStamp() << " - " << "Faulty Probe Filter Starting" << std::endl;
taskLogVis->Send(CfgID::Top, logWindowY);
taskLogVis->Send(CfgID::Left, logWindowX);
taskLogVis->Send(CfgID::Width, logWindowWidth);
taskLogVis->Send(CfgID::Height, logWindowHeight);

Note:
-taskLogVis is the GenericVisualization.
-The logWindow* variables are user configurable parameters.

This sets the window location the 1st time it gets called (i.e. the 1st time that the user presses 'set config'), however it will not change the window location any time after that (if the user changes the config and then presses 'set config' again).

Am I doing this incorrectly?

Thanks
AJ

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Post by mellinger » 19 Oct 2010, 08:16

Thank you for reporting this issue. The behavior of visualization windows has been fixed in the current SVN version of BCI2000.

Best regards,
Juergen

Locked

Who is online

Users browsing this forum: No registered users and 2 guests