#6 setting the wxPLplotwindow background color

closed
nobody
None
5
2008-10-15
2008-10-14
No

Some wxPLplotwindow constructor argument is needed to make the following patch unnecessary:

Index: bindings/wxwidgets/wxPLplotstream.cpp

--- bindings/wxwidgets/wxPLplotstream.cpp (revision 8888)
+++ bindings/wxwidgets/wxPLplotstream.cpp (working copy)
@@ -76,6 +76,10 @@

SetOpt( "-drvopt", drvopt );

+ // Swap black and white to get white background
+ scol0(0, 255, 255, 255);
+ scol0(15, 0, 0, 0);
+
init();
cmd( PLESC_DEVINIT, (void*)m_dc );
}

Discussion

  • Robert Pollak

    Robert Pollak - 2008-10-15

    This is not necessary. Use the following instead:

    wxPLplotstream* pls=plotwindow->GetStream();
    [...]
    // Swap black and white to get white background
    pls->scol0(0, 255, 255, 255);
    pls->scol0(15, 0, 0, 0);
    pls->clear(); // Apply bg color

     
  • Robert Pollak

    Robert Pollak - 2008-10-15
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks