Brian Loss (bfl++at++cs.duke.edu)
Mon, 27 Dec 93 10:38:29 -0500
TPerfApp::DoTitle( const char *str, float status_bar )
{
Matrix m;
int xo, yo, xs, ys, nidX, midY;
Boolean zstatus;
float v[2];
// Figure out the center of the window
pfGetPipeOrigin( fPipe, (long *) &xo, (long *) &yo );
pfGetPipeSize( fPipe, (long *) &xs, (long *) &ys );
midX = (xs / 2) + xo;
midY = (ys / 2) + yo;
// Save the projection and viewing matrices
zstatus = getzbuffer( );
zbuffer( FALSE );
mmode( MPROJECTION );
getmatrix( m );
ortho2( xo, xs, yo, ys );
mmode( MVIEWING );
pfPushIdentMatrix( );
cpack( TTLBKGD );
clear( );
cpack( TTLFRGD );
fFonti24->Center( /* Print Title here */, midY + 200, midX ); );
if (str)
fFonti24->Center( str, midY - 180, midX );
if (status_bar >= 0.0f)
{
cpack( 0xff0000ff );
v[0] = 425.0f; v[1] = 150.0f;
bgnclosedline( );
v2f( v ); v[1] += 25.0f;
v2f( v ); v[0] += 425.0f;
v2f( v) ; v[1] -= 25.0f;
v2f( v );
endclosedline( );
v[0] = 425.0f; v[1] = 150.0f;
bgnpolygon( );
v2f( v ); v[1] += 25.0f;
v2f( v ); v[0] += status_bar*425.0f;
v2f( v ); v[1] -= 25.0f;
v2f( v );
endpolygon( );
}
swapbuffers( );
// Restore old projection and viewing matrices
pfPopMatrix( );
mmode( MPROJECTION );
loadmatrix( m );
mmode( MVIEWING );
zbuffer( zstatus );
} // end DoTitle
So, the code for the title and closed line work fine, but the code for the
polygon does not work. I'm confused. I also tried a tmesh instead of a
polygon and that didn't work either. Any help on this would be appreciated.
aTdHvAaNnKcSe.
Brian Loss
_________________________________________________________________
Department of Computer Science, Duke University, Durham, NC 27706
Internet: bfl++at++cs.duke.edu
UUCP: mcnc!duke!bfl
_________________________________________________________________
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:07 PDT