Skip to content
Jussi Vatjus-Anttila edited this page Mar 13, 2015 · 1 revision

Usage

#include "lineLayer.h"
#include "gpPanel.h"
//...........................

//wxPanel construction:

gpPanel* graphPanel = new gpPanel( this, wxNewId(), wxDefaultPosition,wxSize(240,336) );

//create new line layer
lineLayer *line = new lineLayer(_("my line"), _("x-label"), _("y-label"));

//Push data to gpLayer
for(int i=0;i<12;i++)
line->DataPush( i, (rand()+1)%1024);

//add gpLayer to gpPanel
graphPanel->AddLayer( line );

//Finally, updated graphics data
line->Refresh();

Details

Clone this wiki locally