• Artigos
  • Projetos
  • Download
  • Lista
  • Docs
  • Comunidade
  • ?

Splash com Transparência

26/10/2006  Zendrael  Ler e Comentar

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();

?>




Comentários

 Adicionar Comentário
 login
 Senha
 Título
 Comentário

Livros


  • Artigos

    • PHP-GTK - O Futuro das Aplicações Client-Side Open Source pode ser ele.
    • Selecionando Arquivos e Pastas

    Projetos

    • Instalador PHP-GTK2
    • LinuxStok
    • GenTKode
    • pSheet!
  • Google

    Parceiros

 
Designed by Wolfgang Bartelme Designed by Wolfgang Bartelme

© 2006 Wordpress Themes | Theme (Not so) Fresh
XHTML CSS

PHP-GTK Brasil