KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/irtiweb/CATS/lib/artichow/inc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/irtiweb/CATS/lib/artichow/inc/Gradient.class.php
<?php
/*
 * This work is hereby released into the Public Domain.
 * To view a copy of the public domain dedication,
 * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
 * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
 *
 */



/**
 * Create your gradients
 *
 * @package Artichow
 */
abstract class awGradient {

	/**
	 * From color
	 *
	 * @var Color
	 */
	public $from;

	/**
	 * To color
	 *
	 * @var Color
	 */
	public $to;

	/**
	 * Build the gradient
	 *
	 * @param awColor $from From color
	 * @param awColor $to To color
	 */
	public function __construct($from, $to) {

		$this->from = $from;
		$this->to = $to;

	}

	/**
	 * Free memory used by the colors of the gradient
	 */
	public function free() {

		$this->from->free();
		$this->to->free();

	}

	public function __destruct( ){

		$this->free();

	}

}

registerClass('Gradient', TRUE);


/**
 * Create a linear gradient
 *
 * @package Artichow
 */
class awLinearGradient extends awGradient {

	/**
	 * Gradient angle
	 *
	 * @var int
	 */
	public $angle;

	/**
	 * Build the linear gradient
	 *
	 * @param awColor $from From color
	 * @param awColor $to To color
	 * @param int $angle Gradient angle
	 */
	public function __construct($from, $to, $angle) {

		parent::__construct(
			$from, $to
		);

		$this->angle = $angle;

	}

}

registerClass('LinearGradient');


/**
 * Create a bilinear gradient
 *
 * @package Artichow
 */
class awBilinearGradient extends awLinearGradient {

	/**
	 * Gradient center
	 *
	 * @var int Center between 0 and 1
	 */
	public $center;

	/**
	 * Build the bilinear gradient
	 *
	 * @param awColor $from From color
	 * @param awColor $to To color
	 * @param int $angle Gradient angle
	 * @param int $center Gradient center
	 */
	public function __construct($from, $to, $angle, $center = 0.5) {

		parent::__construct(
			$from, $to, $angle
		);

		$this->center = $center;

	}

}

registerClass('BilinearGradient');

/**
 * Create a radial gradient
 *
 * @package Artichow
 */
class awRadialGradient extends awGradient {

}

registerClass('RadialGradient');
?>

Anon7 - 2021