library/Garp/Image/Scaler.php
private function _projectSourceOnCanvas(&$source, &$canvas) {
        $srcX = 0;
        $srcY = 0;
        list($projectionWidth, $projectionHeight) = $this->_getProjectionSize();
        list($destX, $destY) = $this->_getLeftUpperCoordinateOnCanvas(
            $projectionWidth,
            $projectionHeight
        );
        imagecopyresampled(
            $canvas,
            $source,
            $destX,
            $destY,
            $srcX,
            $srcY,
            $projectionWidth,
            $projectionHeight,
            $this->_params['sourceWidth'],
            $this->_params['sourceHeight']
        );
    }
private function _projectSourceOnCanvas(&$source, &$canvas) {
        $srcX = 0;
        $srcY = 0;
        list($projectionWidth, $projectionHeight) = $this->_getProjectionSize();
        list($destX, $destY) = $this->_getLeftUpperCoordinateOnCanvas(
            $projectionWidth,
            $projectionHeight
        );
        imagecopyresampled(
            $canvas,
            $source,
            $destX,
            $destY,
            $srcX,
            $srcY,
            $projectionWidth,
            $projectionHeight,
            $this->_params['sourceWidth'],
            $this->_params['sourceHeight']
        );
    }
private function _projectSourceOnCanvas ( & $ source , & $ canvas ) { $ srcX = 0 ; $ srcY = 0 ; list ( $ projectionWidth , $ projectionHeight ) = $ this -> _getProjectionSize ( ) ; list ( $ destX , $ destY ) = $ this -> _getLeftUpperCoordinateOnCanvas ( $ projectionWidth , $ projectionHeight ) ; imagecopyresampled ( $ canvas , $ source , $ destX , $ destY , $ srcX , $ srcY , $ projectionWidth , $ projectionHeight , $ this -> _params [ 'sourceWidth' ] , $ this -> _params [ 'sourceHeight' ] ) ; }
Performs the actual projection of the source onto the canvas.

@param resource $source
@param resource $canvas
@return void
Performs the actual projection of the source onto the canvas .