@@ -1134,7 +1134,7 @@ void LfpDisplayCanvas::paint(Graphics& g)
11341134 // std::cout << "Painting" << std::endl;
11351135
11361136 // g.setColour(Colour(0,0,0)); // for high-precision per-pixel density display, make background black for better visibility
1137- g.setColour (Colour ( 0 , 18 , 43 ) ); // background color
1137+ g.setColour (lfpDisplay-> backgroundColour ); // background color
11381138 g.fillRect (0 , 0 , getWidth (), getHeight ());
11391139
11401140 g.setGradientFill (ColourGradient (Colour (50 ,50 ,50 ),0 ,0 ,
@@ -1461,6 +1461,8 @@ LfpDisplay::LfpDisplay(LfpDisplayCanvas* c, Viewport* v) :
14611461 // channelColours.add(Colour(float(sin((3.14/2)*(float(i)/15))),float(1.0),float(1),float(1.0)));
14621462 // }
14631463
1464+ backgroundColour = Colour (0 ,18 ,43 );
1465+
14641466 // hand-built palette
14651467 channelColours.add (Colour (224 ,185 ,36 ));
14661468 channelColours.add (Colour (214 ,210 ,182 ));
@@ -1650,13 +1652,13 @@ void LfpDisplay::refresh()
16501652 // clear appropriate section of the bitmap --
16511653 // we need to do this before each channel draws its new section of data into lfpChannelBitmap
16521654 Graphics gLfpChannelBitmap (lfpChannelBitmap);
1653- gLfpChannelBitmap .setColour (Colour ( 0 , 0 , 0 ) ); // background color
1655+ gLfpChannelBitmap .setColour (backgroundColour ); // background color
16541656
16551657 if (canvas->fullredraw )
16561658 {
16571659 gLfpChannelBitmap .fillRect (0 ,0 , getWidth (), getHeight ());
16581660 } else {
1659- gLfpChannelBitmap .setColour (Colour ( 0 , 0 , 0 ) ); // background color
1661+ gLfpChannelBitmap .setColour (backgroundColour ); // background color
16601662
16611663 gLfpChannelBitmap .fillRect (fillfrom,0 , (fillto-fillfrom)+1 , getHeight ());
16621664 };
@@ -2117,24 +2119,24 @@ void LfpChannelDisplay::pxPaint()
21172119 // draw zero line
21182120 int m = getY ()+center;
21192121 if (m>0 & m<display->lfpChannelBitmap .getHeight ()){
2120- if ( bdLfpChannelBitmap.getPixelColour (i,m) == Colour ( 0 , 0 , 0 ) ) { // make sure we're not drawing over an existing plot from another channel
2122+ if ( bdLfpChannelBitmap.getPixelColour (i,m) == display-> backgroundColour ) { // make sure we're not drawing over an existing plot from another channel
21212123 bdLfpChannelBitmap.setPixelColour (i,m,Colour (50 ,50 ,50 ));
21222124 }
21232125 }
21242126
2125- // draw range margers
2127+ // draw range markers
21262128 if (isSelected)
21272129 {
21282130 m = getY ()+center+channelHeight/2 ;
21292131 if (m>0 & m<display->lfpChannelBitmap .getHeight ()){
2130- if ( bdLfpChannelBitmap.getPixelColour (i,m) == Colour ( 0 , 0 , 0 ) ) { // make sure we're not drawing over an existing plot from another channel
2131- bdLfpChannelBitmap.setPixelColour (i,m,Colour (50 , 50 , 50 ));
2132+ if ( bdLfpChannelBitmap.getPixelColour (i,m) == display-> backgroundColour ) { // make sure we're not drawing over an existing plot from another channel
2133+ bdLfpChannelBitmap.setPixelColour (i,m,Colour (80 , 80 , 80 ));
21322134 }
21332135 }
21342136 m = getY ()+center-channelHeight/2 ;
21352137 if (m>0 & m<display->lfpChannelBitmap .getHeight ()){
2136- if ( bdLfpChannelBitmap.getPixelColour (i,m) == Colour ( 0 , 0 , 0 ) ) { // make sure we're not drawing over an existing plot from another channel
2137- bdLfpChannelBitmap.setPixelColour (i,m,Colour (50 , 50 , 50 ));
2138+ if ( bdLfpChannelBitmap.getPixelColour (i,m) == display-> backgroundColour ) { // make sure we're not drawing over an existing plot from another channel
2139+ bdLfpChannelBitmap.setPixelColour (i,m,Colour (80 , 80 , 80 ));
21382140 }
21392141 }
21402142 }
0 commit comments