Icons in P300Speller

Forum for software developers to discuss BCI2000 software development
Locked
paolo.meriggi
Posts: 9
Joined: 25 Jan 2011, 09:28

Icons in P300Speller

Post by paolo.meriggi » 17 Feb 2012, 08:29

Dear All, I have some questions:
1) is there a way to set the distance between the different Icons on the screen or should I only use the TargetWidth and TargetHeight parameters ?
2) I noticed that in the last release (3.04 I guess), the icon's background is treated as it was transparent (bitmap icons). Is this a weird effect of my video board and operating system (Windows 7 - ATI Radeon 3650) ?
3) Is there a way to have an Icon for certain target on the screen visualized but not used in the row-column selection process?
4) is there a way to have different dimensions for different target, although the icons are all the same size ?

Thanks in advance for your attention

Kind regards


Paolo

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

Re: Icons in P300Speller

Post by mellinger » 17 Feb 2012, 09:11

2) I noticed that in the last release (3.04 I guess), the icon's background is treated as it was transparent (bitmap icons). Is this a weird effect of my video board and operating system (Windows 7 - ATI Radeon 3650) ?
There was a change in 3.0.3 that accidentally broke the way how transparency had been handled before. This was fixed in 3.0.4, so 3.0.4 indeed behaves differently from 3.0.3 but it should behave identically to previous versions.

For greatest flexibility and backward compatibility, the rules for transparency are as follows:
* When a bitmap has an alpha channel (e.g., GIF with transparency, BMP with alpha channel), then that alpha channel is used to determine transparency. In order to make sure your icon is displayed as-is, add an alpha channel to the image, with the alpha value being set to "opaque" everywhere.
* When a bitmap has no alpha channel, its upper left pixel color is treated as a background color. This is a legacy feature and has originally been introduced to support older icon libraries that would often use different background colors, and no alpha channel.

If you observe behavior different from that, then this is a bug.

Re 1) 3) 4): All this requires changes to the source code, but these changes are as simple and straightforward as
* Introducing a suitable parameter,
* Reading and applying that parameter in the P3Speller::LoadMenu() function.

Regards,
Juergen

Locked

Who is online

Users browsing this forum: No registered users and 1 guest