5 void puFrame::draw ( int dx, int dy )
7 if ( !visible ) return ;
9 abox . draw ( dx, dy, style, colour, FALSE ) ;
11 /* If greyed out then halve the opacity when drawing the label and legend */
14 glColor4fv ( colour [ PUCOL_LEGEND ] ) ;
16 glColor4f ( colour [ PUCOL_LEGEND ][0],
17 colour [ PUCOL_LEGEND ][1],
18 colour [ PUCOL_LEGEND ][2],
19 colour [ PUCOL_LEGEND ][3] / 2.0f ) ; /* 50% more transparent */
21 int xx = ( abox.max[0] - abox.min[0] - puGetStringWidth ( legendFont, legend ) ) / 2 ;
23 puDrawString ( legendFont, legend,
24 dx + abox.min[0] + xx,
25 dy + abox.min[1] + puGetStringDescender ( legendFont ) + PUSTR_BGAP ) ;
27 draw_label ( dx, dy ) ;