Image_Transform scaleMaxX(), scaleMaxY()

From: Date: Tue, 16 Dec 2003 17:00:25 +0000
Subject: Image_Transform scaleMaxX(), scaleMaxY()
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24466@lists.php.net to get a copy of this message
scaleMaxX(), scaleMaxY() These methods have been (correctly) renamed to scaleByX() and scaleByY() in the cvs (v1.17). Here is my implementation of these functions based on the actual cvs version (v1.21):
    /**
     * Scale the image to have the max x dimension specified.
     *
     * @access public
     * @param int $max_x Size to scale x-dimension to
     * @return none
     */
    function scaleMaxX($max_x)
    {
        if ($this->img_x > $max_x) {
            return $this->scaleByX($max_x);
        }
        return true;
    } // End scaleMaxX
    /**
     * Scale the image to have the max y dimension specified.
     *
     * @access public
     * @param int $max_y Size to scale y-dimension to
     * @return none
     */
    function scaleMaxY($max_y)
    {
        if ($this->img_y > $max_y) {
            return $this->scaleByY($max_y);
        }
        return true;
    } // End scaleMaxY


« previous php.pear.dev (#24466) next »