Re: Fw: WELCOME to php-gtk-general@lists.php.net

From: Date: Tue, 15 Aug 2006 00:57:01 +0000
Subject: Re: Fw: WELCOME to php-gtk-general@lists.php.net
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7094@lists.php.net to get a copy of this message
It's possible he's just asking for minimize()/ maximize() - that's why I'm asking :)
thomas favennec wrote:
is someone knowing " max-width / min-with " function, or way to do that in phpgtk2 ?
Do you mean something like this? -=- // list ($sx, $sy) = aspectScale ($bx, $by, $ix, $iy); function aspectScale ($bx, $by, $ix, $iy) { if ($ix > $iy) {
       // fit to width
       $scale = $bx / $ix;
       $sy = $scale * $iy;
       if ($sy > $by) {
    // If it doesn't fit, go the other way
           $scale = $by / $iy;
           $sx = $scale * $ix;
           $sy = $by;
       } else {
           $sx = $bx;
       }
} else {
       // fit to height
       $scale = $by / $iy;
       $sx = $scale * $ix;
       if ($sx > $bx) {
           $scale = $bx / $ix;
           $sx = $bx;
           $sy = $scale * $iy;
       } else {
           $sy = $by;
       }
} return array($sx, $sy); } -=- -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com


« previous php.gtk.general (#7094) next »