Listing 2: The Plot routine
void SpettroPlot::Plot(TDC *DC)
{
Axes(DC);
for (int j=1;j<=ls1->NSpectra();j++)
{
int c=ls1->ReturnCircle(j);
TSize delta(c,c);
ncp=ls1->GiveElement(j)->NumCouples();
col=j;
if (j==ls1->ReturnMarked()) col=0;
TPen p1(colore[col]);
TBrush b1(colore[col]);
DC->SelectObject(b1);
DC->SelectObject(p1);
Couple *running;
for (running=ls1->GiveElement(j)->Rfirst();
running!=ls1->GiveElement(j)->Rlast();
running=running->puntcp)
{
px=running->x;
py=running->y;
p.x=(px-ox)*sx-(delta.cx)/2;
p.y=(py-oy)*sy-(delta.cy)/2;
if ((px>=xmi)&&(px<=xma)&&(py>=ymi)&&(py<=yma))
DC->Ellipse(p,delta);
};
};
}
//End of File