Example #1
0
void
c_plvpor(PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax)
{
    if (plsc->level < 1) {
	plabort("plvpor: Please call plinit first");
	return;
    }
    if ((xmin >= xmax) || (ymin >= ymax)) {
	plabort("plvpor: Invalid limits");
	return;
    }
    if ((plsc->cursub <= 0) || (plsc->cursub > (plsc->nsubx * plsc->nsuby))) {
	plabort("plvpor: Please call pladv or plenv to go to a subpage");
	return;
    }

    plsc->vpdxmi = plsc->spdxmi + (plsc->spdxma - plsc->spdxmi) * xmin;
    plsc->vpdxma = plsc->spdxmi + (plsc->spdxma - plsc->spdxmi) * xmax;
    plsc->vpdymi = plsc->spdymi + (plsc->spdyma - plsc->spdymi) * ymin;
    plsc->vpdyma = plsc->spdymi + (plsc->spdyma - plsc->spdymi) * ymax;

    plsc->vppxmi = plP_dcpcx(plsc->vpdxmi);
    plsc->vppxma = plP_dcpcx(plsc->vpdxma);
    plsc->vppymi = plP_dcpcy(plsc->vpdymi);
    plsc->vppyma = plP_dcpcy(plsc->vpdyma);

    plsc->clpxmi = MAX(plsc->vppxmi, plsc->phyxmi);
    plsc->clpxma = MIN(plsc->vppxma, plsc->phyxma);
    plsc->clpymi = MAX(plsc->vppymi, plsc->phyymi);
    plsc->clpyma = MIN(plsc->vppyma, plsc->phyyma);

    plsc->level = 2;
}
Example #2
0
//--------------------------------------------------------------------------
//! Set up the subpage boundaries according to the current subpage selected.
//!
void
plP_setsub( void )
{
    PLINT ix, iy;

    ix = ( m_plsc->cursub - 1 ) % m_plsc->nsubx;
    iy = m_plsc->nsuby - ( m_plsc->cursub - 1 ) / m_plsc->nsubx;

    m_plsc->spdxmi = (PLFLT) ( ix ) / (PLFLT) ( m_plsc->nsubx );
    m_plsc->spdxma = (PLFLT) ( ix + 1 ) / (PLFLT) ( m_plsc->nsubx );
    m_plsc->spdymi = (PLFLT) ( iy - 1 ) / (PLFLT) ( m_plsc->nsuby );
    m_plsc->spdyma = (PLFLT) ( iy ) / (PLFLT) ( m_plsc->nsuby );

    m_plsc->sppxmi = plP_dcpcx( m_plsc->spdxmi );
    m_plsc->sppxma = plP_dcpcx( m_plsc->spdxma );
    m_plsc->sppymi = plP_dcpcy( m_plsc->spdymi );
    m_plsc->sppyma = plP_dcpcy( m_plsc->spdyma );

    plP_sclp( m_plsc->sppxmi, m_plsc->sppxma, m_plsc->sppymi, m_plsc->sppyma );
}
Example #3
0
void
plP_setsub(void)
{
    PLINT ix, iy;

    ix = (plsc->cursub - 1) % plsc->nsubx;
    iy = plsc->nsuby - (plsc->cursub - 1) / plsc->nsubx;

    plsc->spdxmi = (PLFLT) (ix)     / (PLFLT) (plsc->nsubx);
    plsc->spdxma = (PLFLT) (ix + 1) / (PLFLT) (plsc->nsubx);
    plsc->spdymi = (PLFLT) (iy - 1) / (PLFLT) (plsc->nsuby);
    plsc->spdyma = (PLFLT) (iy)     / (PLFLT) (plsc->nsuby);

    plsc->sppxmi = plP_dcpcx(plsc->spdxmi);
    plsc->sppxma = plP_dcpcx(plsc->spdxma);
    plsc->sppymi = plP_dcpcy(plsc->spdymi);
    plsc->sppyma = plP_dcpcy(plsc->spdyma);

    plP_sclp(plsc->sppxmi, plsc->sppxma, plsc->sppymi, plsc->sppyma);
}
Example #4
0
void
c_plsvpa(PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax)
{
    PLFLT sxmin, symin;

    if (plsc->level < 1) {
	plabort("plsvpa: Please call plinit first");
	return;
    }
    if ((xmin >= xmax) || (ymin >= ymax)) {
	plabort("plsvpa: Invalid limits");
	return;
    }
    if ((plsc->cursub <= 0) || (plsc->cursub > (plsc->nsubx * plsc->nsuby))) {
	plabort("plsvpa: Please call pladv or plenv to go to a subpage");
	return;
    }

    sxmin = plP_dcmmx(plsc->spdxmi);
    symin = plP_dcmmy(plsc->spdymi);

    plsc->vpdxmi = plP_mmdcx((PLFLT) (sxmin + xmin));
    plsc->vpdxma = plP_mmdcx((PLFLT) (sxmin + xmax));
    plsc->vpdymi = plP_mmdcy((PLFLT) (symin + ymin));
    plsc->vpdyma = plP_mmdcy((PLFLT) (symin + ymax));

    plsc->vppxmi = plP_dcpcx(plsc->vpdxmi);
    plsc->vppxma = plP_dcpcx(plsc->vpdxma);
    plsc->vppymi = plP_dcpcy(plsc->vpdymi);
    plsc->vppyma = plP_dcpcy(plsc->vpdyma);

    plsc->clpxmi = plP_dcpcx(plsc->vpdxmi);
    plsc->clpxma = plP_dcpcx(plsc->vpdxma);
    plsc->clpymi = plP_dcpcy(plsc->vpdymi);
    plsc->clpyma = plP_dcpcy(plsc->vpdyma);

    plsc->level = 2;
}