Пример #1
0
void set_bgscreen (unsigned short *fbmem,int w,int h)
{
	unsigned short pixel,i,j;
	pixel = rgb24_to16(189,121,50);
	for (j = 0; j < h;j++)
		fb_hline(fbmem,w,0,j,w-1,pixel);
	
	for (i = 1 ; i < 20;i++)
	{	
		fb_hline (fbmem,w,100,30*i,670,0x3E0);
		fb_hline (fbmem,w,100,30*i+1,670,0xCCCC);
	}
	for (i = 0 ; i < 20;i++)
	{	
		fb_vline (fbmem,w,100 + 30*i,30,571,0x3E0);
		fb_vline (fbmem,w,101 + 30*i,30,571,0xCCCC);
	}
}
Пример #2
0
static void do_el_list_out( doc_element * array, uint8_t count )
{
    doc_element *   cur_el;
    doc_element *   save;
    int             i;
    text_line   *   cur_line;

    /*  Advise the user that multiple columns are not, in fact, implemented */

    if( count > 1 ) {
        out_msg( "Multi-column output not implemented" );
    }

    /*  The array should have the doc_elements in linked-list form in the   */
    /*  same order as the columns they came from were linked together.      */
    /*  The columns should no longer point to these doc_element lists.      */

    for( i = 0; i < count; i++ ) {
        cur_el = &array[i];
        while( cur_el != NULL ) {
            if( i == 0 ) {      // restrict output to first column, for now
                switch( cur_el->type ) {
                case el_binc :
                    if( GlobalFlags.lastpass ) {
                        ob_binclude( &cur_el->element.binc );
                    }
                    break;
                case el_dbox :  // should only be found if DBOX block exists
                    if( GlobalFlags.lastpass ) {
                        fb_dbox( &cur_el->element.dbox );
                    }
                    break;
                case el_graph :
                    if( GlobalFlags.lastpass ) {
                        if( ProcFlags.ps_device ) {   // only available to PS device
                            ob_graphic( &cur_el->element.graph );
                        }
                    }
                    break;
                case el_hline :  // should only be found if HLINE block exists
                    if( GlobalFlags.lastpass ) {
                        fb_hline( &cur_el->element.hline );
                    }
                    break;
                case el_text :
                    if( GlobalFlags.lastpass ) {
                        for( cur_line = cur_el->element.text.first; cur_line != NULL; cur_line = cur_line ->next ) {
                            fb_output_textline( cur_line );
                        }
                    }
                    break;
                case el_vline :  // should only be found if VLINE block exists
                    if( GlobalFlags.lastpass ) {
                        fb_vline( &cur_el->element.vline );
                    }
                    break;
                default :
                    internal_err( __FILE__, __LINE__ );
                }
            }
            save = cur_el->next;
            cur_el->next = NULL;            // clear only current element
            clear_doc_element( cur_el );
            add_doc_el_to_pool( cur_el ); 
            cur_el = save;
        }
    }    

    return;
}