37 if ( plsc->level < 1 )
39 plabort(
"pladv: Please call plinit first" );
43 if ( page > 0 && page <= plsc->nsubx * plsc->nsuby )
48 if ( plsc->cursub >= plsc->nsubx * plsc->nsuby )
59 plabort(
"pladv: Invalid subpage number" );
73 if ( plsc->level < 1 )
75 plabort(
"plclear: Please call plinit first" );
79 if ( plsc->dev_clear )
85 int ocolor = plsc->icol0;
87 x[0] = x[3] = x[4] = (short) plsc->sppxmi;
88 x[1] = x[2] = (
short) plsc->sppxma;
89 y[0] = y[1] = y[4] = (short) plsc->sppymi;
90 y[2] = y[3] = (
short) plsc->sppyma;
103 if ( plsc->level < 1 )
105 plabort(
"pleop: Please call plinit first" );
109 plsc->cursub = plsc->nsubx * plsc->nsuby;
119 if ( plsc->level < 1 )
121 plabort(
"plbop: Please call plinit first" );
135 PLFLT scale, size_chr, size_sym, size_maj, size_min, theta, rat;
139 if ( plsc->nsubx <= 0 )
141 if ( plsc->nsuby <= 0 )
156 ( ( plsc->phyxma - plsc->phyxmi ) / plsc->xpmm +
157 ( plsc->phyyma - plsc->phyymi ) / plsc->ypmm ) / 200.0;
162 theta = 0.5 *
M_PI * plsc->diorot;
163 rat = ( ( plsc->phyxma - plsc->phyxmi ) / plsc->xpmm ) /
164 ( ( plsc->phyyma - plsc->phyymi ) / plsc->ypmm );
165 rat =
MAX( rat, 1.0 / rat );
166 rat = fabs( cos( theta ) ) + rat*fabs( sin( theta ) );
170 if ( plsc->nsuby > 1 )
171 scale /= sqrt( (
double) plsc->nsuby );
178 plsc->chrdef = plsc->chrht = size_chr * scale;
179 plsc->symdef = plsc->symht = size_sym * scale;
180 plsc->majdef = plsc->majht = size_maj * scale;
181 plsc->mindef = plsc->minht = size_min * scale;
192 ix = ( plsc->cursub - 1 ) % plsc->nsubx;
193 iy = plsc->nsuby - ( plsc->cursub - 1 ) / plsc->nsubx;
195 plsc->spdxmi = (
PLFLT) ( ix ) / (
PLFLT) ( plsc->nsubx );
196 plsc->spdxma = (
PLFLT) ( ix + 1 ) / (
PLFLT) ( plsc->nsubx );
197 plsc->spdymi = (
PLFLT) ( iy - 1 ) / (
PLFLT) ( plsc->nsuby );
198 plsc->spdyma = (
PLFLT) ( iy ) / (
PLFLT) ( plsc->nsuby );
200 plsc->sppxmi =
plP_dcpcx( plsc->spdxmi );
201 plsc->sppxma =
plP_dcpcx( plsc->spdxma );
202 plsc->sppymi =
plP_dcpcy( plsc->spdymi );
203 plsc->sppyma =
plP_dcpcy( plsc->spdyma );
205 plP_sclp( plsc->sppxmi, plsc->sppxma, plsc->sppymi, plsc->sppyma );
220 if ( plsc->level < 1 )
222 plabort(
"plgspa: Please call plinit first" );
288 int lastwin = plsc->nplwin - 1;
292 for ( i = lastwin; i >= firstwin; i-- )
295 if ( ( rx >= w->
dxmi ) &&
void plP_esc(PLINT op, void *ptr)
int plGetCursor(PLGraphicsIn *plg)
void c_plcalc_world(PLFLT rx, PLFLT ry, PLFLT *wx, PLFLT *wy, PLINT *window)
void PLFLT PLINT PLINT PLFLT x
int plTranslateCursor(PLGraphicsIn *plg)
void PLFLT PLINT PLINT PLFLT PLFLT y
void c_plgspa(PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax)
void plabort(const char *errormsg)
void plP_fill(short *x, short *y, PLINT npts)
void plP_sclp(PLINT ixmin, PLINT ixmax, PLINT iymin, PLINT iymax)