//-------------------------------------------------------------------------- //! Clear current subpage. Subpages can be set with pladv before //! calling plclear. Not all drivers support this. // void c_plclear( void ) { if ( m_plsc->level < 1 ) { plabort( "plclear: Please call plinit first" ); return; } if ( m_plsc->dev_clear ) plP_esc( PLESC_CLEAR, NULL ); else // driver does not support clear, fill using background color { short x[5], y[5]; int ocolor = m_plsc->icol0; x[0] = x[3] = x[4] = (short) m_plsc->sppxmi; x[1] = x[2] = (short) m_plsc->sppxma; y[0] = y[1] = y[4] = (short) m_plsc->sppymi; y[2] = y[3] = (short) m_plsc->sppyma; plcol0( 0 ); plP_fill( x, y, 5 ); plcol0( ocolor ); } }
static void rdbuf_fill(PLStream *pls) { short xpl[PL_MAXPOLY], ypl[PL_MAXPOLY]; PLINT npts; dbug_enter("rdbuf_fill"); fread(&npts, sizeof(PLINT), 1, pls->plbufFile); fread(xpl, sizeof(short), npts, pls->plbufFile); fread(ypl, sizeof(short), npts, pls->plbufFile); plP_fill(xpl, ypl, npts); }