Splash com Transparência
Este script serve para criar telas de splash com transparência, assim como as do acrobat reader dando um visual mais arrojado à apresentação de seu sistema!
<?
/*************************************************
* Splash Screen with transparency *
* *
* author: Zendrael *
* www.zendrael.com - zendrael@gmail.com *
* *
* $id = splash.php *
*************************************************/
class splash{
function __construct(){
//creating window
$this->w = new GtkWindow( gtk::WINDOW_POPUP );
$this->w->set_position( gtk::WIN_POS_CENTER );
$this->w->realize();
//creating image and mask
$pixbuf = GdkPixbuf::new_from_file( "splash.png" );
list($pixmap,$mask)= $pixbuf->render_pixmap_and_mask( 255 );
$this->img = gtkImage::new_from_pixmap( $pixmap, $mask );
$this->img->show();
//creating effect
$this->w->shape_combine_mask( $mask, 0, 0 );
//is necessary a container != of gtkwindow to show the image
$this->fix = new GtkFixed();
//packing image
$this->fix->put( $this->img, 0, 0 );
//packing fixed
$this->w->add( $this->fix );
$this->w->show_all();
//exiting after 10 seconds
gtk::timeout_add(10000, array('gtk','main_quit'));
}
}
new splash();
//gtk main loop
gtk::main();
?>




